@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0d9488; /* Industrial Teal (Teal 600) */
    --primary-light: #f0fdfa;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --teal: #0d9488;
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar-width: 260px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    overflow-x: hidden;
    margin: 0;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: var(--bg-sidebar);
    width: var(--sidebar-width);
    border-right: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    padding: 0.5rem 0.5rem 1.25rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-brand span {
    color: var(--primary);
}

.nav-section-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1rem 0.5rem 0.5rem;
}

.nav-link {
    color: var(--secondary);
    padding: 0.6rem 0.85rem;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.nav-link i {
    font-size: 1rem;
    transition: transform 0.2s;
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-link:hover i {
    transform: scale(1.1);
}

.nav-link.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 8px rgba(13, 148, 136, 0.2);
}

.nav-link.active i {
    color: white;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 1.5rem 2rem;
    max-width: 100%;
    background-color: var(--bg-main);
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

/* Stats Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.stat-icon-wrapper i {
    font-size: 1.25rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.stat-trend {
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* Custom Colors for Stat Icons */
.bg-soft-teal { background: #f0fdfa; color: #0d9488; }
.bg-soft-green { background: #f0fdf4; color: #10b981; }
.bg-soft-blue { background: #eff6ff; color: #3b82f6; }
.bg-soft-purple { background: #f5f3ff; color: #8b5cf6; }

/* Table Section */
.content-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.card-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-main);
}

.table thead th {
    background: var(--bg-main);
    padding: 0.75rem 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border: none;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.8rem;
}

/* Badges */
.badge-pill {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.bg-success-soft { background: #dcfce7; color: #15803d; }
.bg-danger-soft { background: #fee2e2; color: #b91c1c; }
.bg-warning-soft { background: #fef9c3; color: #a16207; }

/* Forms & Buttons */
.form-control {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    font-weight: 500;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #0f766e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.btn-sm {
    padding: 0.5rem 1rem;
    border-radius: 10px;
}

/* Mobile Responsiveness & Sidebar Toggle */
.mobile-header {
    display: none;
    background: white;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1060;
    justify-content: space-between;
    align-items: center;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

@media (max-width: 991.98px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        z-index: 1050;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 25px -5px rgba(0, 0, 0, 0.1);
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        padding: 1.25rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header div:last-child {
        width: 100%;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .table-responsive {
        border: 0;
    }
}
