/* ================================================================
   Fast SMS OTP Panel – Live SMS OTP Tracker
   Theme System: Modern Dark & Light Mode + Mobile Optimized
   Created by Novatix Solution
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* ── Light Mode (Default) ────────────────────────────────── */
    --bg-color:          #eef3fb;
    --bg-glow-1:         rgba(37, 99, 235, 0.10);
    --bg-glow-2:         rgba(99, 179, 237, 0.08);
    --card-bg:           #ffffff;
    --border-color:      rgba(59, 130, 246, 0.15);
    --text-primary:      #0f172a;
    --text-secondary:    #64748b;
    --text-muted:        #94a3b8;
    --primary-color:     #2563eb;
    --primary-hover:     #1d4ed8;
    --primary-light:     rgba(37, 99, 235, 0.08);
    --accent-color:      #16a34a;
    --accent-light:      rgba(22, 163, 74, 0.09);
    --danger-color:      #dc2626;
    --warning-color:     #d97706;
    --toggle-bg:         #ffffff;
    --toggle-border:     rgba(59, 130, 246, 0.20);
    --number-box-bg:     linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(59, 130, 246, 0.04));
    --number-box-border: rgba(37, 99, 235, 0.28);
    --sms-item-bg:       #f8faff;
    --sms-item-border:   rgba(37, 99, 235, 0.12);
    --otp-box-bg:        rgba(37, 99, 235, 0.04);
    --otp-box-border:    rgba(37, 99, 235, 0.20);
    --input-bg:          #f1f5fd;
    --input-border:      rgba(37, 99, 235, 0.18);
    --btn-refresh-bg:    #f1f5fd;
    --alert-bg:          rgba(220, 38, 38, 0.06);
    --alert-border:      rgba(220, 38, 38, 0.35);
    --alert-text:        #7f1d1d;
    --alert-strong:      #dc2626;
    --shadow-sm:         0 1px 4px rgba(37, 99, 235, 0.07);
    --shadow-md:         0 4px 20px rgba(37, 99, 235, 0.10);
    --shadow-lg:         0 10px 40px rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] {
    /* ── Dark Mode ───────────────────────────────────────────── */
    --bg-color:          #0b0f19;
    --bg-glow-1:         rgba(59, 130, 246, 0.15);
    --bg-glow-2:         rgba(139, 92, 246, 0.12);
    --card-bg:           #111827;
    --border-color:      rgba(59, 130, 246, 0.22);
    --text-primary:      #f8fafc;
    --text-secondary:    #94a3b8;
    --text-muted:        #64748b;
    --primary-color:     #3b82f6;
    --primary-hover:     #60a5fa;
    --primary-light:     rgba(59, 130, 246, 0.15);
    --accent-color:      #22c55e;
    --accent-light:      rgba(34, 197, 94, 0.15);
    --danger-color:      #ef4444;
    --warning-color:     #f59e0b;
    --toggle-bg:         #1f293d;
    --toggle-border:     rgba(59, 130, 246, 0.30);
    --number-box-bg:     linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(30, 58, 138, 0.30));
    --number-box-border: rgba(59, 130, 246, 0.40);
    --sms-item-bg:       #162032;
    --sms-item-border:   rgba(59, 130, 246, 0.20);
    --otp-box-bg:        rgba(59, 130, 246, 0.08);
    --otp-box-border:    rgba(59, 130, 246, 0.30);
    --input-bg:          #162032;
    --input-border:      rgba(59, 130, 246, 0.30);
    --btn-refresh-bg:    #1e293b;
    --alert-bg:          rgba(239, 68, 68, 0.10);
    --alert-border:      rgba(239, 68, 68, 0.38);
    --alert-text:        #fca5a5;
    --alert-strong:      #f87171;
    --shadow-sm:         0 1px 6px rgba(0, 0, 0, 0.40);
    --shadow-md:         0 4px 24px rgba(0, 0, 0, 0.50);
    --shadow-lg:         0 12px 48px rgba(0, 0, 0, 0.65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(ellipse at 20% 0%, var(--bg-glow-1) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, var(--bg-glow-2) 0%, transparent 55%);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 14px 24px;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* ── Brand Header ─────────────────────────────────────────── */
.brand-header {
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 14px;
}

.brand-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.30);
    flex-shrink: 0;
}

.brand-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.brand-name {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .brand-name {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Header Actions (Home Button + Theme Toggle) ─────────── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--toggle-bg);
    border: 1.5px solid var(--toggle-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.20);
}

.icon-btn:active {
    transform: scale(0.94);
}

.icon-btn svg {
    width: 19px;
    height: 19px;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .icon-btn {
    color: var(--text-muted);
}

[data-theme="dark"] .icon-btn:hover {
    color: var(--primary-color);
}

/* Light mode shows moon icon */
:root:not([data-theme="dark"]) .theme-toggle-btn .sun-icon {
    display: none;
}
:root:not([data-theme="dark"]) .theme-toggle-btn .moon-icon {
    display: block;
    color: #475569;
}

/* Dark mode shows sun icon */
[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: block;
    color: #fbbf24;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: none;
}

/* ── Layout Container ─────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 480px;
}

.text-center { text-align: center; }

/* ── Card ─────────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ── Typography ───────────────────────────────────────────── */
h1 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] h1 {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.30rem;
    font-weight: 700;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.55;
    margin-bottom: 20px;
}

/* ── Input + Button (Index page) ──────────────────────────── */
.input-group {
    display: flex;
    gap: 10px;
}

input {
    flex: 1;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.98rem;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}

input::placeholder { color: var(--text-muted); }

input:focus {
    border-color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px var(--primary-light);
}

button {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.30);
    letter-spacing: 0.01em;
}

button:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.38);
    transform: translateY(-1px);
}

button:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.20);
}

/* ── Blinking Alert Banner ────────────────────────────────── */
.alert-banner-blinking {
    background: var(--alert-bg);
    border: 1.5px solid var(--alert-border);
    border-radius: 12px;
    padding: 11px 13px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: alertBlink 1.8s infinite ease-in-out;
}

.alert-banner-blinking svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--danger-color);
}

.alert-banner-text {
    font-size: 0.81rem;
    line-height: 1.45;
    color: var(--alert-text);
    font-weight: 500;
}

.alert-banner-text strong {
    color: var(--alert-strong);
    text-decoration: underline;
    font-weight: 700;
}

@keyframes alertBlink {
    0%, 100% {
        border-color: var(--alert-border);
        box-shadow: 0 0 12px rgba(220, 38, 38, 0.20);
    }
    50% {
        border-color: transparent;
        box-shadow: none;
    }
}

/* ── Tracker Card Header ──────────────────────────────────── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 12px;
}

/* ── Status Badge ─────────────────────────────────────────── */
.status-badge {
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.status-badge.pending {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.30);
}

[data-theme="dark"] .status-badge.pending {
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.35);
}

.status-badge.complete,
.status-badge.completed {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, 0.30);
}

[data-theme="dark"] .status-badge.complete,
[data-theme="dark"] .status-badge.completed {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.35);
}

.status-badge.expired {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.30);
}

[data-theme="dark"] .status-badge.expired {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}

/* ── Phone Number Display ─────────────────────────────────── */
.number-display {
    font-size: clamp(1.4rem, 5.5vw, 1.85rem);
    font-weight: 800;
    text-align: center;
    color: var(--primary-color);
    background: var(--number-box-bg);
    border: 1.5px dashed var(--number-box-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 18px;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
    user-select: all;
    cursor: pointer;
}

.number-display:hover {
    filter: brightness(1.05);
}

/* ── SMS Section ──────────────────────────────────────────── */
.sms-section { text-align: left; }

.sms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sms-header h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Refresh button */
.btn-refresh {
    background: var(--btn-refresh-bg);
    border: 1px solid var(--input-border);
    color: var(--primary-color);
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: none;
    letter-spacing: 0;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    box-shadow: none;
    transform: none;
}

.btn-refresh:active {
    transform: scale(0.97);
}

/* Loading / connecting status bar */
#loading-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--primary-color);
    background: var(--primary-light);
    border: 1px dashed var(--input-border);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.20);
    border-top: 2.5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* Refresh spin icon */
.icon-spin {
    width: 13px;
    height: 13px;
}

.icon-spin.active {
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Messages List ────────────────────────────────────────── */
.messages-list {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Individual SMS message card */
.sms-item {
    background: var(--sms-item-bg);
    border: 1px solid var(--sms-item-border);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 13px 14px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.sms-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

/* ── OTP Verification Code Box (Clean Digits Only) ────────── */
.otp-box-container {
    background: var(--otp-box-bg);
    border: 1px solid var(--otp-box-border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 9px;
}

.otp-label {
    font-size: 0.70rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.otp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.otp-code {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 3px;
    font-family: 'Outfit', monospace;
    user-select: all;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Copy Button ─────────────────────────────────────────── */
.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    font-size: 0.80rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    letter-spacing: 0.2px;
    min-height: 34px;
}

.btn-copy:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.btn-copy:active {
    transform: scale(0.95);
}

.btn-copy.copied {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.btn-copy svg {
    flex-shrink: 0;
}

.sms-item-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: anywhere;
    padding: 0 2px;
}

/* ── No Messages / Empty State ───────────────────────────── */
.no-messages {
    text-align: center;
    color: var(--text-secondary);
    padding: 24px 0;
    font-size: 0.90rem;
    border: 1.5px dashed var(--border-color);
    border-radius: 10px;
    background: var(--sms-item-bg);
}

/* ── Error Card ───────────────────────────────────────────── */
.error-icon {
    width: 52px;
    height: 52px;
    color: var(--danger-color);
    margin: 0 auto;
}

.error-text {
    color: var(--danger-color);
    font-size: 0.86rem;
}

.btn-home {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    padding: 10px 22px;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.btn-home:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
    transform: translateY(-1px);
}

/* ── Toast notification ───────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: #1e40af;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transition: transform 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    pointer-events: none;
}

/* ── Home Page Information & Guide Card ──────────────────── */
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
    text-align: left;
    transition: all 0.3s ease;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--border-color);
}

.info-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-header-icon svg {
    width: 17px;
    height: 17px;
}

.info-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--sms-item-bg);
    border: 1px solid var(--sms-item-border);
    border-radius: 12px;
    padding: 11px 13px;
    transition: all 0.2s ease;
}

.info-item:hover {
    border-color: var(--border-color);
    transform: translateY(-1px);
}

.info-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-item-icon svg {
    width: 15px;
    height: 15px;
}

.info-item-body h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.info-item-body p {
    font-size: 0.79rem;
    color: var(--text-secondary);
    line-height: 1.42;
    margin-bottom: 0;
}

.info-notice {
    background: var(--alert-bg);
    border: 1.5px solid var(--alert-border);
    border-radius: 11px;
    padding: 10px 12px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--alert-text);
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.info-notice svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    color: var(--danger-color);
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── Footer Copyright ─────────────────────────────────────── */
.site-footer {
    width: 100%;
    max-width: 480px;
    text-align: center;
    padding: 10px 0 4px;
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.site-footer span {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ── Mobile Optimization (Screens <= 480px) ───────────────── */
@media (max-width: 480px) {
    body { padding: 0 10px 20px; }

    .brand-header { padding: 14px 0 12px; }
    .brand-name   { font-size: 1.22rem; }
    .brand-icon   { width: 34px; height: 34px; border-radius: 9px; }
    .brand-icon svg { width: 18px; height: 18px; }
    .header-actions { gap: 6px; }
    .icon-btn, .theme-toggle-btn { width: 34px; height: 34px; border-radius: 9px; }
    .icon-btn svg, .theme-toggle-btn svg { width: 17px; height: 17px; }

    .card {
        padding: 16px 13px;
        border-radius: 14px;
        margin-bottom: 12px;
    }

    h1 { font-size: 1.55rem; }
    h2 { font-size: 1.10rem; }

    .number-display {
        font-size: 1.45rem !important;
        padding: 12px !important;
        margin-bottom: 14px !important;
        border-radius: 11px !important;
    }

    .sms-header h3  { font-size: 0.90rem; }

    .btn-refresh {
        padding: 4px 8px;
        font-size: 0.72rem;
    }

    .sms-item {
        padding: 11px 12px !important;
        border-radius: 10px !important;
    }

    .otp-box-container {
        padding: 8px 10px !important;
        border-radius: 8px !important;
        margin-bottom: 7px !important;
    }

    .otp-code {
        font-size: 1.40rem !important;
        letter-spacing: 2px !important;
    }

    .btn-copy {
        padding: 4px 10px !important;
        font-size: 0.74rem !important;
        min-height: 30px !important;
    }

    .sms-item-text {
        font-size: 0.78rem !important;
        line-height: 1.40 !important;
    }

    #loading-status-bar {
        padding: 7px 10px !important;
        font-size: 0.74rem !important;
        margin-bottom: 10px !important;
    }

    .alert-banner-blinking {
        padding: 9px 10px !important;
        border-radius: 10px !important;
        margin-bottom: 12px !important;
        gap: 8px !important;
    }

    .alert-banner-text {
        font-size: 0.76rem !important;
        line-height: 1.40 !important;
    }
}

/* ── SMS Slot Badge (SMS #1, SMS #2, SMS #3) ─────────────────── */
.sms-slot-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--primary-light);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
    padding: 2px 8px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.03em;
}

/* ── Copy Full Message Button ─────────────────────────────────── */
.sms-copy-full {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.btn-copy-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-copy-text:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.btn-copy-text svg {
    opacity: 0.7;
    flex-shrink: 0;
}

/* ── Poller Dual-Timer Bar ───────────────────────────────────── */
.poller-timer-bar {
    margin-bottom: 20px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    transition: all 0.3s ease;
}

.poller-timer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}

.poller-timer-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pulsing radar dot */
.live-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    position: relative;
    background: #3b82f6;
    box-shadow: 0 0 0 rgba(59, 130, 246, 0.4);
    transition: background 0.3s ease;
}

.live-pulse.active-initial {
    background: #3b82f6;
    animation: radar-blue 1.8s infinite ease-out;
}

.live-pulse.active-post {
    background: #f59e0b;
    animation: radar-amber 1.8s infinite ease-out;
}

.live-pulse.expired {
    background: var(--text-muted);
    animation: none;
    box-shadow: none;
}

.live-pulse.completed {
    background: #10b981;
    animation: none;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

@keyframes radar-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes radar-amber {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.poller-status-label {
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.1px;
}

.poller-countdown {
    font-family: 'Outfit', monospace, monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px 8px;
    letter-spacing: 0.05em;
    min-width: 52px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.poller-countdown.post-sms {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.poller-countdown.expired {
    color: var(--text-muted);
    border-color: var(--border-color);
}

.poller-countdown.completed {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Progress track and fill */
.poller-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

[data-theme="dark"] .poller-progress-track {
    background: rgba(255, 255, 255, 0.08);
}

.poller-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 10px;
    transition: width 0.4s ease, background 0.3s ease;
}

.poller-progress-fill.post-sms {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.poller-progress-fill.expired {
    background: var(--text-muted);
    opacity: 0.3;
}

.poller-progress-fill.completed {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* Poller footer (shown when expired) */
.poller-timer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.btn-restart-poller {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-restart-poller:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-restart-poller:active {
    transform: scale(0.96);
}

@media (max-width: 480px) {
    .poller-timer-bar {
        padding: 10px 12px;
        margin-bottom: 16px;
    }
    .poller-status-label {
        font-size: 0.75rem;
    }
    .poller-countdown {
        font-size: 0.82rem;
        padding: 2px 6px;
    }
    .poller-timer-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .btn-restart-poller {
        align-self: flex-end;
    }
}

/* ── Notification Permission Prompt Card ──────────────────────── */
.notif-permission-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.04));
    border: 1.5px solid rgba(59, 130, 246, 0.35);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
    animation: slideDownFade 0.4s ease-out;
}

[data-theme="dark"] .notif-permission-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(30, 58, 138, 0.25));
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notif-bell-icon {
    width: 36px;
    height: 36px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.notif-bell-icon svg {
    width: 19px;
    height: 19px;
    animation: ring-bell 2.5s infinite ease-in-out;
    transform-origin: top center;
}

@keyframes ring-bell {
    0%, 80%, 100% { transform: rotate(0); }
    82% { transform: rotate(14deg); }
    86% { transform: rotate(-12deg); }
    90% { transform: rotate(10deg); }
    94% { transform: rotate(-6deg); }
    98% { transform: rotate(2deg); }
}

.notif-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-card-text strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-card-text span {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.notif-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-allow-notif {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-allow-notif:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.btn-allow-notif:active {
    transform: scale(0.96);
}

.btn-later-notif {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-later-notif:hover {
    color: var(--text-primary);
    background: var(--primary-light);
}

@media (max-width: 480px) {
    .notif-permission-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
        gap: 10px;
    }
    .notif-card-actions {
        width: 100%;
        justify-content: space-between;
    }
    .btn-allow-notif {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
    }
}


