/*
 * Domain Monitor - Liquid Glass Theme
 * Inspired by Apple macOS 26 Liquid Glass Design
 * Supports Dark & Light Mode
 */

/* ════════════════════════════════════════════════════════════════
                         ROOT VARIABLES (DARK)
   ════════════════════════════════════════════════════════════════ */

:root, [data-theme="dark"] {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;

    /* Glass colors */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.3);

    /* Accent colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);

    /* Status colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Text colors */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Blur */
    --blur-amount: 20px;
    --blur-heavy: 40px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* ════════════════════════════════════════════════════════════════
                         LIGHT THEME VARIABLES
   ════════════════════════════════════════════════════════════════ */

[data-theme="light"] {
    /* Colors */
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e5e5ea;

    /* Glass colors */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-border-hover: rgba(0, 0, 0, 0.15);
    --glass-shadow: rgba(0, 0, 0, 0.1);

    /* Text colors */
    --text-primary: rgba(0, 0, 0, 0.9);
    --text-secondary: rgba(0, 0, 0, 0.65);
    --text-muted: rgba(0, 0, 0, 0.4);

    /* Shadows - lighter for light theme */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.03) 0%, transparent 70%);
}

/* ════════════════════════════════════════════════════════════════
                         RESET & BASE
   ════════════════════════════════════════════════════════════════ */

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: bgPulse 20s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ════════════════════════════════════════════════════════════════
                         TYPOGRAPHY
   ════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

/* ════════════════════════════════════════════════════════════════
                         GLASS COMPONENTS
   ════════════════════════════════════════════════════════════════ */

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.glass:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-lg);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--glass-border-hover);
}

/* ════════════════════════════════════════════════════════════════
                         LAYOUT
   ════════════════════════════════════════════════════════════════ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-heavy));
    -webkit-backdrop-filter: blur(var(--blur-heavy));
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
}

/* ════════════════════════════════════════════════════════════════
                         NAVIGATION
   ════════════════════════════════════════════════════════════════ */

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close {
    display: none;
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.nav-menu {
    list-style: none;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.nav-link:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-link.nav-link-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

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

.nav-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 1rem 0;
}

/* Collapsible Nav Sections */
.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-section-toggle:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.nav-section-toggle span {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-section-toggle span i {
    width: 20px;
    text-align: center;
}

.nav-section-toggle .toggle-icon {
    transition: transform var(--transition-fast);
    font-size: 0.75rem;
}

.nav-section.open .nav-section-toggle .toggle-icon {
    transform: rotate(180deg);
}

.nav-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    padding-left: 1rem;
}

.nav-section.open .nav-submenu {
    max-height: 500px;
}

.nav-submenu li {
    margin-bottom: 0.125rem;
}

.nav-submenu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-submenu a:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.nav-submenu a.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.nav-submenu a i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}

/* ════════════════════════════════════════════════════════════════
                         HEADER
   ════════════════════════════════════════════════════════════════ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ════════════════════════════════════════════════════════════════
                         STAT CARDS
   ════════════════════════════════════════════════════════════════ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

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

.stat-card.success .stat-icon { color: var(--success); }
.stat-card.warning .stat-icon { color: var(--warning); }
.stat-card.danger .stat-icon { color: var(--danger); }
.stat-card.info .stat-icon { color: var(--info); }

/* ════════════════════════════════════════════════════════════════
                         BUTTONS
   ════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ════════════════════════════════════════════════════════════════
                         FORMS
   ════════════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23888' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em;
    padding-right: 2.5rem;
}

/* ════════════════════════════════════════════════════════════════
                         TABLES
   ════════════════════════════════════════════════════════════════ */

.table-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
}

.table th {
    background: var(--glass-bg);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
}

.table td {
    border-bottom: 1px solid var(--glass-border);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--glass-bg-hover);
}

/* ════════════════════════════════════════════════════════════════
                         BADGES
   ════════════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 100px;
    background: var(--glass-bg);
    color: var(--text-secondary);
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

/* ════════════════════════════════════════════════════════════════
                         ALERTS
   ════════════════════════════════════════════════════════════════ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

/* ════════════════════════════════════════════════════════════════
                         CHARTS
   ════════════════════════════════════════════════════════════════ */

.chart-container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* ════════════════════════════════════════════════════════════════
                         NOTIFICATIONS
   ════════════════════════════════════════════════════════════════ */

.notification-bell {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-heavy));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    gap: 0.75rem;
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: var(--glass-bg-hover);
}

.notification-item.unread {
    background: var(--glass-bg);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.notification-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════════════
                         LOGIN PAGE
   ════════════════════════════════════════════════════════════════ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-heavy));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.login-logo h1 {
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-tabs {
    display: flex;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 1.5rem;
}

.login-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-tab.active {
    background: var(--accent-gradient);
    color: white;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

/* ════════════════════════════════════════════════════════════════
                         DOMAIN CARDS
   ════════════════════════════════════════════════════════════════ */

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.domain-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.domain-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.domain-header {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.domain-prefix {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.domain-body {
    padding: 1.25rem;
}

.domain-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.domain-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.domain-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.domain-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-family: 'SF Mono', monospace;
}

.domain-footer {
    padding: 1rem 1.25rem;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.75rem;
}

/* ════════════════════════════════════════════════════════════════
                         ANIMATIONS
   ════════════════════════════════════════════════════════════════ */

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-slide-in {
    animation: slideIn 0.3s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════════════════
                         MOBILE HEADER
   ════════════════════════════════════════════════════════════════ */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-heavy));
    -webkit-backdrop-filter: blur(var(--blur-heavy));
    border-bottom: 1px solid var(--glass-border);
    z-index: 99;
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-btn,
.theme-toggle-mobile {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover,
.theme-toggle-mobile:hover {
    background: var(--glass-bg-hover);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-logo i {
    color: var(--accent-primary);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
}

/* ════════════════════════════════════════════════════════════════
                         MOBILE BOTTOM NAVIGATION
   ════════════════════════════════════════════════════════════════ */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-heavy));
    -webkit-backdrop-filter: blur(var(--blur-heavy));
    border-top: 1px solid var(--glass-border);
    z-index: 98;
    padding: 0.5rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item.active {
    color: var(--accent-primary);
}

.bottom-nav-item:hover {
    color: var(--text-primary);
}

/* ════════════════════════════════════════════════════════════════
                         RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }

    .sidebar-overlay.show {
        pointer-events: auto;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 300px;
        z-index: 100;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-close {
        display: flex;
    }

    .theme-toggle {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding-top: 80px;
        padding-bottom: 90px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    /* Better touch targets for mobile */
    .nav-section-toggle {
        padding: 1rem;
        min-height: 48px;
    }

    .nav-submenu a {
        padding: 0.875rem 1rem;
        min-height: 44px;
    }

    .nav-link {
        padding: 1rem;
        min-height: 48px;
    }
}

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

    .domain-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.35rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .page-title i {
        font-size: 1.1rem;
    }

    .main-content {
        padding: 1rem;
        padding-top: 70px;
        padding-bottom: 85px;
    }

    .glass-card {
        padding: 1rem;
        border-radius: var(--radius-lg);
    }

    /* Better card headers */
    .card-header {
        padding: 1rem;
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
    }

    .card-header h3 {
        font-size: 1rem;
        flex: 1;
        min-width: 200px;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .btn-sm {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
        min-height: 40px;
    }

    /* Horizontal scroll for tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .table-responsive .table {
        min-width: 600px;
    }

    /* Stack form elements */
    .form-row {
        flex-direction: column;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
    }

    /* Alert improvements */
    .alert {
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
    }

    .alert-close {
        background: none;
        border: none;
        color: inherit;
        padding: 0.5rem;
        cursor: pointer;
        margin-left: auto;
        min-width: 32px;
        min-height: 32px;
    }

    /* Better stat cards on mobile */
    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Quick actions grid */
    .quick-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .quick-actions .btn {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        text-align: center;
    }

    .quick-actions .btn i {
        font-size: 1.25rem;
    }
}

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

    .stat-card {
        padding: 0.875rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .login-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .page-title {
        font-size: 1.15rem;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-actions .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
    }

    /* Card adjustments */
    .card-header {
        padding: 0.875rem;
    }

    .card-header h3 {
        font-size: 0.95rem;
    }

    /* Mobile bottom nav adjustments */
    .mobile-bottom-nav {
        height: 65px;
    }

    .bottom-nav-item {
        font-size: 0.65rem;
    }

    .bottom-nav-item i {
        font-size: 1.15rem;
    }

    /* Form improvements */
    .form-group label {
        font-size: 0.85rem;
    }

    /* Badge sizing */
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    /* Toast positioning */
    #toast-container {
        top: 70px;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }

    .toast {
        width: 100%;
    }
}

/* ════════════════════════════════════════════════════════════════
                         UTILITIES
   ════════════════════════════════════════════════════════════════ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* ════════════════════════════════════════════════════════════════
                         PASSWORD STRENGTH METER
   ════════════════════════════════════════════════════════════════ */

.password-strength-meter {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: var(--glass-bg);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: all var(--transition-normal);
}

.strength-fill.weak { background: var(--danger); }
.strength-fill.fair { background: var(--warning); }
.strength-fill.good { background: var(--info); }
.strength-fill.strong { background: var(--success); }

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 50px;
}

.strength-text.weak { color: var(--danger); }
.strength-text.fair { color: var(--warning); }
.strength-text.good { color: var(--info); }
.strength-text.strong { color: var(--success); }

/* ════════════════════════════════════════════════════════════════
                         LOGOUT WARNING MODAL
   ════════════════════════════════════════════════════════════════ */

.logout-warning-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.logout-warning-content {
    text-align: center;
    padding: 2.5rem;
    max-width: 400px;
    margin: 1rem;
}

.logout-warning-icon {
    width: 80px;
    height: 80px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--warning);
    margin-bottom: 1.5rem;
}

.logout-warning-content h3 {
    margin-bottom: 0.75rem;
}

.logout-warning-content p {
    margin-bottom: 0.5rem;
}

/* ════════════════════════════════════════════════════════════════
                         CONFIRM MODAL
   ════════════════════════════════════════════════════════════════ */

.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.confirm-content {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
    margin: 1rem;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--info);
    margin-bottom: 1rem;
}

.confirm-content h3 {
    margin-bottom: 0.5rem;
}

.confirm-content p {
    margin-bottom: 1.5rem;
}

.confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* ════════════════════════════════════════════════════════════════
                         TOAST NOTIFICATIONS
   ════════════════════════════════════════════════════════════════ */

#toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
}

.toast {
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.toast-warning .toast-icon { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.toast-danger .toast-icon { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.toast-info .toast-icon { background: rgba(59, 130, 246, 0.2); color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

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

.toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

/* ════════════════════════════════════════════════════════════════
                         THEME TOGGLE BUTTON
   ════════════════════════════════════════════════════════════════ */

.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
}

/* ════════════════════════════════════════════════════════════════
                         LOGIN HISTORY TABLE
   ════════════════════════════════════════════════════════════════ */

.login-history {
    max-height: 300px;
    overflow-y: auto;
}

.login-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.login-history-item:last-child {
    border-bottom: none;
}

.login-history-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.login-history-ip {
    font-family: 'SF Mono', monospace;
    font-size: 0.875rem;
}

.login-history-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.login-history-device {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ════════════════════════════════════════════════════════════════
                         SYSTEM STATUS
   ════════════════════════════════════════════════════════════════ */

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.status-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.online { background: var(--success); }
.status-indicator.warning { background: var(--warning); }
.status-indicator.offline { background: var(--danger); }

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.status-value {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Mobile menu toggle removed - now using mobile-header */

/* ════════════════════════════════════════════════════════════════
                         PAGINATION
   ════════════════════════════════════════════════════════════════ */

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination-item {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination-item:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.pagination-item.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ════════════════════════════════════════════════════════════════
                         EXPORT BUTTONS
   ════════════════════════════════════════════════════════════════ */

.export-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-export:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

/* ════════════════════════════════════════════════════════════════
                         MOBILE UTILITIES & COMPONENTS
   ════════════════════════════════════════════════════════════════ */

/* Mobile-friendly grid system */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col {
    flex: 1;
    padding: 0 0.5rem;
    min-width: 0;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }

@media (max-width: 768px) {
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 480px) {
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Swipe-friendly card actions */
.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
}

.card-actions .btn {
    flex: 1;
    min-width: 100px;
}

@media (max-width: 480px) {
    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        width: 100%;
    }
}

/* Mobile info list */
.info-list {
    list-style: none;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
    gap: 1rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* Status pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-pill.active { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.status-pill.active::before { background: var(--success); }
.status-pill.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-pill.warning::before { background: var(--warning); }
.status-pill.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.status-pill.danger::before { background: var(--danger); }
.status-pill.info { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.status-pill.info::before { background: var(--info); }

/* Mobile action sheet */
.action-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform var(--transition-normal);
    z-index: 1000;
}

.action-sheet.show {
    transform: translateY(0);
}

.action-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
}

.action-sheet-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.action-sheet-close {
    background: var(--glass-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
}

.action-sheet-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
    color: var(--text-primary);
}

.action-sheet-item:hover {
    background: var(--glass-bg);
}

.action-sheet-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--accent-primary);
}

/* Mobile-friendly tabs */
.tabs {
    display: flex;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: 1;
    min-width: max-content;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab.active {
    background: var(--accent-gradient);
    color: white;
}

.tab:hover:not(.active) {
    background: var(--glass-bg-hover);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--glass-bg);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-hover) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Mobile-friendly dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 100;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-normal);
    z-index: 50;
}

.fab:hover {
    transform: scale(1.1);
}

.fab:active {
    transform: scale(0.95);
}

@media (min-width: 1025px) {
    .fab {
        bottom: 2rem;
    }
}

/* Pull to refresh indicator */
.pull-indicator {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: var(--bg-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    z-index: 50;
    transition: transform var(--transition-normal);
}

.pull-indicator.show {
    transform: translateX(-50%) translateY(0);
}

.pull-indicator i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Better focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Touch-friendly spacing */
@media (pointer: coarse) {
    .btn, .nav-link, .dropdown-item, .action-sheet-item {
        min-height: 44px;
    }
}

/* Hide on mobile/desktop helpers */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}

/* Scrollable content area */
.scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
    height: 4px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

/* Code display */
code {
    background: var(--glass-bg);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85em;
    color: var(--accent-primary);
}

pre {
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

pre code {
    background: none;
    padding: 0;
}
