/* --- 1. GLOBAL VARIABLES & RESET --- */
:root {
    --bg: #f4f7f6;
    --panel: #ffffff;
    --text: #2c3e50;
    --border: #e1e8ed;
    --accent: #e94560; /* The iNerd Red/Pink */
    --success: #2ecc71;
    --warning: #f1c40f;
    --blue: #3498db;
    --dark: #34495e;
}

/* Optional: Add a dark mode toggle class to body if needed later */
body.dark-mode {
    --bg: #1a1a2e;
    --panel: #16213e;
    --text: #e94560;
    --border: #0f3460;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0; padding: 0;
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.admin-container { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* --- 2. PREMIUM BUTTONS (The "Pill" Style) --- */
.btn-global {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 16px; border-radius: 50px; /* Pill Shape */
    font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px;
    text-decoration: none; transition: all 0.2s ease; border: none; cursor: pointer; color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); white-space: nowrap; width: auto;
}
.btn-global:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); opacity: 0.95; }

/* Button Variants */
.btn-blue   { background: linear-gradient(135deg, #3498db, #2980b9); }
.btn-green  { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.btn-orange { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.btn-red    { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.btn-dark   { background: linear-gradient(135deg, #34495e, #2c3e50); }
.btn-ghost  { background: transparent; border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn-ghost:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); transform: none; }

/* --- 3. LAYOUT & CARDS --- */
.admin-header { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 25px; background: var(--panel); padding: 20px; 
    border-radius: 12px; border: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; }

.section-title { 
    margin: 30px 0 15px 0; font-size: 1.2rem; font-weight: bold; 
    display: flex; align-items: center; gap: 10px; color: var(--text);
}
.badge-count { background: var(--accent); color: white; padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; vertical-align: middle; }

/* --- 4. THE JOB CARD GRID (Task System) --- */
.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Desktop: Intelligent Fit */
    gap: 20px;
}

.job-card {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px;
    display: flex; flex-direction: column; gap: 8px;
    position: relative; overflow: hidden;
    transition: transform 0.2s ease;
}
.job-card:hover { border-color: var(--accent); }

/* Card Internals */
.card-top { display: flex; justify-content: space-between; font-size: 0.85rem; opacity: 0.6; margin-bottom: 5px; border-bottom: 1px solid var(--border); padding-bottom: 5px; }
.card-title { font-weight: 800; font-size: 1.1rem; color: var(--accent); line-height: 1.3; }
.card-detail { font-size: 0.95rem; font-weight: 500; }
.card-sub { font-size: 0.85rem; opacity: 0.7; }
.status-pill { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; color: white; align-self: flex-start; margin: 5px 0; }

/* Card Button Area */
.card-actions { 
    display: grid; gap: 8px; margin-top: 15px; padding-top: 15px; 
    border-top: 1px solid var(--border); 
}
.btn-row { display: flex; gap: 5px; } /* For grouping small buttons like print/edit */

/* --- 5. RESPONSIVE MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .admin-header { flex-direction: column; gap: 15px; text-align: center; }
    .admin-nav { justify-content: center; width: 100%; }
    .btn-global { flex: 1 1 45%; text-align: center; } /* Buttons split row */

    /* Force 2 Columns on Mobile Portrait */
    .job-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    
    /* Compact Card for Mobile */
    .job-card { padding: 12px; }
    .card-title { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .card-detail { font-size: 0.85rem; }
    
    /* Stack buttons vertically on mobile cards */
    .card-actions { grid-template-columns: 1fr; } 
    .btn-global { width: 100%; margin: 0; font-size: 0.75rem; padding: 6px 0; }
}
