/* ============================================================
   ETHIOOUTSOURCING ADMIN PANEL STYLES v3.0
   ============================================================
   A complete rewrite of the admin/manager dashboard styles.
   - Enhanced sidebar with gradient and hover effects
   - Modern stats cards with gradient accent bars
   - Clean tables with dark headers
   - Full responsive support with mobile hamburger menu
   - Manager theme (gold) and Admin theme (olive)
   - Grid-4 layout for stats cards
   ============================================================ */

/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --olive: #556B2F;
    --gold: #D4AF37;
    --black-accent: #1a1a1a;
    --dark-grey: #2C3E50;
    --paper-white: #FBFAF8;
    --border-color: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #e74c3c;
    --info: #3498db;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 8px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.admin-body {
    background: #f4f4f2;
    display: flex;
    min-height: 100vh;
    margin: 0;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.dash-content {
    flex: 1;
    padding: 30px 40px 40px 40px;
    transition: padding var(--transition);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    margin-bottom: 30px;
}

.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 8px 0 0 0;
    line-height: 1.2;
}

.page-subtitle {
    color: #666;
    font-size: 0.9rem;
}

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.admin-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: linear-gradient(180deg, #121212 0%, #1a1a1a 30%, #2a2a2a 100%);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: width var(--transition), min-width var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    border-right: 2px solid var(--olive);
    z-index: 1000;
    flex-shrink: 0;
}

.admin-sidebar::-webkit-scrollbar {
    width: 3px;
}
.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 18px 20px 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 65px;
}

.sidebar-header .logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar User */
.sidebar-user {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.sidebar-user .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--olive);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    font-size: 1.1rem;
}

.sidebar-user .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 0.55rem;
    text-transform: uppercase;
    opacity: 0.4;
    letter-spacing: 0.5px;
    font-family: 'Roboto Mono', monospace;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 20px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.25;
    padding: 12px 20px 6px 20px;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 20px;
    text-decoration: none;
    color: rgba(255,255,255,0.55);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.8rem;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}

.sidebar-nav .nav-item a .nav-icon {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.sidebar-nav .nav-item a .nav-text {
    transition: opacity 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav .nav-item a .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Active state */
.sidebar-nav .nav-item.active a {
    background: rgba(255,255,255,0.06);
    color: white;
    border-left-color: var(--olive);
}

.sidebar-nav .nav-item.active a .nav-icon {
    color: var(--olive);
}

/* Hover state */
.sidebar-nav .nav-item a:hover {
    background: rgba(255,255,255,0.04);
    color: white;
    transform: translateX(2px);
}

.sidebar-nav .nav-item a:hover .nav-icon {
    transform: scale(1.12);
}

/* ============================================================
   MANAGER THEME SIDEBAR
   ============================================================ */
body.manager-theme .admin-sidebar {
    background: linear-gradient(180deg, #b8860b 0%, #d4af37 40%, #e8c84a 100%);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: var(--black-accent);
    border-right-color: var(--black-accent);
}

body.manager-theme .sidebar-header .logo {
    color: var(--black-accent);
}

body.manager-theme .sidebar-user .avatar {
    border-color: var(--black-accent);
}

body.manager-theme .sidebar-nav .nav-item a {
    color: rgba(0,0,0,0.55);
}

body.manager-theme .sidebar-nav .nav-item.active a {
    background: rgba(0,0,0,0.06);
    color: var(--black-accent);
    border-left-color: var(--black-accent);
}

body.manager-theme .sidebar-nav .nav-item.active a .nav-icon {
    color: var(--black-accent);
}

body.manager-theme .sidebar-nav .nav-item a:hover {
    background: rgba(0,0,0,0.04);
    color: var(--black-accent);
}

body.manager-theme .sidebar-nav .nav-label {
    color: rgba(0,0,0,0.25);
}

body.manager-theme .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
}

/* ============================================================
   STATS CARDS
   ============================================================ */
.stat-card {
    text-decoration: none;
    color: inherit;
    display: block;
    background: white;
    border-radius: var(--radius);
    padding: 20px 22px 18px 22px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

/* Gradient accent bar at top */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--olive);
    transition: height var(--transition);
}

.stat-card:hover::before {
    height: 6px;
}

.stat-card--olive::before { background: var(--olive); }
.stat-card--gold::before { background: var(--gold); }
.stat-card--red::before { background: var(--danger); }
.stat-card--green::before { background: var(--success); }
.stat-card--blue::before { background: var(--info); }
.stat-card--orange::before { background: var(--warning); }

.stat-card .stat-icon {
    font-size: 1.5rem;
    transition: transform var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(-3deg);
}

.stat-card .stat-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 4px 0 2px 0;
    line-height: 1.2;
}

.stat-card .stat-trend {
    margin-top: 6px;
}

.stat-card .stat-sub {
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
}

/* ============================================================
   TREND PILLS
   ============================================================ */
.trend-pill {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
}

.trend-pill.up {
    background: #dcfce7;
    color: #166534;
}

.trend-pill.down {
    background: #fee2e2;
    color: #991b1b;
}

.trend-pill.neutral {
    background: #fef3c7;
    color: #92400e;
}

/* ============================================================
   TABLES
   ============================================================ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table thead th {
    background: var(--black-accent);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table tbody tr {
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.admin-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Striped rows */
.admin-table.striped tbody tr:nth-child(even) {
    background: #fafafa;
}

.admin-table.striped tbody tr:nth-child(even):hover {
    background: #f1f5f9;
}

/* Manager theme table header */
body.manager-theme .admin-table thead th {
    background: var(--gold);
    color: var(--black-accent);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 22px 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.card-header h4 {
    margin: 0;
    font-size: 0.75rem;
    font-family: 'Roboto Mono', monospace;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card variants */
.card-olive { border-top: 4px solid var(--olive); }
.card-gold { border-top: 4px solid var(--gold); }
.card-dark { border-top: 4px solid var(--black-accent); }
.card-danger { border-top: 4px solid var(--danger); background: #fef2f2; }
.card-warning { border-top: 4px solid var(--warning); background: #fffbeb; }
.card-success { border-top: 4px solid var(--success); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-olive {
    background: var(--olive);
    color: white;
    padding: 10px 22px;
    border: none;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    transition: all var(--transition);
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    min-height: 40px;
}

.btn-olive:hover {
    background: var(--black-accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-olive:active {
    transform: translateY(0);
}

.btn-outline {
    border: 1px solid var(--black-accent);
    color: var(--black-accent);
    padding: 10px 22px;
    text-decoration: none;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    display: inline-block;
    border-radius: 4px;
    transition: all var(--transition);
    cursor: pointer;
    background: transparent;
    min-height: 40px;
}

.btn-outline:hover {
    background: var(--black-accent);
    color: white;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 0.8rem;
    min-height: 48px;
}

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge {
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
    color: white;
    display: inline-block;
}

.status-active, .status-verified, .status-success {
    background-color: var(--success);
}

.status-pending, .status-warning {
    background-color: var(--warning);
}

.status-completed, .status-info {
    background-color: var(--info);
}

.status-on-hold, .status-muted {
    background-color: #95a5a6;
}

.status-cancelled, .status-danger {
    background-color: var(--danger);
}

.status-fully-paid {
    background-color: var(--black-accent);
}

.urgent-badge {
    background: var(--danger);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    font-family: 'Roboto Mono', monospace;
}

.high-badge {
    background: var(--warning);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    font-family: 'Roboto Mono', monospace;
}

/* ============================================================
   ALERTS & NOTIFICATIONS
   ============================================================ */
.alert-box {
    padding: 14px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    border-left: 4px solid transparent;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left-color: var(--success);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: var(--danger);
}

.alert-info {
    background: #e0f2fe;
    color: #0369a1;
    border-left-color: var(--info);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left-color: var(--warning);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fefefe;
    margin: 8% auto;
    padding: 30px 35px;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius);
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.close-btn:hover {
    color: var(--black-accent);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-msg {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 28px;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 400px;
}

.toast-msg.toast-success {
    background: var(--olive);
    color: white;
}

.toast-msg.toast-error {
    background: var(--danger);
    color: white;
}

.toast-msg.toast-info {
    background: var(--info);
    color: white;
}

@keyframes toastIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   TECH LABEL
   ============================================================ */
.tech-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.6rem;
    background: var(--black-accent);
    color: white;
    padding: 4px 12px;
    display: inline-block;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 2px;
}

body.manager-theme .tech-label {
    background: var(--gold);
    color: var(--black-accent);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.gap-30 { gap: 30px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #888; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.7rem; }
.text-uppercase { text-transform: uppercase; }
.text-olive { color: var(--olive); }
.text-gold { color: var(--gold); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.data-table-container {
    overflow-x: auto;
}

.stat-item-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.stat-item-label {
    font-size: 0.7rem;
    color: #888;
    font-family: 'Roboto Mono', monospace;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.empty-state h4 {
    color: #555;
    margin-bottom: 5px;
    font-size: 1rem;
    font-weight: 600;
}

.empty-state p {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

.empty-state-sm {
    padding: 20px;
}

.empty-state-sm .empty-icon {
    font-size: 2rem;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton-line {
    height: 16px;
    background: #e5e7eb;
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
    margin-bottom: 8px;
}
.skeleton-line.skeleton-lg { height: 40px; }
.skeleton-line.skeleton-md { height: 24px; }
.skeleton-line.skeleton-sm { height: 12px; }
.skeleton-line.skeleton-w-50 { width: 50%; }
.skeleton-line.skeleton-w-75 { width: 75%; }

.skeleton-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 25px;
    min-height: 120px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 2000;
        transform: translateX(-100%);
        width: 260px !important;
        min-width: 260px !important;
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    .admin-sidebar.mobile-visible {
        transform: translateX(0);
    }

    .hamburger-btn {
        display: block !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 2001;
        background: var(--black-accent);
        color: white;
        border: none;
        padding: 8px 14px;
        border-radius: 4px;
        font-size: 1.4rem;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        line-height: 1;
        transition: all 0.2s ease;
    }
    body.manager-theme .hamburger-btn {
        background: var(--gold);
        color: var(--black-accent);
    }

    .dash-content {
        padding: 20px 20px 30px 20px !important;
    }

    .grid-2 { grid-template-columns: 1fr 1fr !important; }
    .grid-3 { grid-template-columns: 1fr 1fr !important; }
    .grid-4 { grid-template-columns: 1fr 1fr !important; }

    #sidebar-overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 1999;
        backdrop-filter: blur(2px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 2000;
        transform: translateX(-100%);
        width: 280px !important;
        min-width: 280px !important;
        transition: transform 0.3s ease;
        box-shadow: 4px 0 25px rgba(0,0,0,0.2);
    }
    .admin-sidebar.mobile-visible {
        transform: translateX(0);
    }

    .hamburger-btn {
        display: block !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 2001;
        background: var(--black-accent);
        color: white;
        border: none;
        padding: 8px 14px;
        border-radius: 4px;
        font-size: 1.4rem;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        line-height: 1;
        transition: all 0.2s ease;
    }
    body.manager-theme .hamburger-btn {
        background: var(--gold);
        color: var(--black-accent);
    }

    .dash-content {
        padding: 15px 15px 25px 15px !important;
        margin-top: 10px;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
    }

    .btn-olive, .btn-outline {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 0.75rem;
    }

    .data-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }
    .admin-table {
        min-width: 600px;
        font-size: 0.75rem;
    }
    .admin-table thead th,
    .admin-table tbody td {
        padding: 8px 12px;
    }

    .stat-card .stat-value {
        font-size: 2rem;
    }
    .stat-card {
        padding: 16px 18px;
    }
    .card {
        padding: 16px 18px;
    }

    .page-title {
        font-size: 1.4rem;
    }
    .page-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #sidebar-overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
        backdrop-filter: blur(3px);
    }
}

/* Desktop: hamburger hidden */
@media (min-width: 1025px) {
    .hamburger-btn {
        display: none !important;
    }
    #sidebar-overlay {
        display: none !important;
    }
}

/* ============================================================
   OVERLAY
   ============================================================ */
#sidebar-overlay {
    display: none;
}

#sidebar-overlay.active {
    display: block;
}

/* ============================================================
   DARK MODE OVERRIDES
   ============================================================ */
body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .card,
body.dark-mode .stat-card,
body.dark-mode .modal-content {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .admin-table tbody td {
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .admin-table tbody tr:hover {
    background: #2a2a2a !important;
}

body.dark-mode .admin-table.striped tbody tr:nth-child(even) {
    background: #1a1a1a !important;
}

body.dark-mode .admin-table.striped tbody tr:nth-child(even):hover {
    background: #2a2a2a !important;
}

body.dark-mode .stat-card {
    border-color: #2a2a2a !important;
}

body.dark-mode .stat-card .stat-label {
    color: #888 !important;
}

body.dark-mode .stat-card .stat-sub {
    color: #666 !important;
}

body.dark-mode .card-header {
    border-color: #333 !important;
}

body.dark-mode .alert-success {
    background: #1a3a2a !important;
    color: #6ee7b7 !important;
}

body.dark-mode .alert-danger {
    background: #3a1a1a !important;
    color: #fca5a5 !important;
}

body.dark-mode .alert-warning {
    background: #3a2a1a !important;
    color: #fcd34d !important;
}

body.dark-mode .alert-info {
    background: #1a2a3a !important;
    color: #7dd3fc !important;
}

body.dark-mode .modal-content {
    background: #1e1e1e !important;
}

body.dark-mode .close-btn {
    color: #666;
}

body.dark-mode .close-btn:hover {
    color: white;
}

body.dark-mode .btn-outline {
    border-color: #444;
    color: #ccc;
}

body.dark-mode .btn-outline:hover {
    background: #444;
    color: white;
}

body.dark-mode .skeleton-line {
    background: #2a2a2a !important;
}

body.dark-mode .skeleton-card {
    background: #1a1a1a !important;
    border-color: #333 !important;
}

body.dark-mode .empty-state h4 {
    color: #ccc;
}
body.dark-mode .empty-state p {
    color: #888;
}

body.dark-mode .toast-msg.toast-success {
    background: #2d6a4f;
}
body.dark-mode .toast-msg.toast-error {
    background: #991b1b;
}
body.dark-mode .toast-msg.toast-info {
    background: #1a3a5c;
}

body.dark-mode .data-table-container::-webkit-scrollbar {
    height: 6px;
}
body.dark-mode .data-table-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}
body.dark-mode .data-table-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

/* ============================================================
   COMPACT MODE
   ============================================================ */
body.compact-mode .admin-table th,
body.compact-mode .admin-table td {
    padding: 6px 12px !important;
    font-size: 0.7rem !important;
}

body.compact-mode .card {
    padding: 15px 18px !important;
}

body.compact-mode .stat-card {
    padding: 15px 18px !important;
}

body.compact-mode .stat-card .stat-value {
    font-size: 2rem !important;
}

body.compact-mode .dash-content {
    padding: 15px 20px 20px 20px !important;
}

body.compact-mode .page-title {
    font-size: 1.5rem !important;
}

body.compact-mode .sidebar-nav .nav-item a {
    padding: 6px 16px !important;
    font-size: 0.75rem !important;
}

body.compact-mode .admin-sidebar {
    width: 220px !important;
    min-width: 220px !important;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-link {
    padding: 12px 22px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all var(--transition);
    white-space: nowrap;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
}

.tab-link:hover {
    color: var(--olive);
}

.tab-link.active {
    border-bottom-color: var(--olive);
    color: var(--olive);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

body.dark-mode .tabs {
    border-color: #333;
}
body.dark-mode .tab-link {
    color: #999;
}
body.dark-mode .tab-link:hover {
    color: var(--olive);
}
body.dark-mode .tab-link.active {
    color: var(--olive);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: white;
    color: #333;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.1);
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}
body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: var(--olive) !important;
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.2) !important;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .admin-sidebar,
    .hamburger-btn,
    #sidebar-overlay,
    .no-print,
    .btn-olive,
    .btn-outline {
        display: none !important;
    }
    .dash-content {
        padding: 20px !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}


echo '
/* ============================================================
   GRID SYSTEM - FIX
   ============================================================ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
    }
}
' >> /home/ethiooms/public_html/css/admin-style.css
/* ============================================================
   GRID LAYOUT FIXES - Dashboard Cards
   ============================================================ */

/* Ensure cards in grid have equal height */
.grid-4 .stat-card,
.grid-2 .card,
.grid-3 .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Fix stat card content alignment */
.stat-card .stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 4px 0 2px 0;
    line-height: 1.2;
}

/* Fix stat card label spacing */
.stat-card .stat-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Fix stat sub text */
.stat-card .stat-sub {
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
}

/* Ensure grid-4 cards have consistent sizing */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* Fix for grid-2 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: stretch;
}

/* Fix for grid-3 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    align-items: stretch;
}

/* Ensure cards don't overflow */
.card {
    overflow: hidden;
    word-wrap: break-word;
}

/* Fix priority attention widget overflow */
#priority-widget .card-header {
    flex-shrink: 0;
}

#priority-container {
    flex: 1;
}

/* Fix chart containers */
#revenueChart,
#projectChart,
#workloadChart {
    max-width: 100%;
}

/* Responsive fixes for tablet */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive fixes for mobile */
@media (max-width: 768px) {
    .grid-4,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr !important;
    }
    
    .stat-card .stat-value {
        font-size: 2rem !important;
    }
    
    .stat-card {
        padding: 16px 18px !important;
    }
    
    .card {
        padding: 16px 18px !important;
    }
}

/* Fix for card header in dark mode */
body.dark-mode .card-header {
    border-color: #333 !important;
}

/* Fix for project status widget */
.stat-item-label {
    font-size: 0.7rem;
    color: #888;
    font-family: 'Roboto Mono', monospace;
}

.stat-item-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

/* Fix for activity feed scrolling */
#activity-feed-container {
    max-height: 280px;
    overflow-y: auto;
}

#activity-feed-container::-webkit-scrollbar {
    width: 4px;
}

#activity-feed-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#activity-feed-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

body.dark-mode #activity-feed-container::-webkit-scrollbar-track {
    background: #2a2a2a;
}

body.dark-mode #activity-feed-container::-webkit-scrollbar-thumb {
    background: #444;
}
