/**
 * Meta WhatsApp Business Platform - Admin Portal Stylesheet
 * Sidebar, Navigation, Dashboard Tiles, Action Cards, Topbar, Layout Grid
 */

/* ==========================================================================
   PORTAL LAYOUT
   ========================================================================== */
.portal-layout {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar, .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.35rem 0.25rem;
}

.nav-section {
    padding: 0.2rem 0.5rem;
    margin-top: 0.2rem;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
    margin-bottom: 0.25rem;
    padding-left: 0.5rem;
}

.portal-main, .main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    padding: 1.5rem;
}

/* ==========================================================================
   DASHBOARD TILES & ACTION CARDS
   ========================================================================== */
.stat-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 1.25rem;
}

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

@media (max-width: 640px) {
    .stat-grid-4 {
        grid-template-columns: 1fr;
    }
}

.stat-tile {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.stat-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-tile.c-cyan::before { background: #06B6D4; }
.stat-tile.c-blue::before { background: #2563EB; }
.stat-tile.c-emerald::before { background: #10B981; }
.stat-tile.c-purple::before { background: #8B5CF6; }

.stat-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 900;
    color: #0F172A;
    margin: 4px 0 2px;
    font-feature-settings: "tnum";
}

.stat-sub {
    font-size: 0.72rem;
    color: #94A3B8;
}

.action-btn-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #FFFFFF;
    text-decoration: none;
    color: #0F172A;
    transition: all 0.15s ease;
}

.action-btn-card:hover {
    border-color: #06B6D4;
    background: #F8FAFC;
    transform: translateY(-1px);
}

.action-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .portal-sidebar, .sidebar {
        display: none;
    }
    .portal-main, .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}
