/**
 * Codmin design system — dark theme aligned with Codmin logo.
 * Colors: dark blue-black background, blue gradients, white/light blue text.
 * Use this file on all web pages for consistent UI.
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  /* Backgrounds */
  --bg-page: #0d0f14;
  --bg-card: rgba(23, 28, 40, 0.92);
  --bg-card-elevated: rgba(30, 36, 50, 0.95);
  --bg-input: rgba(30, 36, 50, 0.8);

  /* Blue palette (logo-aligned) */
  --blue-primary: #3b82f6;
  --blue-light: #60a5fa;
  --blue-bright: #93c5fd;
  --blue-dark: #1d4ed8;
  --blue-glow: rgba(59, 130, 246, 0.35);

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #1e3a5f 0%, #0d0f14 50%, #111827 100%);
  --gradient-card: linear-gradient(145deg, rgba(30, 58, 95, 0.4) 0%, rgba(23, 28, 40, 0.9) 100%);
  --gradient-btn: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  --gradient-btn-hover: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  --gradient-pro: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-on-blue: #ffffff;

  /* Borders & surfaces */
  --border-subtle: rgba(148, 163, 184, 0.15);
  --border-accent: rgba(96, 165, 250, 0.4);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px var(--blue-glow);

  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    sans-serif;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  background-image: var(--gradient-hero);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.container--narrow {
  max-width: 560px;
}

.container--medium {
  max-width: 900px;
}

.container--wide {
  max-width: 1400px;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 16px;
  text-align: center;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--blue-light);
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-weight: 400;
}

p {
  color: var(--text-secondary);
}

/* Cards */
.card,
.section-card {
  background: var(--bg-card);
  background-image: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px;
  margin-bottom: 24px;
}

.card--centered {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Buttons & links */
.btn,
.cta-button,
.plan-button,
.values-cta a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--gradient-btn);
  color: var(--text-on-blue);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.cta-button:hover,
.plan-button:hover,
.values-cta a:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--blue-glow);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn--secondary,
.cta a.secondary,
.cta a.btn--secondary {
  background: rgba(59, 130, 246, 0.2);
  color: var(--blue-light);
  border: 1px solid var(--border-accent);
}

.btn--secondary:hover,
.cta a.secondary:hover,
.cta a.btn--secondary:hover {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
}

a:not(.btn):not(.cta-button):not(.plan-button) {
  color: var(--blue-light);
  text-decoration: none;
}

a:not(.btn):not(.cta-button):not(.plan-button):hover {
  text-decoration: underline;
}

/* Lang switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switcher .lk-link,
.lang-switcher select,
.lang-switcher button {
  min-height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--blue-light);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.lang-switcher .lk-link {
  min-width: 108px;
  text-align: center;
}

.lang-switcher .lk-link--primary {
  color: var(--text-on-blue);
  background: var(--gradient-btn);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.28);
}

.lang-switcher .lk-link {
  text-decoration: none;
}

.lang-switcher .lk-link:hover,
.lang-switcher select:hover,
.lang-switcher button:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: scale(1.03);
}

.lang-switcher button.active {
  background: var(--gradient-btn);
  color: var(--text-on-blue);
  border-color: transparent;
}


/* Public site navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px 24px;
  background: rgba(13, 15, 20, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-top: none;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav__controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav__user {
  color: var(--text-secondary);
  font-size: 0.95rem;
  white-space: nowrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: rgba(59, 130, 246, 0.15);
  text-decoration: none;
}

.site-nav a.is-active {
  color: var(--text-on-blue);
  background: var(--gradient-btn);
  border-color: transparent;
}


/* Header / Hero */
.hero {
  text-align: center;
  padding: 56px 20px 48px;
}

.hero h1 {
  margin-bottom: 12px;
}

.hero .subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Features grid */
.features-grid,
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.feature {
  text-align: center;
  padding: 24px 16px;
  background: rgba(30, 36, 50, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.feature h3 {
  margin-bottom: 8px;
}

.feature p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Value cards */
.value-card,
.values-item {
  border-left: 4px solid var(--blue-primary);
  background: rgba(30, 58, 95, 0.25);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--blue-primary);
}

.values-list {
  list-style: none;
  margin-top: 20px;
  display: grid;
  gap: 18px;
}

.value-card h3,
.values-item strong {
  color: var(--blue-light);
}

.values-item strong {
  font-weight: 600;
}

/* Pricing plans */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.plan {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.plan:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.plan.pro {
  border-color: var(--blue-primary);
  background: var(--gradient-pro);
  color: var(--text-on-blue);
}

.plan.pro .plan-features li {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.plan.pro .plan-button {
  background: rgba(255, 255, 255, 0.95);
  color: var(--blue-dark);
}

.plan.pro .plan-button:hover {
  background: #fff;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.plan.pro .plan-name {
  color: var(--text-on-blue);
}

.plan-price {
  font-size: 2rem;
  font-weight: 700;
  margin: 16px 0;
  color: var(--blue-light);
}

.plan.pro .plan-price {
  color: var(--text-on-blue);
}

.plan-features {
  list-style: none;
  text-align: left;
  margin: 20px 0;
}

.plan-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.plan.pro .plan-features li {
  color: rgba(255, 255, 255, 0.9);
}

.plan-button {
  margin-top: 20px;
}

/* Compare link */
.compare-link {
  text-align: center;
  margin-top: 28px;
}

.compare-link a {
  font-weight: 600;
  border-bottom: 2px solid var(--blue-light);
  padding-bottom: 2px;
}

.compare-link a:hover {
  color: var(--blue-bright);
  border-bottom-color: var(--blue-bright);
}

/* Back / nav links */
.back-link,
.nav {
  margin-bottom: 20px;
}

.back-link a,
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.back-link span,
.nav span {
  color: var(--text-muted);
  margin: 0 8px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.header h1 {
  font-size: 1.75rem;
  margin-bottom: 0;
}

/* Table (pricing comparison) */
.pricing-table-wrap {
  margin-top: 24px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.8) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
  overflow: hidden;
}

.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

.pricing-table thead {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95) 0%, rgba(30, 64, 175, 0.95) 100%);
}

.pricing-table th {
  padding: 16px 18px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-on-blue);
  border-bottom: 1px solid rgba(147, 197, 253, 0.3);
}

.pricing-table th:not(:first-child),
.pricing-table td:not(:first-child) {
  text-align: center;
  min-width: 140px;
}

.pricing-table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  vertical-align: middle;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.35);
}

.pricing-table tbody tr:nth-child(even):not(.feature-category) td {
  background: rgba(30, 41, 59, 0.32);
}

.pricing-table tbody tr:not(.feature-category):hover td {
  background: rgba(37, 99, 235, 0.14);
}

.pricing-table .feature-category td {
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(30, 58, 95, 0.5), rgba(15, 23, 42, 0.4));
  border-top: 1px solid rgba(96, 165, 250, 0.22);
}

.pricing-table .plan-free {
  background: rgba(51, 65, 85, 0.25);
}

.pricing-table .plan-advanced {
  background: rgba(30, 41, 59, 0.45);
}

.pricing-table .plan-pro {
  background: rgba(30, 58, 95, 0.35);
}

.check {
  color: #34d399;
  font-weight: 700;
  font-size: 1rem;
}

.cross {
  color: #f87171;
  font-weight: 700;
  font-size: 1rem;
}

.unlimited {
  color: var(--blue-bright);
  font-weight: 700;
}

.masked {
  color: #fbbf24;
}

/* Notes block */
.notes {
  margin-top: 32px;
  padding: 20px 24px;
  background: rgba(30, 58, 95, 0.25);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--blue-primary);
}

.notes h3 {
  margin-bottom: 12px;
}

.notes ul {
  margin-left: 20px;
}

.notes li {
  margin-bottom: 10px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.notes strong {
  color: var(--text-primary);
}

/* Forms (LK) */
label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 600;
  color: var(--text-primary);
}

select,
input[type='text'] {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-primary);
  font-family: inherit;
}

select:focus,
input[type='text']:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

select option {
  background: var(--bg-card-elevated);
  color: var(--text-primary);
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin: 8px 0;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.copy-field:hover {
  border-color: var(--border-accent);
  background: rgba(30, 58, 95, 0.35);
}

.copy-field code {
  flex: 1;
  word-break: break-all;
  font-size: 0.9rem;
  color: var(--blue-bright);
}

.copy-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Messages */
.message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: 0.95rem;
}

.message.success {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.message.error {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.error {
  color: #f87171;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

/* Hint box */
.hint {
  background: rgba(30, 58, 95, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: left;
}

.hint strong {
  color: var(--text-primary);
}

.hint a {
  color: var(--blue-light);
}

/* Group row (dashboard) */
.group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: rgba(30, 36, 50, 0.4);
}

.group-row:hover {
  border-color: var(--border-accent);
}

.group-name {
  font-weight: 600;
  color: var(--text-primary);
}

.expires {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.plan-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.plan-Free {
  background: rgba(100, 116, 139, 0.3);
  color: var(--text-secondary);
}

.plan-Advanced {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.plan-Pro {
  background: var(--gradient-pro);
  color: var(--text-on-blue);
}

/* Empty state */
.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
}

.empty a {
  color: var(--blue-light);
}



/* Document pages (manual / legal) */
body.document-page .container {
  padding-top: 20px;
}

.document-card {
  max-width: 900px;
  margin: 0 auto;
}

.document-card h1,
.document-card h2,
.document-card h3 {
  margin-top: 1.2em;
}

.document-card ul,
.document-card ol {
  padding-left: 24px;
}

.document-card blockquote {
  border-left: 3px solid var(--blue-primary);
  padding-left: 12px;
  color: var(--text-secondary);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

footer a {
  color: var(--blue-light);
  margin: 0 10px;
}

footer a:hover {
  color: var(--blue-bright);
}

/* Sections on landing */
.section-card.features,
.section-card.values,
.section-card.pricing {
  padding: 48px 28px;
  margin-top: 32px;
}

.section-card h2 {
  margin-bottom: 24px;
}

.section-card .subtitle,
.section-card p[style*='color'] {
  color: var(--text-secondary);
}

.values-cta {
  text-align: center;
  margin-top: 28px;
}

/* CTA block */
.cta {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.back .link-sep {
  color: var(--text-muted);
  margin: 0 8px;
}

.support {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.support a {
  color: var(--blue-light);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .site-nav {
    width: calc(100% - 24px);
    padding: 12px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .site-nav a {
    padding: 7px 11px;
    font-size: 0.9rem;
  }

  .site-nav__controls {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .lang-switcher {
    justify-content: flex-end;
  }

  .lang-switcher .lk-link,
  .lang-switcher select,
  .lang-switcher button {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .hero {
    padding: 40px 16px 32px;
  }

  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .section-card.features,
  .section-card.values,
  .section-card.pricing {
    padding: 28px 20px;
  }

  .pricing-table {
    font-size: 0.83rem;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 10px 8px;
    min-width: 88px;
  }

  .pricing-table .feature-category td {
    padding: 11px 8px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header h1 {
    font-size: 1.5rem;
  }
}
