/* ==========================================
   BUSINESS VOICER — DEEP GLASS DESIGN SYSTEM
   Brand Identity: "Professional AI Executive"
   2026 Glassmorphism Framework
   ========================================== */

/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

/* --- DESIGN TOKENS (BRAND GUIDELINES) --- */
:root {
    /* Backgrounds */
    --bg-abyss: #0B0F19;
    /* Main body — "digital space" */
    --bg-charcoal: #151B2B;
    /* Elements behind glass */
    --bg-glass: rgba(255, 255, 255, 0.03);

    /* Brand Gradient — "Electric Voice" */
    --gradient-brand: linear-gradient(to right, #3B82F6, #8B5CF6);
    --primary: #3B82F6;
    /* Electric Voice Blue */
    --secondary: #8B5CF6;
    /* Neural Purple */

    /* Text */
    --text-primary: #FFFFFF;
    --text-muted: #94A3B8;

    /* Glass Anatomy */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);

    /* Status */
    --success: #10b981;
    --danger: #ef4444;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-abyss);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* --- THE MASTER GLASS CLASS (Official Brand Spec) --- */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    transition: backdrop-filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: var(--glass-border-hover);
}

/* ==========================================
   LOGIN PAGE
   ========================================== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-abyss);
    position: relative;
}

/* Ambient glow orbs */
.glow-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #3B82F6 0%, transparent 65%);
    opacity: 0.10;
    border-radius: 50%;
    top: -200px;
    left: -200px;
    filter: blur(80px);
    animation: drift 18s infinite alternate ease-in-out;
    z-index: 0;
    pointer-events: none;
}

.orb-2 {
    background: radial-gradient(circle, #8B5CF6 0%, transparent 65%);
    top: auto;
    bottom: -200px;
    left: auto;
    right: -200px;
    animation-delay: -9s;
}

@keyframes drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(60px, 40px) scale(1.12);
    }
}

.login-container {
    width: 100%;
    max-width: 430px;
    padding: 3rem;
    position: relative;
    z-index: 10;
}

.logo-area {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-area h1 {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-area h1 span {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-area p {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.4rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* Form Elements */
.input-group {
    margin-bottom: 1.4rem;
}

.input-group label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.input-group input {
    width: 100%;
    padding: 0.9rem 1.1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.input-group input[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary Brand Button */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-brand);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    /* Glow hover — the "emitting light" effect */
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    /* Expands and brightens on hover */
    box-shadow: 0 6px 32px rgba(59, 130, 246, 0.5), 0 0 0 1px rgba(139, 92, 246, 0.3);
}

/* Alert messages — unified system */
.alert-box {
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

/* ==========================================
   DASHBOARD LAYOUT
   ========================================== */
.dashboard-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-abyss);
    position: relative;
}

/* Ambient glow for dashboard */
.glow-bg {
    position: fixed;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, #3B82F620 0%, transparent 60%);
    top: -300px;
    left: -100px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    width: 265px;
    flex-shrink: 0;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1.2rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
    background: rgba(21, 27, 43, 0.6);
}

.logo-area-small {
    padding: 0 0.8rem;
    margin-bottom: 2.5rem;
}

.logo-area-small h2 {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-area-small h2 span {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.nav li {
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.nav li .icon {
    font-style: normal;
    font-size: 1rem;
    flex-shrink: 0;
}

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

/* Active nav — gradient left border + subtle tint */
.nav li.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), transparent);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    padding-left: calc(1.1rem - 3px);
}

.sidebar-footer {
    padding: 0 0.8rem;
}

.logout-link {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

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

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2.5rem 3.5rem;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* Dashboard Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.top-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.top-header p {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 1rem;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 1.1rem 0.5rem 0.5rem;
    border-radius: 40px;
    flex-shrink: 0;
}

.profile-chip .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.35);
    flex-shrink: 0;
}

.profile-chip span {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    padding: 1.8rem 2rem;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.stat-card h3 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.stat-card .num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card .status-ok {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trend {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
}

.trend.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.trend.neutral {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
}

/* Data Tables */
.data-section {
    padding: 2.2rem 2.5rem;
    margin-bottom: 2rem;
}

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

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-secondary {
    padding: 0.65rem 1.3rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

.table-container {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table th {
    text-align: left;
    padding: 0.9rem 1rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--glass-border);
}

.modern-table td {
    padding: 1.3rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    font-family: var(--font-body);
    font-size: 0.92rem;
    vertical-align: middle;
    color: var(--text-muted);
}

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

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

.fw-600 {
    font-weight: 600;
    color: var(--text-primary);
}

.badge {
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

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

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem !important;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* About Page Specifics */
.about-card {
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.about-card h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.3rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.about-list li:hover {
    transform: translateX(5px);
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.18);
}

.about-list li strong {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-primary);
    min-width: 190px;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.about-list li span {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Inline code tags (used in about.php descriptions) */
code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82em;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.15em 0.5em;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Readonly input — tighter brand alignment */
.input-group input[readonly] {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}