@import "tailwindcss";

/* ═══════════════════════════════════════════════════════════════
   REMINDCALL DESIGN SYSTEM
   Tailwind v4 — tokens + components
   ═══════════════════════════════════════════════════════════════ */

@theme {
  /* ── Colors ── */
  --color-rc-bg:          #07090F;
  --color-rc-surface:     #0D1120;
  --color-rc-surface-2:   #131828;
  --color-rc-border:      #1C2338;
  --color-rc-accent:      #22D3EE;
  --color-rc-accent-dark: #0EA5E9;
  --color-rc-text:        #E8EDF5;
  --color-rc-muted:       #64738F;
  --color-rc-success:     #4ADE80;
  --color-rc-warning:     #FBBF24;
  --color-rc-danger:      #F87171;

  /* ── Typography ── */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* ── Radius ── */
  --radius-card:  16px;
  --radius-btn:   10px;
  --radius-input: 10px;
  --radius-badge: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════ */
@layer base {
  html { scroll-behavior: smooth; }

  body {
    background-color: #07090F;
    color: #E8EDF5;
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  ::-webkit-scrollbar       { width: 4px; height: 4px; }
  ::-webkit-scrollbar-track { background: #07090F; }
  ::-webkit-scrollbar-thumb { background: #1C2338; border-radius: 2px; }

  ::selection { background: rgba(34, 211, 238, 0.2); color: #E8EDF5; }
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
@layer components {

  /* ── Layout ── */
  .rc-page {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* ── Cards ── */
  .rc-card {
    background: #0D1120;
    border: 1px solid #1C2338;
    border-radius: 16px;
    transition: border-color 0.2s ease;
  }
  .rc-card-hover:hover {
    border-color: rgba(34, 211, 238, 0.3);
    background: #131828;
  }
  .rc-card-accent {
    background: #131828;
    border: 1px solid #22D3EE;
    border-radius: 16px;
  }

  /* ── Buttons ── */
  .rc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  .rc-btn-sm  { padding: 6px 14px;  font-size: 0.8rem;  }
  .rc-btn-md  { padding: 10px 20px; font-size: 0.9rem;  }
  .rc-btn-lg  { padding: 13px 28px; font-size: 1rem;    }
  .rc-btn-full { width: 100%; justify-content: center;  }

  .rc-btn-primary {
    background: #22D3EE;
    color: #07090F;
  }
  .rc-btn-primary:hover {
    background: #0EA5E9;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(34, 211, 238, 0.2);
  }
  .rc-btn-primary:active { transform: translateY(0); }

  .rc-btn-ghost {
    background: transparent;
    color: #E8EDF5;
    border: 1px solid #1C2338;
  }
  .rc-btn-ghost:hover {
    border-color: #64738F;
    background: #0D1120;
  }

  .rc-btn-danger {
    background: rgba(248, 113, 113, 0.1);
    color: #F87171;
    border: 1px solid rgba(248, 113, 113, 0.25);
  }
  .rc-btn-danger:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.5);
  }

  /* ── Form elements ── */
  .rc-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64738F;
    margin-bottom: 6px;
  }

  .rc-input {
    width: 100%;
    padding: 10px 14px;
    background: #07090F;
    color: #E8EDF5;
    color-scheme: dark;
    border: 1px solid #1C2338;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    box-sizing: border-box;
  }
  .rc-input:focus {
    border-color: #22D3EE;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
  }
  .rc-input::placeholder { color: #64738F; }
  .rc-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .rc-select {
    width: 100%;
    padding: 10px 14px;
    background: #07090F;
    color: #E8EDF5;
    border: 1px solid #1C2338;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364738F' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
  }
  .rc-select:focus {
    border-color: #22D3EE;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
  }

  .rc-textarea {
    width: 100%;
    padding: 10px 14px;
    background: #07090F;
    color: #E8EDF5;
    border: 1px solid #1C2338;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
  }
  .rc-textarea:focus {
    border-color: #22D3EE;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
  }
  .rc-textarea::placeholder { color: #64738F; }

  .rc-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: #64738F;
    margin-top: 5px;
  }

  .rc-field { margin-bottom: 20px; }

  /* ── Badges ── */
  .rc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .rc-badge-success  { background: rgba(74, 222, 128, 0.1);  color: #4ADE80; border: 1px solid rgba(74, 222, 128, 0.2);  }
  .rc-badge-warning  { background: rgba(251, 191, 36, 0.1);  color: #FBBF24; border: 1px solid rgba(251, 191, 36, 0.2);  }
  .rc-badge-danger   { background: rgba(248, 113, 113, 0.1); color: #F87171; border: 1px solid rgba(248, 113, 113, 0.2); }
  .rc-badge-accent   { background: rgba(34, 211, 238, 0.1);  color: #22D3EE; border: 1px solid rgba(34, 211, 238, 0.2);  }
  .rc-badge-muted    { background: rgba(100, 115, 143, 0.1); color: #64738F; border: 1px solid rgba(100, 115, 143, 0.2); }

  /* ── Flash messages ── */
  .rc-flash-notice {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #4ADE80;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .rc-flash-alert {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #F87171;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* ── Error messages (form) ── */
  .rc-errors {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
  }
  .rc-errors h3 { font-size: 0.8rem; color: #F87171; font-weight: 600; margin: 0 0 8px; }
  .rc-errors li { font-size: 0.83rem; color: #FCA5A5; margin-bottom: 2px; list-style: none; padding-left: 14px; position: relative; }
  .rc-errors li::before { content: '←'; position: absolute; left: 0; color: #F87171; }

  /* ── Section header ── */
  .rc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid #1C2338;
    margin-bottom: 20px;
  }
  .rc-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #E8EDF5;
  }

  /* ── Page header ── */
  .rc-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
  }
  .rc-page-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    color: #E8EDF5;
    margin: 0 0 4px;
  }
  .rc-page-subtitle { font-size: 0.875rem; color: #64738F; margin: 0; }

  /* ── Divider ── */
  .rc-divider { height: 1px; background: #1C2338; margin: 24px 0; }

  /* ── Empty state ── */
  .rc-empty {
    text-align: center;
    padding: 48px 24px;
    color: #64738F;
  }
  .rc-empty svg { opacity: 0.3; margin: 0 auto 12px; }
  .rc-empty p   { font-size: 0.875rem; margin: 0 0 16px; }

  /* ── Table ── */
  .rc-table { width: 100%; border-collapse: collapse; }
  .rc-table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64738F;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #1C2338;
  }
  .rc-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    color: #E8EDF5;
    border-bottom: 1px solid #1C2338;
  }
  .rc-table tr:last-child td { border-bottom: none; }
  .rc-table tbody tr:hover { background: #0D1120; }

  /* ── List row ── */
  .rc-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #1C2338;
    transition: background 0.15s ease;
  }
  .rc-list-row:last-child { border-bottom: none; }
  .rc-list-row:hover { background: #0D1120; }

  /* ── Stat card ── */
  .rc-stat {
    background: #0D1120;
    border: 1px solid #1C2338;
    border-radius: 16px;
    padding: 20px 24px;
  }
  .rc-stat-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: #22D3EE;
    display: block;
    margin-bottom: 4px;
  }
  .rc-stat-label { font-size: 0.8rem; color: #64738F; }

  /* ── Nav ── */
  .rc-nav {
    background: rgba(7, 9, 15, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #1C2338;
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .rc-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64738F;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    height: 100%;
  }
  .rc-nav-link:hover  { color: #E8EDF5; }
  .rc-nav-link-active { color: #22D3EE; border-bottom-color: #22D3EE; }

  /* ── Auth layout ── */
  .rc-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #07090F;
  }
  .rc-auth-card {
    width: 100%;
    background: #0D1120;
    border: 1px solid #1C2338;
    border-radius: 16px;
    padding: 36px;
  }
  .rc-auth-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #E8EDF5;
    margin: 0 0 6px;
  }
  .rc-auth-subtitle { color: #64738F; font-size: 0.875rem; margin: 0 0 28px; }

  /* ── Waveform bars (logo) ── */
  @keyframes rc-bar1 { 0%,100%{height:6px}  50%{height:20px} }
  @keyframes rc-bar2 { 0%,100%{height:18px} 50%{height:6px}  }
  @keyframes rc-bar3 { 0%,100%{height:12px} 50%{height:26px} }
  @keyframes rc-bar4 { 0%,100%{height:22px} 50%{height:8px}  }

  .rc-wbar {
    width: 3px; border-radius: 2px;
    display: inline-block; background: currentColor;
  }
  .rc-wbar:nth-child(1){ animation: rc-bar1 1.2s ease-in-out infinite; }
  .rc-wbar:nth-child(2){ animation: rc-bar2 0.9s ease-in-out infinite; }
  .rc-wbar:nth-child(3){ animation: rc-bar3 1.4s ease-in-out infinite; }
  .rc-wbar:nth-child(4){ animation: rc-bar4 1.0s ease-in-out infinite; }

  /* ── Pulse dot ── */
  @keyframes rc-pulse {
    0%  { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
    100%{ box-shadow: 0 0 0 8px rgba(34, 211, 238, 0);  }
  }
  .rc-pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%; background: #22D3EE;
    flex-shrink: 0;
    animation: rc-pulse 1.8s ease-out infinite;
  }
}
