/* V:\Development\overtime_tracker\tracker\static\tracker\style.css */

/* --- THEME VARIABLES --- */
:root {
    --primary-color: #004d99;
    --secondary-color: #6c757d;
    --accent-color: #00aaff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --border-color: #dee2e6;
    
    /* Calendar Colors */
    --cal-day: #FF0000;
    --cal-night: #0000FF;
    --cal-super: #00FF00;
    --cal-off: #FFFFFF;
}

/* --- GLOBAL LAYOUT --- */
body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-body);
    color: #333;
}

.content-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
    background-color: var(--bg-card);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* --- NAVIGATION --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}

.home-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    padding: 8px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.2s;
}
.home-link:hover { background-color: var(--primary-color); color: #fff; }

.header-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    margin-left: 20px;
}
.header-links a:hover { text-decoration: underline; }

/* --- BUTTONS --- */
.shift-button {
    display: inline-block; 
    padding: 15px 30px; 
    background-color: var(--primary-color); 
    border: 1px solid #003366; 
    text-decoration: none; 
    color: white; 
    font-weight: bold;
    border-radius: 5px;
    min-width: 150px;
    transition: background-color 0.2s;
    text-align: center;
    margin: 10px;
}
.shift-button:hover { background-color: var(--accent-color); color: white; }

.btn-save-main {
    background-color: var(--success-color);
    color: white;
    padding: 15px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background 0.2s;
}
.btn-save-main:hover { background-color: #218838; }

/* --- DATA TABLES --- */
.ot-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.ot-table th, .ot-table td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; vertical-align: middle; }
.ot-table th { background-color: #e6f0ff; color: var(--primary-color); }

/* Column Widths - Adjusted for TWO Dates */
.col-created { width: 8%; font-size: 0.85em; color: #555; }
.col-shift-date { width: 9%; font-weight: bold; }
.col-member { width: 14%; }
.col-crew { width: 5%; text-align: center; }
.col-result { width: 10%; text-align: center; }
.col-hours { width: 5%; text-align: center; }
.col-notes { width: 30%; } 
.col-flags { width: 10%; } 
.col-manager { width: 9%; }

/* Row Highlighting */
.row-cancelled { background-color: #ffe6e6; color: #999; }
.row-missing-crew { background-color: #fff3cd !important; }

/* --- FORM INPUTS --- */
.input-std { padding: 8px; border-radius: 4px; border: 1px solid #ccc; }
.input-full { width: 100%; padding: 5px; border: 1px solid #ccc; border-radius: 4px; }
.input-select { width: 100%; padding: 5px; font-weight: bold; border: 1px solid #ccc; border-radius: 4px; }

/* Filter Panel */
.filter-panel {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #b6d4fe;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.filter-label { font-weight: bold; color: #0d47a1; }

/* --- TOGGLE BUTTONS (Stacked Text Style) --- */
.btn-toggle-text {
    background: none;
    border: 1px solid transparent;
    padding: 1px 6px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    color: #ccc; /* Faint grey when inactive */
    width: 100%; /* Force full width in stack */
    text-align: left;
}
.btn-toggle-text:hover { background-color: #f1f1f1; color: #666; }

/* Active States */
.btn-toggle-text.active-emergent {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    font-weight: bold;
    opacity: 1;
}

.btn-toggle-text.active-complement {
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    font-weight: bold;
    opacity: 1;
}

/* --- CALENDAR SYSTEM --- */
.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    max-width: 1200px;
    margin: 0 auto;
}
@media (max-width: 992px) { .year-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 576px) { .year-grid { grid-template-columns: 1fr !important; } }

.month-container { background: #fff; border: 1px solid var(--border-color); border-radius: 4px; padding: 4px !important; }
.month-header { text-align: center; font-weight: bold; font-size: 0.85rem; padding-bottom: 4px; margin-bottom: 4px; background-color: #f8f9fa; border-bottom: 1px solid var(--border-color); }
.calendar-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px !important; }
.day-header { text-align: center; font-weight: bold; font-size: 0.7rem; color: #aaa; margin-bottom: 2px; }
.day-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; border-radius: 2px; cursor: default; color: #333; }
.block-day { background-color: var(--cal-day); color: #fff; }
.block-night { background-color: var(--cal-night); color: #fff; }
.block-super { background-color: var(--cal-super); color: #000; border: 1px solid #00aa00; }
.block-off { background-color: transparent; }

/* --- PORTAL SPECIFIC --- */
.portal-container { text-align: center; margin-top: 50px; }
.portal-btn {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
    width: 280px; height: 160px; margin: 20px;
    background: #fff; border: 2px solid var(--primary-color); border-radius: 10px;
    font-size: 1.5rem; font-weight: bold; color: var(--primary-color); text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: all 0.2s; vertical-align: middle;
}
.portal-btn:hover { background: var(--primary-color); color: #fff; transform: translateY(-5px); }