/* =========================================
   1. COLOR PALETTE & VARIABLES
   ========================================= */
:root {
    /* Default Colors (Light & Bright) */
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --accent: #0984e3; /* Default Hub Blue */
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Theme Classes - Controlled by Sidebar Buttons */
.theme-blue   { --accent: #0984e3; }
.theme-green  { --accent: #00b894; }
.theme-purple { --accent: #6c5ce7; }
.theme-orange { --accent: #e17055; }
.theme-teal   { --accent: #00cec9; }

/* =========================================
   2. GLOBAL DEFAULTS
   ========================================= */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.5s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures footer stays at bottom */
}

h1, h2, h3 { 
    margin-top: 0; 
    font-weight: 700; 
    color: var(--text-main);
}

a { transition: var(--transition); }

main { flex: 1; } /* Pushes the footer down */

hr { border: 1px solid #eee; margin: 20px 0 30px 0; }

/* =========================================
   3. RESPONSIVE NAVIGATION BAR
   ========================================= */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--card-bg);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { 
    font-weight: 800; 
    font-size: 1.6rem; 
    color: var(--text-main);
}

.logo span { color: var(--accent); }

.main-nav ul { 
    display: flex; 
    list-style: none; 
    gap: 20px; 
    margin: 0; 
    padding: 0;
}

.main-nav a { 
    text-decoration: none; 
    color: var(--text-main); 
    font-weight: 600;
    padding: 5px 0;
}

.main-nav a:hover, .main-nav a.active { 
    color: var(--accent); 
    border-bottom: 2px solid var(--accent);
}

/* =========================================
   4. THEME SWITCHER SIDEBAR
   ========================================= */
.theme-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    padding: 12px;
    border-radius: 15px 0 0 15px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
}

.theme-sidebar p {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0;
    text-align: center;
    color: var(--text-muted);
}

.theme-sidebar button {
    width: 32px;
    height: 32px;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.theme-sidebar button:hover { transform: scale(1.2); }

.btn-blue   { background: #0984e3; }
.btn-green  { background: #00b894; }
.btn-purple { background: #6c5ce7; }
.btn-orange { background: #e17055; }
.btn-teal   { background: #00cec9; }

/* =========================================
   5. LANDING PAGE / GENERAL LAYOUT
   ========================================= */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.content-box {
    max-width: 850px;
    background: var(--card-bg);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
}

.hero h1 { font-size: 2.5rem; margin-bottom: 10px; color: var(--accent); }
.subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 20px; }
.intro-text p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 20px; }

/* =========================================
   6. HOME PAGE TOOL GRID (APP-STYLE)
   ========================================= */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 15px;
    background: var(--card-bg);
    border: 2px solid #edf2f7;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.tool-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 15px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tool-card h3 { margin-bottom: 8px; font-size: 1.15rem; color: var(--text-main); }
.tool-card p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.4; }

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.tool-card:hover i { transform: scale(1.15); }

/* =========================================
   7. FORM ELEMENTS & BUTTONS
   ========================================= */
.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06);
}

.input-group { margin-bottom: 18px; }
.input-group label { 
    display: block; 
    font-weight: 700; 
    font-size: 0.85rem; 
    margin-bottom: 6px; 
    color: var(--text-muted);
}

input[type="text"], input[type="email"], input[type="date"], input[type="time"], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border 0.3s;
    background: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

.cta-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: var(--transition);
}
.cta-button:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* Section Headers & Add Buttons */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 10px;
}
.section-header h3 { margin: 0; }

.add-btn {
    background: var(--accent);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}
.add-btn:hover { transform: rotate(90deg); filter: brightness(1.2); }

.dynamic-container { display: flex; flex-direction: column; gap: 10px; }

/* =========================================
   8. RESUME BUILDER SPECIFICS
   ========================================= */
.resume-container {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 40px;
    padding: 40px 5%;
}

.exp-entry {
    background: #fcfcfc;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 5px solid var(--accent);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* A4 Paper Preview */
.resume-preview-wrapper {
    display: flex;
    justify-content: center;
    background: #dcdde1; 
    padding: 40px;
    border-radius: 16px;
    overflow: hidden;
}

.resume-paper {
    background: white;
    width: 210mm; /* A4 Standard */
    min-height: 297mm;
    padding: 20mm;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.65); /* Scale for screen fitting */
    transform-origin: top center;
    color: #2d3436;
}

.resume-header { text-align: center; border-bottom: 3px solid var(--accent); padding-bottom: 20px; }
.resume-header h1 { font-size: 2.5rem; letter-spacing: 2px; margin: 0; }
.contact-line { font-weight: 600; color: var(--text-muted); margin-top: 8px; }

.resume-section h3 { 
    color: var(--accent); 
    border-bottom: 1px solid #eee; 
    padding-bottom: 5px; 
    margin-top: 25px; 
    text-transform: uppercase;
    font-size: 1rem;
}

.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* =========================================
   9. COMPLIANCE TRACKER (REMINDERS)
   ========================================= */
.reminder-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-left: 6px solid var(--accent);
    transition: transform 0.2s;
}
.reminder-card:hover { transform: translateY(-2px); }

.reminder-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.reminder-status {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid #eee;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}
.status-badge.pending { background: #dfe6e9; color: #636e72; }
.status-badge.good { background: #dff9fb; color: #00b894; border: 1px solid #00b894; }
.status-badge.warning { background: #fef0cd; color: #f39c12; border: 1px solid #f39c12; }
.status-badge.expired { background: #ff7675; color: #fff; }

/* =========================================
   10. SHIFT BOOKINGS MANAGER
   ========================================= */
.shift-form-card { background: #fdfdfd; border: 1px solid #eee; }

.shift-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    align-items: end;
}
.shift-grid .shift-notes { grid-column: span 2; }
.shift-grid .shift-action { grid-column: span 1; }

.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.shift-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}
.shift-table th, .shift-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.shift-table th {
    background: #f8f9fa;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.shift-table tbody tr:hover { background: #fdfdfd; }

.delete-btn {
    background: #ff7675;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    transition: var(--transition);
}
.delete-btn:hover { background: #d63031; }

/* =========================================
   11. FOOTER & DISCLAIMER
   ========================================= */
.site-footer {
    background-color: #2d3436;
    color: #b2bec3;
    padding: 35px 5%;
    margin-top: 60px;
    font-size: 0.85rem;
    line-height: 1.6;
    border-top: 4px solid var(--accent);
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
}
.footer-content p { margin-bottom: 15px; }
.footer-content p:last-child { margin-bottom: 0; }
.footer-content strong { color: #dfe6e9; }

/* =========================================
   12. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 1200px) {
    .resume-container { grid-template-columns: 1fr; }
    .resume-paper { transform: scale(0.9); width: 100%; height: auto; }
}

@media (max-width: 1024px) {
    .shift-grid { grid-template-columns: 1fr 1fr; }
    .shift-grid .shift-notes { grid-column: span 2; }
}

@media (max-width: 768px) {
    .main-nav { flex-direction: column; padding: 1rem; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 10px; font-size: 0.9rem; margin-top: 10px; }
    
    .hero h1 { font-size: 2rem; }
    .content-box { padding: 30px; }
    
    .theme-sidebar { 
        top: auto; 
        bottom: 0; 
        right: 0; 
        width: 100%; 
        flex-direction: row; 
        border-radius: 15px 15px 0 0; 
        justify-content: center;
        transform: none;
    }

    .reminder-inputs { grid-template-columns: 1fr; gap: 10px; }
    .reminder-status { justify-content: center; }

    .site-footer {
        padding: 25px 20px 80px 20px; /* Extra bottom padding for mobile sidebar */
        text-align: left;
    }
}

@media (max-width: 600px) {
    .shift-grid { grid-template-columns: 1fr; }
    .shift-grid .shift-notes { grid-column: span 1; }
}

@media (max-width: 480px) {
    .tools-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .tool-card { padding: 20px 10px; }
    .tool-card i { font-size: 2rem; }
    .tool-card h3 { font-size: 1rem; }
}

/* =========================================
   13. RESOURCES PAGE (VIDEO EMBEDS)
   ========================================= */
.video-grid {
    display: grid;
    /* Forces videos into a 2-column layout on desktop, 1-column on mobile */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 15px;
}

.video-card {
    padding: 20px;
}

.video-card h4 {
    margin-bottom: 15px;
    color: var(--accent);
    font-size: 1.1rem;
}

/* 16:9 Aspect Ratio Container for YouTube */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* Mathematical ratio for 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* =========================================
   14. CONTACT DIRECTORIES (CLIENTS & AGENCIES)
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid var(--accent);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: relative;
}

.contact-card h3 {
    margin-bottom: 5px;
    font-size: 1.25rem;
    color: var(--text-main);
    padding-right: 30px; /* Leave room for delete button */
}

.contact-card p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contact-card strong {
    color: var(--text-main);
}

.contact-card .card-notes {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    font-size: 0.85rem;
    font-style: italic;
}

.btn-delete-contact {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #ff7675;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete-contact:hover {
    color: #d63031;
    transform: scale(1.1);
}

/* =========================================
   15. INVOICE BUILDER SPECIFICS
   ========================================= */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9rem;
}

.invoice-table th, .invoice-table td {
    border: 1px solid #dfe6e9;
    padding: 12px;
    text-align: left;
}

.invoice-table th {
    background: #f8f9fa;
    color: var(--text-main);
    font-weight: 700;
}

.invoice-total-box {
    text-align: right;
    margin-top: 20px;
    padding: 15px;
    background: #fdfdfd;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 1.2rem;
}

/* =========================================
   16. SUPPORT THE DEVELOPER CTA
   ========================================= */
.support-developer-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 40px auto;
    padding: 25px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 2px dashed #dfe6e9; /* Dashed border to separate it from core tools */
    max-width: 500px;
}

.support-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #FFDD00; /* Distinctive BMC Yellow */
    color: #000000;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 30px; /* Pill shape to look friendly */
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.support-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 221, 0, 0.4); /* Yellow glow on hover */
    color: #000000;
}
