/* ===================================================
   CHIRAG SOLUTIONS – MEET AI
   Mobile-First | Poppins Font | Blue-Black Theme
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg:           #060810;
    --bg2:          #0d1117;
    --bg3:          #141a24;
    --card:         rgba(255,255,255,0.04);
    --card-border:  rgba(255,255,255,0.08);
    --accent:       #3b82f6;
    --accent2:      #60a5fa;
    --accent-dark:  #1d4ed8;
    --accent-glow:  rgba(59,130,246,0.25);
    --green:        #22c55e;
    --red:          #ef4444;
    --text:         #f1f5f9;
    --text2:        #94a3b8;
    --text3:        #475569;
    --radius:       18px;
    --radius-sm:    10px;
    --shadow:       0 4px 24px rgba(0,0,0,0.4);
    --font:         'Poppins', sans-serif;
    --nav-height:   72px;
    --top-height:   64px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    padding-top: var(--top-height);
    padding-bottom: calc(var(--nav-height) + 16px);
    position: relative;
}

/* ── Background Orbs ── */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.orb-1 {
    width: 300px; height: 300px;
    background: rgba(59,130,246,0.14);
    top: -80px; right: -80px;
    animation: floatOrb 8s ease-in-out infinite;
}
.orb-2 {
    width: 250px; height: 250px;
    background: rgba(29,78,216,0.10);
    bottom: 200px; left: -80px;
    animation: floatOrb 10s ease-in-out infinite reverse;
}
.orb-3 {
    width: 200px; height: 200px;
    background: rgba(96,165,250,0.07);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: floatOrb 12s ease-in-out infinite;
}
@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(20px, -20px); }
}

/* ── Top Bar ── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--top-height);
    background: rgba(6,8,16,0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
}
.topbar-inner {
    max-width: 480px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.brand-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--text);
}
.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    padding: 4px 12px 4px 4px;
}
.user-avatar {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
}
.user-name-short { font-size: 0.85rem; font-weight: 500; color: var(--text2); }

/* ── Main Content ── */
.main-content {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px 8px;
    position: relative;
    z-index: 1;
}

/* ── Greeting ── */
.greeting-section  { margin-bottom: 24px; }
.greeting-sub      { font-size: 0.9rem; color: var(--text2); margin-bottom: 4px; font-weight: 400; }
.greeting-name     { font-size: 1.8rem; font-weight: 800; color: var(--text); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 6px; }
.greeting-hint     { font-size: 0.85rem; color: var(--text3); font-weight: 400; }

/* ── Cards ── */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.card-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 400;
    outline: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
}
.form-input::placeholder { color: var(--text3); }
.form-input:focus {
    border-color: var(--accent);
    background: rgba(59,130,246,0.07);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Pill Select ── */
.pill-select { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: var(--text2);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* ── Recorder Card ── */
.recorder-card { text-align: center; padding: 28px 20px; position: relative; overflow: hidden; }
.recorder-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}
.recorder-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); transition: all 0.3s ease; }
.status-dot.idle      { background: var(--text3); }
.status-dot.recording { background: var(--red); animation: blink 1s ease infinite; }
.status-dot.stopped   { background: var(--accent); }

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

#statusText { font-size: 0.78rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.1em; }

/* Timer */
.timer-display { margin-bottom: 20px; }
#timerText { font-size: 2.8rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; display: block; line-height: 1; }
.timer-label { font-size: 0.72rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }

/* Waveform */
.waveform { display: flex; align-items: center; justify-content: center; gap: 3px; height: 48px; margin-bottom: 28px; }
.wave-bar { width: 3px; height: 6px; background: var(--text3); border-radius: 2px; transition: height 0.1s ease, background 0.3s ease; }
body.recording .wave-bar { background: var(--accent); animation: wave 0.6s ease infinite; animation-delay: var(--delay); }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 32px; } }

/* Record Button */
.record-btn { position: relative; width: 90px; height: 90px; border-radius: 50%; border: none; background: none; cursor: pointer; margin: 0 auto 14px; display: block; transition: transform 0.2s ease; }
.record-btn:active { transform: scale(0.94); }
.record-btn-inner {
    width: 90px; height: 90px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 2;
    box-shadow: 0 8px 24px var(--accent-glow), 0 2px 8px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    color: white;
}
.record-btn-ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0.3; transition: all 0.3s ease; }
body.recording .record-btn-ring { animation: ringPulse 1.5s ease infinite; }
@keyframes ringPulse { 0% { inset: -6px; opacity: 0.5; } 100% { inset: -18px; opacity: 0; } }
body.recording .record-btn-inner { background: linear-gradient(135deg, var(--red), #b91c1c); box-shadow: 0 8px 24px rgba(239,68,68,0.3); }
.record-hint { font-size: 0.82rem; color: var(--text3); font-weight: 400; }

/* Post-record buttons */
.post-record-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-primary {
    flex: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 16px var(--accent-glow);
    transition: all 0.2s ease;
}
.btn-primary:active    { transform: scale(0.97); }
.btn-primary.full-width { flex: unset; width: 100%; }
.btn-secondary {
    flex: 1;
    background: rgba(255,255,255,0.06);
    color: var(--text2);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.2s ease;
}

/* ── Processing Card ── */
.processing-card { text-align: center; padding: 32px 20px; }
.processing-animation { position: relative; width: 80px; height: 80px; margin: 0 auto 20px; }
.proc-ring, .proc-ring-2 { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.proc-ring  { border-top-color: var(--accent); border-right-color: var(--accent); animation: spin 1s linear infinite; }
.proc-ring-2 { inset: 8px; border-bottom-color: var(--accent2); border-left-color: var(--accent2); animation: spin 1.5s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.proc-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--text2); }
.processing-title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.processing-sub   { font-size: 0.85rem; color: var(--text2); margin-bottom: 24px; font-weight: 400; }
.processing-steps { display: flex; flex-direction: column; gap: 10px; text-align: left; max-width: 200px; margin: 0 auto; }
.proc-step { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--text3); font-weight: 400; transition: all 0.3s ease; }
.proc-step.active { color: var(--accent); font-weight: 500; }
.proc-step.done   { color: var(--green); }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); flex-shrink: 0; transition: background 0.3s ease; }
.proc-step.active .step-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); animation: blink 0.8s ease infinite; }
.proc-step.done   .step-dot { background: var(--green); }

/* ── Success Card ── */
.success-card { text-align: center; padding: 32px 20px; }
.success-icon {
    width: 72px; height: 72px;
    background: rgba(34,197,94,0.12);
    border: 2px solid rgba(34,197,94,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--green); margin: 0 auto 16px;
    animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.success-sub   { color: var(--text2); font-size: 0.9rem; margin-bottom: 16px; font-weight: 400; }
.meet-id-badge {
    display: inline-block;
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.3);
    color: var(--accent2);
    font-weight: 700; font-size: 0.9rem;
    padding: 6px 16px; border-radius: 50px; margin-bottom: 20px;
}

/* ── Recent Meets ── */
.recent-section { margin-top: 4px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title  { font-size: 1rem; font-weight: 700; color: var(--text); }
.see-all        { font-size: 0.82rem; color: var(--accent2); text-decoration: none; font-weight: 500; }

.meet-card-mini {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--card); border: 1px solid var(--card-border);
    border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px;
    text-decoration: none; transition: all 0.2s ease; cursor: pointer;
}
.meet-card-mini:active { transform: scale(0.98); }
.meet-card-left  { flex: 1; }
.meet-type-badge {
    display: inline-block;
    background: rgba(59,130,246,0.1); color: var(--accent2);
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 3px 8px; border-radius: 4px; margin-bottom: 5px;
}
.meet-client    { font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 2px; }
.meet-company   { font-size: 0.8rem; color: var(--text2); font-weight: 400; }
.meet-card-right { text-align: right; }
.meet-date      { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.meet-time      { font-size: 0.72rem; color: var(--text3); margin-bottom: 6px; }
.meet-status    { font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.meet-status.sent    { color: var(--green); background: rgba(34,197,94,0.1); }
.meet-status.pending { color: var(--text3); background: rgba(255,255,255,0.05); }

/* ── Empty State ── */
.empty-state {
    text-align: center; padding: 32px 20px; color: var(--text3);
    background: var(--card); border: 1px dashed var(--card-border); border-radius: var(--radius-sm);
}
.empty-icon { font-size: 2rem; margin-bottom: 10px; }
.empty-state p { font-size: 0.87rem; font-weight: 400; }

/* ── Bottom Nav ── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(6,8,16,0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--card-border);
    display: flex; z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; color: var(--text3); text-decoration: none;
    font-size: 0.68rem; font-weight: 500; transition: all 0.2s ease;
    padding-top: 8px; letter-spacing: 0.03em;
}
.nav-item.active { color: var(--accent2); }
.nav-item svg { transition: transform 0.2s ease; }
.nav-item:active svg { transform: scale(0.88); }

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Login Page ── */
.login-wrap {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 1;
}
.login-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
    color: white; box-shadow: 0 8px 32px var(--accent-glow); margin-bottom: 20px;
}
.login-title { font-size: 1.8rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; margin-bottom: 6px; text-align: center; }
.login-sub   { font-size: 0.9rem; color: var(--text2); margin-bottom: 36px; text-align: center; font-weight: 400; }
.login-card  { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px; }
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white; border: none; border-radius: var(--radius-sm); padding: 16px;
    font-family: var(--font); font-size: 1rem; font-weight: 700; cursor: pointer;
    margin-top: 8px; box-shadow: 0 4px 20px var(--accent-glow); transition: all 0.2s ease; letter-spacing: 0.02em;
}
.login-btn:active { transform: scale(0.97); }

/* ── Admin ── */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.stat-card  { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.stat-number { font-size: 1.8rem; font-weight: 800; color: var(--accent2); display: block; }
.stat-label  { font-size: 0.72rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }

.notes-block {
    background: rgba(255,255,255,0.03); border: 1px solid var(--card-border);
    border-radius: var(--radius-sm); padding: 16px;
    font-size: 0.88rem; color: var(--text2); line-height: 1.7;
    white-space: pre-wrap; word-break: break-word; font-weight: 400;
}

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.86rem; margin-bottom: 14px; font-weight: 500; }
.alert-error   { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }

/* ── Search ── */
.search-input {
    width: 100%; background: var(--card); border: 1px solid var(--card-border);
    border-radius: 50px; padding: 12px 20px; color: var(--text);
    font-family: var(--font); font-size: 0.95rem; outline: none; margin-bottom: 16px; -webkit-appearance: none;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text3); }

/* Filter tabs */
.filter-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
    padding: 7px 14px; background: var(--card); border: 1px solid var(--card-border);
    border-radius: 50px; color: var(--text2); font-family: var(--font);
    font-size: 0.78rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: all 0.2s ease;
}
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: white; }

/* Spinner */
.spinner {
    width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite;
    display: inline-block; margin-right: 8px; vertical-align: middle;
}

/* ── Responsive Desktop ── */
@media (min-width: 640px) {
    .main-content { padding: 32px 24px 8px; }
    .greeting-name { font-size: 2.2rem; }
}
