/* =====================================================
   ESS RETAIL BUSINESS - SHARED STYLES
   Netlify Production Version
===================================================== */

/* =====================================================
   CSS VARIABLES - LIGHT/DARK MODE
===================================================== */
:root {
    --primary: #E65100;
    --primary-light: #FF8A50;
    --primary-dark: #AC1900;
    --accent: #00BFA5;
    --success: #00C853;
    --warning: #FFD600;
    --danger: #FF1744;
    --info: #00B0FF;

    /* Light Mode */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.9);
}

/* =====================================================
   TOM SELECT STYLING
===================================================== */
.ts-wrapper .ts-control {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    min-height: 42px !important;
    padding: 6px 10px !important;
}

.ts-wrapper .ts-control input {
    color: var(--text-primary) !important;
}

.ts-dropdown {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow-md) !important;
    z-index: 9999 !important;
    position: absolute !important;
}

.ts-dropdown .option {
    color: var(--text-primary) !important;
    padding: 10px 12px !important;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background: var(--primary) !important;
    color: #fff !important;
}

.ts-wrapper.single .ts-control .item {
    color: var(--text-primary) !important;
    background: transparent !important;
}

/* =====================================================
   BASE STYLES
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* =====================================================
   LOGIN SCREEN
===================================================== */
#loginSection {
    position: fixed;
    inset: 0;
    background: url('../assets/bg-login.jpg') center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#loginSection::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

#loginSection .login-card {
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo i {
    font-size: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.form-floating>.form-control {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    height: 56px;
}

.form-floating>.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(230, 81, 0, 0.15);
}

.form-floating>label {
    color: var(--text-muted);
}

.btn-login {
    width: 100%;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 81, 0, 0.4);
}

/* Back and Logout Buttons */
.btn-back {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--danger);
    color: #fff;
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary);
}

/* =====================================================
   MAIN APPLICATION
===================================================== */
#appSection {
    display: none;
}

/* Header */
.app-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

/* Light mode - semi-transparent header with blur effect */
:root .app-header {
    background: rgba(79, 89, 102, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

:root .app-header .header-brand h1,
:root .app-header .header-title,
:root .app-header .brand-separator {
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Contrasting button colors in light mode */
:root .app-header .btn-back {
    background: rgba(255, 255, 255, 0.9);
    color: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

:root .app-header .btn-back:hover {
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:root .app-header .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    color: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

:root .app-header .theme-toggle:hover {
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:root .app-header .user-badge {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

:root .app-header .user-info .user-name {
    color: #FFFFFF;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

:root .app-header .user-info .user-role {
    color: rgba(255, 255, 255, 0.85);
}

/* btn-logout contrast in light mode */
:root .app-header .btn-logout {
    background: linear-gradient(135deg, #FF1744, #FF5252);
    color: #FFFFFF;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.3);
}

:root .app-header .btn-logout:hover {
    background: linear-gradient(135deg, #D50000, #FF1744);
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.4);
}

/* Dark mode keeps original dark styling */
[data-theme="dark"] .app-header {
    background: var(--bg-secondary);
    backdrop-filter: none;
    border-bottom: 1px solid var(--border-color);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-brand img {
    height: 40px;
}

.header-brand i {
    font-size: 32px;
    color: var(--primary);
}

.header-brand h1 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}

.header-brand span {
    color: var(--primary);
}

/* Eigerindo MPI Logo Styles */
.header-brand .header-logo {
    height: 36px;
    object-fit: contain;
}

.header-brand .brand-separator {
    color: var(--border-color);
    font-size: 24px;
    font-weight: 300;
    margin: 0 12px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 48px;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.btn-back {
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-logout {
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--danger);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.4);
}

/* =====================================================
   MENU CARDS
===================================================== */
.menu-container {
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
    position: relative;
}

/* Light mode - topographic background pattern */
:root .app-section {
    background: var(--bg-primary) url('../assets/bg-pattern.png') repeat;
    background-size: 400px auto;
    background-attachment: fixed;
    position: relative;
}

:root .app-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 250, 252, 0.85);
    pointer-events: none;
}

:root .menu-container {
    position: relative;
    z-index: 1;
}

/* Dark mode - mountain background image */
html[data-theme="dark"] .app-section {
    background: url('../assets/bg-dark-menu.jpg') center center / cover no-repeat fixed !important;
    background-color: var(--bg-primary) !important;
    position: relative;
    min-height: 100vh;
}

html[data-theme="dark"] .app-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5) !important;
    pointer-events: none;
    z-index: 0;
}

html[data-theme="dark"] .menu-container {
    position: relative;
    z-index: 1;
}

.menu-title {
    text-align: center;
    margin-bottom: 48px;
}

.menu-title h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.menu-title h2 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-title p {
    color: var(--text-secondary);
    font-size: 16px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.menu-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 40px 32px;
    border: 2px solid var(--border-color);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.menu-card:hover::before {
    transform: scaleX(1);
}

.menu-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: white;
    transition: all 0.3s ease;
}

.menu-card:hover .menu-icon {
    transform: scale(1.1) rotate(-5deg);
}

.menu-card.drumbeat .menu-icon {
    background: linear-gradient(135deg, #E65100 0%, #FF8A50 100%);
}

.menu-card.logbook .menu-icon {
    background: linear-gradient(135deg, #00BFA5 0%, #64FFDA 100%);
}

.menu-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.menu-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.menu-card .btn-enter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.menu-card:hover .btn-enter {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* =====================================================
   FORM CARDS
===================================================== */
.form-container {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.form-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: visible;
    margin-bottom: 24px;
}

.form-card-header {
    background: var(--primary);
    color: white;
    padding: 16px 24px;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-card-body {
    padding: 24px;
    overflow: visible;
    position: relative;
}

/* Info Row */
.info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
    overflow: visible;
    position: relative;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    position: relative;
}

.info-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Objectives Section */
.objectives-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.objective-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.objective-header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
}

.objective-body {
    padding: 16px;
}

.objective-field {
    margin-bottom: 16px;
}

.objective-field:last-child {
    margin-bottom: 0;
}

.objective-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 8px;
}

.objective-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    resize: both;
    font-family: inherit;
}

.objective-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

/* Link MOM Section */
.link-mom-section {
    margin-bottom: 24px;
}

.link-mom-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}

.link-mom-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

/* =====================================================
   WEEKLY SCHEDULE TABLE
===================================================== */
.schedule-section {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: center;
    font-size: 12px;
}

.schedule-table thead th {
    background: var(--primary);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
}

.schedule-table thead th.day-header {
    min-width: 150px;
}

.schedule-table .time-col {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    width: 100px;
    white-space: nowrap;
}

.schedule-table .date-row td {
    background: var(--primary-light);
    color: white;
    font-weight: 600;
}

.schedule-table .place-row td {
    background: var(--bg-tertiary);
}

.schedule-input {
    width: 100%;
    min-width: 120px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 11px;
    text-align: center;
}

.schedule-input:focus {
    outline: none;
    border-color: var(--primary);
}

.schedule-input.place-input {
    font-weight: 600;
}

/* Resizable columns */
.schedule-table th {
    resize: horizontal;
    overflow: auto;
}

/* =====================================================
   SUBMIT BUTTON
===================================================== */
.submit-section {
    text-align: center;
    padding: 24px;
}

.btn-submit {
    padding: 16px 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 81, 0, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =====================================================
   LOADING & TOAST
===================================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    z-index: 99999;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.loading-progress-container {
    width: 320px;
    max-width: 80vw;
    margin-top: 4px;
}

.loading-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #ffb74d);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.loading-step-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-align: center;
    margin-top: 6px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
}

.custom-toast {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    animation: slideIn 0.3s ease;
}

.custom-toast.success {
    border-left-color: var(--success);
}

.custom-toast.error {
    border-left-color: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
    .objectives-section {
        grid-template-columns: 1fr;
    }

    .info-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .menu-title h2 {
        font-size: 28px;
    }

    .header-brand h1 {
        font-size: 16px;
    }

    .form-container {
        padding: 16px;
    }
}

/* =====================================================
   COLLAPSIBLE SECTIONS
===================================================== */
.collapsible-header {
    cursor: pointer;
    justify-content: space-between;
    user-select: none;
}

.collapsible-header:hover {
    background: var(--primary-dark);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

/* =====================================================
   DATA TABLE (HISTORY)
===================================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.data-table thead th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.data-table a {
    color: var(--primary);
    margin-right: 8px;
}

.data-table a:hover {
    color: var(--primary-light);
}

.table-responsive {
    overflow-x: auto;
}

/* =====================================================
   MOBILE RESPONSIVE STYLES
===================================================== */

/* Tablet and below (max-width: 768px) */
@media (max-width: 768px) {

    /* Header adjustments */
    .app-header {
        padding: 12px 16px;
    }

    .header-brand h1 {
        font-size: 14px;
    }

    .header-brand .header-logo {
        height: 28px;
    }

    .header-brand .brand-separator {
        font-size: 18px;
        margin: 0 8px;
    }

    .header-actions {
        gap: 8px;
    }

    .btn-back span,
    .btn-logout span {
        display: none;
    }

    .user-badge {
        padding: 6px 10px;
    }

    .user-info {
        display: none;
    }

    /* Form container */
    .form-container {
        padding: 16px !important;
    }

    /* Info row - stack vertically */
    .info-row {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    /* Form card */
    .form-card-header {
        padding: 12px 16px;
        font-size: 16px;
    }

    .form-card-body {
        padding: 16px;
    }

    /* Schedule table - horizontal scroll */
    .schedule-section {
        overflow-x: auto;
    }

    .schedule-table {
        min-width: 600px;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 8px;
        font-size: 12px;
    }

    /* Objective cards */
    .objective-card {
        margin-bottom: 16px;
    }

    /* KPI section */
    .kpi-row {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /* Menu cards */
    .menu-grid {
        grid-template-columns: 1fr !important;
    }

    .menu-card {
        padding: 20px;
    }
}

/* Mobile phones (max-width: 480px) */
@media (max-width: 480px) {

    /* Header - wrap and stack */
    .app-header {
        padding: 10px;
    }

    .app-header>div {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Header brand - full width on mobile */
    .header-brand {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .header-brand h1 {
        font-size: 11px;
    }

    .header-brand .header-logo {
        height: 22px;
    }

    .header-brand .brand-separator {
        margin: 0 4px;
        font-size: 12px;
    }

    /* Header actions - center on mobile */
    .header-actions {
        width: 100%;
        justify-content: center;
        gap: 6px;
    }

    /* All buttons icon-only on mobile */
    .theme-toggle,
    .btn-back,
    .btn-logout {
        width: 34px;
        height: 34px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        font-size: 14px;
    }

    .btn-back i,
    .btn-logout i {
        margin: 0 !important;
    }

    /* User badge compact */
    .user-badge {
        padding: 4px 8px;
        gap: 6px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .user-info {
        display: none;
    }

    /* Login card */
    .login-card {
        padding: 20px;
        margin: 12px;
        max-width: 100%;
    }

    .login-logo img {
        height: 32px;
    }

    .login-title {
        font-size: 20px;
    }

    /* Menu container */
    .menu-container {
        padding: 20px 12px;
    }

    .menu-title h2 {
        font-size: 22px;
    }

    .menu-title p {
        font-size: 13px;
    }

    /* Menu cards */
    .menu-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .menu-card {
        padding: 20px;
    }

    .menu-card-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .menu-card h3 {
        font-size: 16px;
    }

    .menu-card p {
        font-size: 13px;
    }

    /* Form container */
    .form-container {
        padding: 12px !important;
    }

    /* Form inputs */
    .info-select,
    .schedule-input {
        font-size: 14px;
        padding: 10px 12px;
    }

    /* Schedule table */
    .schedule-section {
        overflow-x: auto;
    }

    .schedule-table {
        min-width: 500px;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 6px;
        font-size: 11px;
    }

    .schedule-input {
        font-size: 11px;
        padding: 6px 8px;
    }

    /* Place inputs */
    .place-input {
        font-size: 11px;
        padding: 6px 8px;
    }

    /* Submit button */
    .btn-submit {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* =====================================================
   SUMMARY DASHBOARD STYLES
===================================================== */
.summary-dashboard {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Filter Card */
.filter-card {
    margin-bottom: 24px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.filter-select {
    width: 100%;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.btn-filter-apply {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter-apply:hover {
    background: var(--primary-dark);
}

.btn-filter-reset {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter-reset:hover {
    background: var(--border-color);
}

/* Summary Cards */
.summary-card {
    margin-bottom: 24px;
}

.summary-card .form-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-download-summary {
    padding: 8px 16px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download-summary:hover {
    background: #00A844;
    transform: translateY(-1px);
}

/* Summary Table */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.summary-table th,
.summary-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.summary-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    white-space: nowrap;
}

.summary-table th.week-col {
    background: var(--primary-dark);
    min-width: 100px;
    width: 100px;
}

/* Standard column width for data cells */
.summary-table th:not(.week-col),
.summary-table td:not(.week-col) {
    min-width: 70px;
    width: 70px;
}

.summary-table tbody tr:nth-child(even) {
    background: var(--bg-tertiary);
}

.summary-table tbody tr:hover {
    background: rgba(230, 81, 0, 0.1);
}

/* Status Icons */
.status-submitted {
    color: var(--success);
    font-size: 18px;
}

.status-not-submitted {
    color: var(--danger);
    font-size: 18px;
}

/* Toggle Form Section */
.toggle-form-section {
    text-align: center;
    margin: 24px 0;
}

.btn-toggle-form {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 81, 0, 0.3);
}

.btn-toggle-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 81, 0, 0.4);
}

.btn-toggle-form.active {
    background: linear-gradient(135deg, var(--danger) 0%, #FF5252 100%);
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.3);
}

.btn-toggle-form.active:hover {
    box-shadow: 0 6px 20px rgba(255, 23, 68, 0.4);
}

/* Mobile Responsive for Summary */
@media (max-width: 768px) {
    .summary-dashboard {
        padding: 16px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-item {
        min-width: 100%;
    }

    .filter-actions {
        width: 100%;
        justify-content: center;
    }

    .summary-table {
        font-size: 11px;
    }

    .summary-table th,
    .summary-table td {
        padding: 6px 4px;
    }

    .summary-table th {
        font-size: 9px;
    }

    .status-submitted,
    .status-not-submitted {
        font-size: 14px;
    }
}

/* =====================================================
   SUMMARY TABLE SCROLL & COLLAPSIBLE
===================================================== */

/* Header left section for collapsible */
.summary-card .form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.summary-card .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-card .header-left .toggle-icon {
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.summary-card .header-left .toggle-icon.collapsed {
    transform: rotate(-90deg);
}

/* Summary body collapsible */
.summary-body {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Table scroll wrapper - max 10 rows (~400px) */
.table-scroll-wrapper {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.table-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Sticky header for scroll */
.table-scroll-wrapper .summary-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-scroll-wrapper .summary-table thead th {
    background: var(--primary);
}

/* =====================================================
   CLICKABLE SLIDE LINKS
===================================================== */
.slide-link {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.slide-link:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.slide-link .status-submitted {
    pointer-events: none;
}

/* =====================================================
   FIXED DESKTOP LAYOUT
   Viewport is set to width=1200 in HTML
   Mobile will scroll horizontally to see full desktop view
===================================================== */
html,
body {
    min-width: 1200px;
    overflow-x: auto;
}

/* =====================================================
   STICKY FIRST COLUMN (WEEK) FOR SUMMARY TABLES
===================================================== */
.summary-table-wrapper {
    overflow-x: auto;
    max-width: 100%;
    position: relative;
}

.summary-table {
    border-collapse: separate;
    border-spacing: 0;
}

/* Sticky first column (Week) */
.summary-table th:first-child,
.summary-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-secondary);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.summary-table thead th:first-child {
    z-index: 3;
    background: var(--primary);
}

/* Ensure proper borders for sticky column */
.summary-table td:first-child {
    border-right: 2px solid var(--primary);
}

.summary-table th:first-child {
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

/* =====================================================
   DARK HORIZONTAL FILTER PANEL
===================================================== */
.filter-panel-dark {
    background: #1a1f2e;
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    border: 1px solid #2d3548;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) auto;
    gap: 24px;
    align-items: flex-end;
}

.filter-col {
    min-width: 0;
}

.filter-col-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 2px;
}

.filter-label-dark {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8b95a9;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

/* Tom Select Dark Theme Override - WIDER & MORE SPACIOUS */
.filter-panel-dark .ts-wrapper {
    width: 100%;
}

.filter-panel-dark .ts-wrapper .ts-control {
    background: #252b3d !important;
    border: 1px solid #3d4559 !important;
    border-radius: 8px !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
    color: #ffffff !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
}

.filter-panel-dark .ts-wrapper .ts-control input {
    color: #ffffff !important;
    font-size: 14px !important;
}

.filter-panel-dark .ts-wrapper .ts-control input::placeholder {
    color: #6b7589 !important;
    font-size: 14px !important;
}

.filter-panel-dark .ts-dropdown {
    background: #252b3d !important;
    border: 1px solid #3d4559 !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.filter-panel-dark .ts-dropdown .option {
    color: #ffffff !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
}

.filter-panel-dark .ts-dropdown .option:hover,
.filter-panel-dark .ts-dropdown .option.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

/* Blue Chips for Selected Items - BETTER STYLED */
.filter-panel-dark .ts-wrapper.multi .ts-control>.item {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    line-height: 1.2 !important;
}

.filter-panel-dark .ts-wrapper.multi .ts-control>.item .remove {
    color: rgba(255, 255, 255, 0.7) !important;
    border-left: none !important;
    margin-left: 4px !important;
    padding-left: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
}

.filter-panel-dark .ts-wrapper.multi .ts-control>.item .remove:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
}

/* Clear button styling */
.filter-panel-dark .ts-wrapper .clear-button {
    color: #8b95a9 !important;
    padding: 0 8px !important;
}

.filter-panel-dark .ts-wrapper .clear-button:hover {
    color: #ffffff !important;
}

/* Cyan Filter Button - TALLER */
.btn-filter-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    height: 44px;
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-filter-dark:hover {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

/* Reset Button - MATCHING HEIGHT */
.btn-reset-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #3d4559;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset-dark:hover {
    background: #4d5669;
    transform: rotate(180deg);
}

/* =====================================================
   MODAL OVERLAY (Draft Popup)
===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-primary);
}

.btn-primary {
    background: var(--primary);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Save Draft Button */
.btn-save-draft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--primary);
    border-radius: 10px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save-draft:hover {
    background: var(--primary);
    border-style: solid;
    color: white;
}

/* =====================================================
   FORCE DESKTOP VIEW ON MOBILE
   Mobile users will see exact same layout as desktop
   with horizontal scrolling enabled
===================================================== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        min-width: 1200px;
        overflow-x: auto;
    }
}