/* ==============================================================================
   SMSBower Gmail Portal - Main Stylesheet (Modern Sidebar Layout)
   ============================================================================== */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --danger-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --success-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --sidebar-bg: #0f172a;
    --sidebar-active: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 260px;
    --surface-bg: #f8fafc;
    --card-border: rgba(0, 0, 0, 0.07);
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background-color: var(--surface-bg);
    margin: 0;
    padding: 0;
}

/* ==============================================================================
   Layout & Sidebar Structure
   ============================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.25s ease-in-out;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--surface-bg);
    transition: margin-left 0.25s ease-in-out;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

/* Sidebar Navigation Items */
.sidebar-menu {
    flex: 1;
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
    list-style: none;
    margin: 0;
}

.sidebar-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.5rem 0.75rem 0.25rem;
}

.sidebar-item {
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.sidebar-link i {
    width: 20px;
    font-size: 1rem;
    text-align: center;
}

.sidebar-link:hover {
    color: var(--sidebar-text-active);
    background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Sidebar Footer & User Profile */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(0, 0, 0, 0.15);
}

.avatar-sm {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

/* Mobile Toggler Header */
.mobile-topbar {
    display: none;
    background-color: var(--sidebar-bg);
    color: #ffffff;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

/* ==============================================================================
   6-OTP Slots Grid & Cards
   ============================================================================== */
.otp-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.otp-slot-card {
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    background-color: #ffffff;
    padding: 1rem;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.otp-slot-card .slot-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* Slot States */
.otp-slot-card.slot-received {
    border: 2px solid #86efac;
    background-color: #f0fdf4;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1);
}

.otp-slot-card.slot-waiting {
    border: 2px solid #93c5fd;
    background-color: #eff6ff;
    animation: pulse-border 2s infinite ease-in-out;
}

.otp-slot-card.slot-empty {
    border: 2px dashed #e2e8f0;
    background-color: #f8fafc;
    opacity: 0.75;
}

@keyframes pulse-border {
    0%, 100% { border-color: #93c5fd; }
    50% { border-color: #3b82f6; }
}

.otp-slot-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #059669;
}

/* ==============================================================================
   Timer Widget
   ============================================================================== */
.timer-card {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

#timer-display {
    letter-spacing: 2px;
}

/* ==============================================================================
   Alerts & Banners
   ============================================================================== */
.loud-alert-banner {
    background: linear-gradient(90deg, #b91c1c, #ef4444, #b91c1c);
    background-size: 200% 200%;
    animation: alert-pulse 1.5s ease infinite;
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

@keyframes alert-pulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Table Styling */
.table th {
    font-size: 0.825rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #64748b;
}

.btn-gradient {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
}
.btn-gradient:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #fff;
}
