/* ========================================
   MODERN CRM DASHBOARD — PREMIUM AESTHETICS
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --admin-bg: #f8fafc;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* --- Layout --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--admin-bg);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.admin-nav-item:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
}

.admin-nav-item.active {
    background: var(--accent);
    color: #ffffff;
}

.admin-nav-item svg { width: 20px; height: 20px; }

/* --- Main Content --- */
.admin-main {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

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

.admin-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.admin-user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    object-fit: cover;
}

/* --- Stats Cards --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.stat-card:hover { transform: translateY(-4px); }

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.stat-label {
    font-size: 0.825rem;
    color: var(--text-sub);
    font-weight: 600;
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

/* --- Content Sections --- */
.admin-content-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 2rem;
}

.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
}

/* --- Table --- */
.admin-table-container {
    overflow-x: auto;
}

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

.admin-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 1.5px solid var(--border);
    color: var(--text-sub);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-badge.new { background: rgba(59,130,246,0.1); color: #3b82f6; }
.status-badge.scheduled { background: rgba(16,185,129,0.1); color: #10b981; }
.status-badge.pending { background: rgba(245,158,11,0.1); color: #f59e0b; }

/* --- Inquiries Feed --- */
.inquiry-feed {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.inquiry-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.inquiry-item:last-child { border: none; }

.inquiry-type-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inquiry-content h4 {
    font-size: 0.875rem;
    margin: 0 0 0.25rem;
}

.inquiry-content p {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin: 0;
}

.inquiry-time {
    font-size: 0.7rem;
    color: var(--text-sub);
    margin-top: 0.25rem;
    display: block;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-sm { background: var(--accent); color: #ffffff; }
.btn-primary-sm:hover { opacity: 0.9; }

/* --- Responsive --- */
@media (max-width: 1200px) {
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-content-grid { grid-template-columns: 1fr; }
}
