/* ============================================================
   Dashboard Stylesheet
   ============================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: var(--primary);
    display: block;
}

.auth-card .logo span { color: var(--accent); }

.auth-card h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary);
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.auth-tabs button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tabs button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Dashboard Layout */
.dash-layout {
    display: flex;
    min-height: 100vh;
}

.dash-sidebar {
    width: 260px;
    background: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
}

.dash-sidebar .logo {
    padding: 20px;
    font-size: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dash-sidebar .logo span { color: var(--accent); }

.dash-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.dash-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dash-nav a:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.dash-nav a.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--accent);
}

.dash-nav .nav-icon { font-size: 18px; width: 24px; text-align: center; }

.dash-nav .badge-count {
    margin-left: auto;
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.dash-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.dash-user-info { flex: 1; min-width: 0; }
.dash-user-info .name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-user-info .plan { font-size: 12px; color: rgba(255,255,255,0.5); }

.dash-logout {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.dash-logout:hover { color: white; }

.dash-main {
    flex: 1;
    margin-left: 260px;
    background: var(--bg-gray);
    min-height: 100vh;
}

.dash-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-header h1 { font-size: 24px; color: var(--primary); }

.dash-content { padding: 30px; }

/* Stat Cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.stat-card .stat-label { font-size: 13px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-card .stat-icon { float: right; font-size: 28px; opacity: 0.3; }

/* Table */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.dash-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.dash-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--bg-light); }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

.modal h2 { margin-bottom: 20px; color: var(--primary); }

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Plan Badge */
.plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.plan-badge.starter { background: #dbeafe; color: #1d4ed8; }
.plan-badge.professional { background: #fef3c7; color: #d97706; }
.plan-badge.business { background: #d1fae5; color: #059669; }
.plan-badge.none { background: var(--bg-gray); color: var(--text-light); }

/* Message Card */
.msg-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.msg-card:hover { box-shadow: var(--shadow-md); }
.msg-card.unread { border-left-color: var(--accent); background: #fffbf5; }

.msg-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.msg-sender { font-weight: 600; color: var(--primary); }
.msg-date { font-size: 13px; color: var(--text-light); }
.msg-bridge { font-size: 13px; color: var(--accent); margin-bottom: 4px; }
.msg-preview { color: var(--text-light); font-size: 14px; }

/* Mobile Sidebar */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 60;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .dash-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .dash-sidebar.open { transform: translateX(0); }
    .dash-main { margin-left: 0; }
    .mobile-sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-content { padding: 16px; }
    .dash-header { padding: 16px 20px; }
    .dash-header h1 { font-size: 20px; }
}
