/* 
   HomeCEO - High Contrast & Accessible Single-Page Stylesheet
*/

:root {
    --bg-main: #0f172a;           /* Deep dark navy background */
    --card-bg: #1e293b;          /* Dark slate card background */
    --text-main: #ffffff;         /* Crisp white text for contrast */
    --text-muted: #cbd5e1;        /* Light slate for secondary text */
    --border-color: #475569;      /* Strong contrast border */
    
    --primary-color: #2563eb;     /* Vivid blue */
    --primary-hover: #1d4ed8;
    --secondary-color: #0d9488;   /* Vivid teal */
    --accent-gold: #f59e0b;       /* Gold badge */
    
    --success-bg: #166534;        /* Deep green */
    --success-text: #86efac;
    --danger-bg: #991b1b;         /* Deep red */
    --danger-text: #fca5a5;
    
    --whatsapp-color: #25d366;
    --focus-ring: #fde047;        /* Bright yellow focus outline */
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 60px;
}

*:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

/* Header & Sticky Top */
.app-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background-color: #020617;
    border-bottom: 2px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger-btn {
    background: #1e293b;
    border: 2px solid var(--border-color);
    color: #ffffff;
    font-size: 1.5rem;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hamburger-btn:hover {
    background-color: var(--primary-color);
    border-color: #60a5fa;
}

/* Brand Logo Styling */
.brand-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-svg-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.4));
}

.brand-text-box {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.logo-highlight {
    color: #f59e0b; /* Gold CEO highlight */
}

.logo-tagline {
    font-size: 0.75rem;
    color: #38bdf8;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: -3px;
}

/* Full-screen auth gate / loading overlay */
.full-screen-gate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    z-index: 2000;
}

#auth-gate-screen {
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: flex-start;
    padding-top: 56px;
    padding-bottom: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.28), transparent 45%),
        radial-gradient(circle at 88% 100%, rgba(245, 158, 11, 0.22), transparent 45%),
        linear-gradient(160deg, #0c4a6e 0%, #0f172a 35%, #082f49 70%, #0f172a 100%);
}

.landing-stage {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Background sticker characters: fixed to the viewport (not the scrolling content),
   so they stay put as ambient decoration at every screen size, including installed-PWA views. */
.floating-avatar {
    position: fixed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    z-index: 1;
    opacity: 0.5;
    animation: floaty 5.5s ease-in-out infinite;
}

.floating-avatar svg {
    width: 62%;
    height: 62%;
}

.floating-avatar.fa-1 { background: linear-gradient(145deg, #f97316, #ea580c); }
.floating-avatar.fa-2 { background: linear-gradient(145deg, #10b981, #059669); }
.floating-avatar.fa-3 { background: linear-gradient(145deg, #6366f1, #4f46e5); }
.floating-avatar.fa-4 { background: linear-gradient(145deg, #ec4899, #db2777); }
.floating-avatar.fa-5 { background: linear-gradient(145deg, #10b981, #059669); }
.floating-avatar.fa-6 { background: linear-gradient(145deg, #f97316, #ea580c); }
.floating-avatar.fa-7 { background: linear-gradient(145deg, #ec4899, #db2777); }
.floating-avatar.fa-8 { background: linear-gradient(145deg, #6366f1, #4f46e5); }

.fa-1 { top: 3%;  left: 4%;   width: 84px; height: 84px; --rot: -10deg; animation-delay: 0s; }
.fa-2 { top: 6%;  right: 5%;  width: 70px; height: 70px; --rot: 8deg;   animation-delay: 0.7s; }
.fa-3 { top: 34%; left: 2%;   width: 62px; height: 62px; --rot: 6deg;   animation-delay: 1.2s; }
.fa-4 { top: 37%; right: 3%;  width: 78px; height: 78px; --rot: -8deg;  animation-delay: 1.7s; }
.fa-5 { top: 64%; left: 5%;   width: 68px; height: 68px; --rot: 10deg;  animation-delay: 0.3s; }
.fa-6 { top: 67%; right: 6%;  width: 74px; height: 74px; --rot: -6deg;  animation-delay: 1.0s; }
.fa-7 { top: 90%; left: 10%;  width: 58px; height: 58px; --rot: 5deg;   animation-delay: 1.5s; }
.fa-8 { top: 92%; right: 11%; width: 64px; height: 64px; --rot: -9deg;  animation-delay: 0.2s; }

@keyframes floaty {
    0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
    50% { transform: translateY(-14px) rotate(var(--rot, 0deg)); }
}

@media (max-width: 600px) {
    .floating-avatar { opacity: 0.35; }
    .fa-1 { width: 60px; height: 60px; }
    .fa-2 { width: 50px; height: 50px; }
    .fa-3 { width: 44px; height: 44px; }
    .fa-4 { width: 56px; height: 56px; }
    .fa-5 { width: 48px; height: 48px; }
    .fa-6 { width: 52px; height: 52px; }
    .fa-7 { width: 42px; height: 42px; }
    .fa-8 { width: 46px; height: 46px; }
}

/* Floating pill CTA: hovers above content while scrolling without blocking a full row of text */
.landing-cta-bar {
    position: sticky;
    bottom: 18px;
    z-index: 3;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    pointer-events: none;
}

.landing-cta-bar .landing-signin-btn {
    pointer-events: auto;
    background: rgba(37, 99, 235, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.landing-cta-bar .landing-signin-btn:hover {
    background: rgba(29, 78, 216, 0.92);
}

.google-icon {
    background: #ffffff;
    border-radius: 50%;
    padding: 3px;
    flex-shrink: 0;
}

.landing-logo .brand-svg-icon {
    width: 64px;
    height: 64px;
}

.landing-logo .logo-title {
    font-size: 2rem;
}

.landing-logo .logo-tagline {
    font-size: 0.9rem;
}

.landing-tagline {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 20px 0 28px;
    max-width: 520px;
}

.landing-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
    margin-bottom: 32px;
    text-align: left;
}

@media (max-width: 560px) {
    .landing-features {
        grid-template-columns: 1fr;
    }
}

.landing-feature-card {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.landing-feature-card strong {
    display: block;
    color: #ffffff;
    margin-bottom: 2px;
}

.landing-feature-card small {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.landing-signin-btn {
    font-size: 1.1rem;
    padding: 14px 28px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Side Drawer Navigation */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 998;
    display: none;
}

.nav-overlay.active {
    display: block;
}

.side-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background-color: #020617;
    border-right: 2px solid var(--border-color);
    z-index: 999;
    transition: left 0.25s ease-in-out;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.side-drawer.open {
    left: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-tab {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    min-height: 48px;
    transition: all 0.2s ease-in-out;
}

.drawer-tab:hover {
    background-color: #1e293b;
    color: #ffffff;
}

.drawer-tab.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: #60a5fa;
}

/* Container & Sections */
.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 16px;
}

.page-section {
    scroll-margin-top: 80px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e293b;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* Main Hero CTA Box */
.main-cta-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 3px solid #38bdf8;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.btn-cta-primary {
    background-color: #f59e0b;
    color: #000000;
    font-size: 1.4rem;
    font-weight: 800;
    padding: 16px 32px;
    border-radius: 12px;
    border: 2px solid #fde047;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-cta-primary:hover {
    background-color: #fbbf24;
    transform: scale(1.02);
}

.cta-subtext {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 16px;
    color: #38bdf8;
    font-size: 1.2rem;
}

.default-config-card {
    border-color: #0d9488;
    background-color: #0b1e28;
}

.month-selector-card {
    background-color: #020617;
    border: 2px solid var(--primary-color);
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: #020617;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.stat-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fde047;
}

/* Staff Grid */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.staff-card {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.staff-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.staff-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.role-badge {
    background-color: var(--secondary-color);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.staff-info-list {
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.staff-info-list p {
    margin-bottom: 6px;
}

.staff-card-actions {
    display: flex;
    gap: 10px;
}

/* Forms & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-grid-3col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-grid-2col {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.input-field {
    background-color: #020617;
    color: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    min-height: 44px;
    width: 100%;
}

.input-field:focus {
    border-color: #38bdf8;
    background-color: #0f172a;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.form-actions-full {
    grid-column: 1 / -1;
    margin-top: 10px;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background-color: #334155;
}

.btn-danger {
    background-color: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid #ef4444;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-height: 36px;
}

.btn-whatsapp {
    background-color: var(--whatsapp-color);
    color: #000000;
    font-weight: 800;
    width: 100%;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: #020617;
    color: #38bdf8;
    font-weight: 700;
}

.data-table tr:hover {
    background-color: #0f172a;
}

/* Quick Event Option Tiles */
.quick-event-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-option-btn {
    background-color: #020617;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    color: var(--text-main);
    cursor: pointer;
    min-height: 60px;
    transition: all 0.15s ease-in-out;
}

.event-option-btn:hover {
    border-color: #38bdf8;
    background-color: #0f172a;
}

.opt-icon {
    font-size: 1.6rem;
}

.event-option-btn strong {
    display: block;
    font-size: 1.05rem;
}

.event-option-btn small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Statements */
.statement-box {
    background-color: #020617;
    border: 2px solid #38bdf8;
}

.statement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.statement-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.statement-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1.05rem;
}

.statement-table td {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.statement-table .text-right {
    text-align: right;
    font-weight: 700;
}

.statement-table .text-danger { color: #fca5a5; }
.statement-table .text-success { color: #86efac; }
.statement-table .highlight-total {
    font-size: 1.3rem;
    color: #fde047;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.modal-box {
    background-color: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

.app-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}
