/* ==========================================================================
   Masterstrap License Key Admin - Modern Dark Pro Design System
   ========================================================================== */

:root {
    --bg-main: #0c0f17;
    --bg-surface: #121722;
    --bg-card: #171d2b;
    --bg-card-hover: #1c2335;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-focus: #3b82f6;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.2);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #0ea5e9;
    --info-bg: rgba(14, 165, 233, 0.12);
    --purple: #8b5cf6;
    --purple-bg: rgba(139, 92, 246, 0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

    --header-height: 60px;
    --sidebar-width: 250px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================================================
   App Layout
   ========================================================================== */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(18, 23, 34, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Mock badge */
.badge-mock-mode {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-mock-mode::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

/* Language Toggle */
.lang-toggle-group {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

/* Notification Bell */
.header-icon-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px var(--danger);
}

/* Auth Status in Header */
.auth-header-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-auth-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-auth-status.authed {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-auth-status.locked {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Sidebar */
.app-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    overflow-y: auto;
    z-index: 900;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    padding: 12px 14px 6px;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.88rem;
    margin-bottom: 3px;
    transition: all 0.2s ease;
}

.nav-link i {
    font-size: 1.05rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Main Content Area */
.app-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 28px 32px;
    min-height: calc(100vh - var(--header-height));
    background: var(--bg-main);
}

/* Tab view visibility */
.tab-view {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.tab-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Page Headers & Action Rows
   ========================================================================== */

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

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 2px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons & Inputs
   ========================================================================== */

.btn-pro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary-pro {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary-pro:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary-pro {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
    color: var(--text-secondary);
}

.btn-secondary-pro:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-danger-pro {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger-pro:hover {
    background: #dc2626;
}

.btn-icon-action {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon-action:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.06);
}

.btn-icon-action.danger:hover {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
    background: var(--danger-bg);
}

.btn-icon-action.success:hover {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.4);
    background: var(--success-bg);
}

.btn-th-verify {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

.btn-th-verify:hover {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.4);
    background: var(--success-bg);
}

.form-control-pro {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 0.88rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-pro:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-label-pro {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ==========================================================================
   Stat Cards Grid
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 18px;
    }
    .stat-card-pro {
        padding: 12px 14px;
        border-radius: var(--radius-sm);
    }
    .stat-header { margin-bottom: 6px; }
    .stat-label { font-size: 0.7rem; line-height: 1.2; }
    .stat-icon { width: 28px; height: 28px; font-size: 0.95rem; }
    .stat-value { font-size: 1.25rem; line-height: 1.2; }
    .stat-compare { font-size: 0.68rem; margin-top: 4px; line-height: 1.2; }
}

@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card-pro {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card-pro:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.stat-icon.primary { background: var(--primary-glow); color: var(--primary); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.purple  { background: var(--purple-bg);  color: var(--purple);  }
.stat-icon.info    { background: var(--info-bg);    color: var(--info);    }

.stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-compare {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stat-compare.up { color: var(--success); }
.stat-compare.down { color: var(--danger); }

/* Compare inline buttons */
.compare-selector {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.btn-compare {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-compare.active {
    background: var(--primary);
    color: #ffffff;
}

/* ==========================================================================
   Pro Cards & Layouts
   ========================================================================== */

.card-pro {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header-pro {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title-pro {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.card-body-pro {
    padding: 20px;
}

.card-body-pro.p-0 {
    padding: 0;
}

/* 2-Column Dashboard Grid */
.dashboard-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 1080px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Data Tables
   ========================================================================== */

.table-container-pro {
    width: 100%;
    overflow-x: auto;
}

.table-pro {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.table-pro th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
}

.table-pro th.sortable {
    cursor: pointer;
    transition: color 0.15s ease;
}

.table-pro th.sortable:hover {
    color: var(--text-primary);
}

.table-pro th.sortable::after {
    content: ' ⇅';
    opacity: 0.35;
    font-size: 0.72rem;
    margin-left: 4px;
    display: inline-block;
}

.table-pro th.sortable.asc::after {
    content: ' ▲';
    opacity: 1;
    color: var(--primary);
}

.table-pro th.sortable.desc::after {
    content: ' ▼';
    opacity: 1;
    color: var(--primary);
}

.table-pro td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.table-pro tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.table-pro code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.83rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 6px;
    border-radius: 4px;
    color: #93c5fd;
}

/* Badges */
.badge-pro {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-success-pro { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning-pro { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger-pro  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(239, 68, 68, 0.3);  }
.badge-info-pro    { background: var(--info-bg);    color: var(--info);    border: 1px solid rgba(14, 165, 233, 0.3); }
.badge-purple-pro  { background: var(--purple-bg);  color: var(--purple);  border: 1px solid rgba(139, 92, 246, 0.3); }

/* Package badges - Exact Render Colors & Styles */
.pkg-lite {
    background: #22C55E !important;
    color: #ffffff !important;
}

.pkg-event {
    background: #EC4899 !important;
    color: #ffffff !important;
}

.pkg-pro {
    background: #1084D7 !important;
    color: #ffffff !important;
}

.pkg-premium {
    background: #8B5CF6 !important;
    color: #ffffff !important;
}

.pkg-vip, .pkg-lifetime {
    background: #FFCC33 !important;
    color: #1e293b !important;
    font-weight: 700;
}

.pkg-admin {
    background: linear-gradient(135deg, #7F1D1D 0%, #B91C1C 100%) !important;
    color: #ffffff !important;
    text-shadow: 0 0 4px rgba(255, 0, 0, 0.5);
    border: 1px solid #dc2626 !important;
    font-weight: 700;
}

.pkg-god, .pkg-privilege {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 9999px !important;
    padding: 0.3rem 0.75rem !important;
    font-weight: 700;
}

.pkg-free {
    background: #6B7280 !important;
    color: #ffffff !important;
}

.pkg-plus {
    background: #3B82F6 !important;
    color: #ffffff !important;
}

.pkg-max {
    background: #10B981 !important;
    color: #ffffff !important;
}

/* Action groups in table */
.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   Keys Mobile Card View (< 768px)
   ========================================================================== */

.keys-mobile-list {
    display: none;
}

@media (max-width: 768px) {
    .keys-desktop-table,
    .mobile-keys-desktop-table,
    .ios-keys-desktop-table {
        display: none !important;
    }
    .keys-mobile-list {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
    }
    .key-card-mobile-actions .btn-icon-action {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

.key-card-mobile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.key-card-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.key-card-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.key-card-mobile-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.key-card-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Forms & Create Key Container
   ========================================================================== */

.create-form-container {
    max-width: 680px;
    margin: 0 auto;
}

.form-group-pro {
    margin-bottom: 20px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* Custom Switch */
.switch-pro {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-pro input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-pro {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: .3s;
    border-radius: 24px;
}

.slider-pro:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider-pro {
    background-color: var(--primary);
}

input:checked + .slider-pro:before {
    transform: translateX(20px);
}

/* ==========================================================================
   Modals & Backdrop
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-dialog-pro {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 620px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header-pro {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-pro {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.btn-modal-close:hover {
    color: var(--text-primary);
}

.modal-body-pro {
    padding: 20px;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer-pro {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.digest-list {
    list-style: none;
}

.digest-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.digest-list li strong {
    color: var(--text-primary);
}

/* Detail modal layout */
.row-pro {
    display: flex;
    gap: 20px;
}

.col-half {
    flex: 1;
}

.detail-group {
    margin-bottom: 12px;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.detail-value {
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ==========================================================================
   Toasts
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3000;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-item.hide {
    opacity: 0;
    transform: translateY(-8px);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-body {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }

.toast-error { border-left: 4px solid var(--danger); }
.toast-error .toast-icon { color: var(--danger); }

.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-info { border-left: 4px solid var(--primary); }
.toast-info .toast-icon { color: var(--primary); }

/* ==========================================================================
   Mobile Bottom Navigation (< 768px)
   ========================================================================== */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(18, 23, 34, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}

.mobile-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: color 0.15s ease;
}

.mobile-nav-btn i {
    font-size: 1.2rem;
}

.mobile-nav-btn.active {
    color: var(--primary);
}

@media (max-width: 768px) {
    .app-sidebar {
        display: none;
    }
    .app-header {
        padding: 0 12px;
    }
    .badge-live-mode, .badge-mock-mode {
        display: none !important;
    }
    .header-actions {
        gap: 8px;
    }
    .page-header {
        margin-bottom: 16px;
        gap: 12px;
    }
    .page-title {
        font-size: 1.35rem;
    }
    .page-subtitle {
        font-size: 0.8rem;
    }
    .page-actions {
        width: 100%;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    .page-actions .btn-pro,
    .page-actions .compare-selector {
        font-size: 0.8rem;
    }
    .app-main {
        margin-left: 0;
        padding: 16px 12px 80px; /* Thêm padding bottom cho bottom nav */
    }
    .mobile-bottom-nav {
        display: flex;
    }
}
