@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Root Stylesheet Tokens */
:root {
    --color-primary: #7380ec;
    --color-danger: #ff7782;
    --color-success: #41f1b6;
    --color-warning: #ffbb55;
    --color-white: #fff;
    --color-info-dark: #7d8da1;
    --color-info-light: #dce1eb;
    --color-dark: #363949;
    --color-light: rgba(132, 139, 200, 0.18);
    --color-primary-variant: #111e88;
    --color-dark-variant: #677483;
    --color-background: #f6f6f9;

    --color-cal-present: rgba(65, 241, 182, 0.2);  
    --color-cal-warning: rgba(255, 187, 85, 0.25); 
    --color-cal-danger: rgba(255, 119, 130, 0.18);  
    --color-cal-holiday: rgba(181, 122, 242, 0.18); 
    --color-cal-custom: rgba(33, 150, 243, 0.18);

    --card-border-radius: 2rem;
    --border-radius-1: 0.4rem;
    --border-radius-2: 0.8rem;
    --border-radius-3: 1.2rem;

    --card-padding: 1.8rem;
    --padding-1: 1.2rem;

    --box-shadow: 0 2rem 3rem var(--color-light);
}

/* ===================== SYNCHRONIZED LAVENDER/PURPLE DARK THEME ADAPTATIONS ===================== */
body.dark-theme-variables {
    --color-background: #181a1e;
    --color-white: #202528;
    --color-dark: #edeffd;
    --color-dark-variant: #a3bdcc;
    --color-light: rgba(0, 0, 0, 0.4);
    --box-shadow: 0 2rem 3rem var(--color-light);
}

body.dark-theme-variables h1, 
body.dark-theme-variables h2,
body.dark-theme-variables h3,
body.dark-theme-variables b,
body.dark-theme-variables th,
body.dark-theme-variables .setup-card h2,
body.dark-theme-variables .setup-card label,
body.dark-theme-variables .setup-card p,
body.dark-theme-variables p,
body.dark-theme-variables .text-muted,
body.dark-theme-variables .calendar-note p,
body.dark-theme-variables .calendar-picker-box label,
body.dark-theme-variables small {
    color: #fff !important;
}

body.dark-theme-variables .material-icons-sharp,
body.dark-theme-variables aside .sidebar a span,
body.dark-theme-variables .insights > div span,
body.dark-theme-variables .profile-details span,
body.dark-theme-variables .calendar-section h2 span {
    color: #fff !important;
}

body.dark-theme-variables .day-number:not(.present):not(.half-day):not(.absent):not(.holiday):not(.custom):not(.empty) {
    background: #2b3035 !important;
    color: #fff !important;
}

body.dark-theme-variables .day-number.empty { background: transparent !important; }
body.dark-theme-variables .modal-content,
body.dark-theme-variables .setup-card { background: #202528; }

body.dark-theme-variables input,
body.dark-theme-variables select { 
    background: #2b3035 !important; 
    color: #ffffff !important; 
    border-color: var(--color-info-dark) !important; 
}
body.dark-theme-variables input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.8);
    opacity: 0.95;
}
body.dark-theme-variables .profile-photo-icon span { color: #fff !important; }

* {
    margin: 0;
    padding: 0;
    outline: 0;
    appearance: none;
    border: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

html { font-size: 14px; }

body {
    width: 100vw;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    background: var(--color-background);
    user-select: none;
    overflow-x: hidden;
}

/* ===================== CANVA STYLE SLIDING SWITCH SYSTEM ===================== */
.theme-switch-wrapper {
    cursor: pointer;
    user-select: none;
    padding: 0.2rem;
}
.theme-switch-pill {
    position: relative;
    width: 4.8rem;
    height: 2.2rem;
    background: var(--color-light);
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
    border: 1px solid var(--color-info-light);
    transition: background 300ms ease;
}
body.dark-theme-variables .theme-switch-pill {
    background: #2b3035;
    border-color: #4f565d;
}
.theme-switch-pill span {
    font-size: 1.1rem;
    z-index: 2;
    color: var(--color-info-dark);
    transition: color 300ms ease;
}
.theme-switch-pill .icon-light { color: #fff !important; }
body.dark-theme-variables .theme-switch-pill .icon-dark { color: #fff !important; }
body.dark-theme-variables .theme-switch-pill .icon-light { color: var(--color-info-dark) !important; }

.theme-switch-handle {
    position: absolute;
    left: 0.2rem;
    top: 0.15rem;
    width: 2.2rem;
    height: 1.8rem;
    background: var(--color-primary);
    border-radius: 40px;
    z-index: 1;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
body.dark-theme-variables .theme-switch-handle {
    transform: translateX(2.1rem);
    background: #bb86fc; 
    box-shadow: 0 0 12px rgba(187, 134, 252, 0.7);
}

/* ===================== SIDEBAR LAYOUTS ===================== */
aside {
    height: 100vh;
    position: fixed;
    width: 14rem;
    z-index: 10;
    background: var(--color-background);
    transition: background 300ms ease;
}
aside .top { display: flex; align-items: center; justify-content: space-between; margin-top: 1.4rem; padding: 0 1rem; }
aside .logo { display: flex; gap: 0.8rem; align-items: center; }
aside .logo img { width: 2rem; height: 2rem; }
aside .close { display: none; }
aside .sidebar { display: flex; flex-direction: column; height: 86vh; position: relative; top: 3rem; }
aside h3 { font-weight: 500; }
aside .sidebar a {
    display: flex;
    color: var(--color-info-dark);
    margin-left: 2rem;
    gap: 1rem;
    align-items: center;
    position: relative;
    height: 3.7rem;
    transition: all 300ms ease;
}
aside .sidebar a span { font-size: 1.6rem; transition: all 300ms ease; }
aside .sidebar a:last-child { position: absolute; bottom: 2rem; width: 100%; }
aside .sidebar a.active { background: var(--color-light); color: var(--color-primary); margin-left: 0; }
aside .sidebar a.active:before { content: ""; width: 6px; height: 100%; background: var(--color-primary); }
aside .sidebar a.active span { color: var(--color-primary); margin-left: calc(1rem - 3px); }
aside .sidebar a:hover { color: var(--color-primary); }
aside .sidebar a:hover span { margin-left: 1rem; }

.container {
    width: 96%;
    margin: 0 auto;
    position: relative;
}

main {
    padding-top: 1.4rem;
    margin-left: 15.8rem; 
    width: calc(100% - 15.8rem);
    min-height: 100vh;
    display: block; 
}

.top-header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0.5rem;
    padding-top: 1rem; 
    width: 100%;
}
.top-header-right #menu-btn { display: none; background: transparent; color: var(--color-dark); cursor: pointer; }
.top-header-right .profile-nav { display: flex; gap: 1rem; text-align: right; align-items: center; cursor: pointer; padding: 0.2rem 0.5rem; border-radius: var(--border-radius-2); transition: background 200ms ease; }
.top-header-right .profile-nav:hover { background: var(--color-light); }

.profile-photo-icon { display: flex; align-items: center; justify-content: center; }
.profile-photo-icon span { font-size: 2.4rem !important; color: var(--color-dark); transition: color 200ms ease; }

/* LARGE CRISP GRAYISH INPUT TEXTFIELDS */
.form-group { position: relative; display: flex; flex-direction: column; gap: 0.5rem; width: 100%; margin-bottom: 1.1rem; }
.form-group label { font-size: 0.86rem; font-weight: 600; color: var(--color-dark-variant); text-transform: none; }
.form-group input, .form-group select { 
    padding: 0.95rem 1.2rem !important; 
    border: 1px solid var(--color-info-light) !important; 
    border-radius: var(--border-radius-2) !important; 
    font-family: inherit; font-size: 0.95rem; 
    background: #f3f4f6 !important; 
    color: #202528 !important; 
    width: 100% !important; 
    box-sizing: border-box !important;
    height: auto !important;
}
.form-group input::placeholder { color: var(--color-info-dark); opacity: 0.8; }

.input-password-container { position: relative; width: 100%; }
.toggle-password-visibility {
    position: absolute;
    right: 1.2rem;
    bottom: 0.88rem; 
    cursor: pointer;
    color: var(--color-info-dark);
    z-index: 20;
    font-size: 1.35rem !important;
}
.toggle-password-visibility:hover { color: var(--color-primary); }

/* ===================== BANNER METRICS ===================== */
.profile-banner { background: var(--color-white); padding: var(--card-padding); border-radius: var(--card-border-radius); box-shadow: var(--box-shadow); display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.profile-details .badge { background: rgba(65, 241, 182, 0.15); color: #1b9c70; padding: 0.3rem 0.8rem; border-radius: var(--border-radius-1); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.profile-details h2 { font-weight: 700; margin-top: 0.5rem; color: var(--color-dark); }
.profile-details .sub-details { display: flex; gap: 1.5rem; margin-top: 0.5rem; }
.profile-details .sub-details p { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.profile-details .sub-details span { font-size: 1.1rem; color: var(--color-info-dark); }

.current-timeline-badges {
    margin-top: 0.6rem !important;
    background: var(--color-light) !important;
    padding: 0.25rem 0.6rem !important;
    border-radius: var(--border-radius-1) !important;
    display: inline-flex !important;
    flex-wrap: wrap !important; 
    align-items: center;
    gap: 1rem !important;
}
.current-timeline-badges p { font-size: 0.75rem !important; font-weight: 500; color: var(--color-dark-variant) !important; line-height: 1 !important; }
.current-timeline-badges p span.material-icons-sharp { font-size: 0.95rem !important; color: var(--color-info-dark) !important; }
.current-timeline-badges b { font-weight: 600; color: var(--color-dark) !important; }

.intern-progress { display: flex; flex-direction: column; min-width: 220px; }
.intern-progress h3 { font-size: 0.8rem; color: var(--color-dark-variant); margin-bottom: 0.4rem; text-transform: uppercase; }
.progress-bar-wrapper { width: 100%; height: 10px; background: var(--color-light); border-radius: var(--border-radius-2); overflow: hidden; margin-bottom: 0.3rem; }
.progress-bar-fill { width: 0%; height: 100%; background: var(--color-primary); border-radius: var(--border-radius-2); transition: width 0.5s ease; }

.insights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; margin-bottom: 2rem; }
.insights > div { background: var(--color-white); padding: var(--card-padding); border-radius: var(--card-border-radius); box-shadow: var(--box-shadow); }
.insights > div span { background: var(--color-primary); padding: 0.5rem; border-radius: 50%; color: var(--color-white); font-size: 2rem; }
.insights .hours-earned span { background: var(--color-success); }
.insights .hours-to-go span { background: var(--color-warning); }
.insights .days-remaining span { background: var(--color-danger); }
.insights .middle { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; }
.insights h3 { font-size: 0.75rem; color: var(--color-dark-variant); text-transform: uppercase; }
.insights h1 { font-size: 1.6rem; margin-top: 0.3rem; color: var(--color-dark); }

/* ===================== RESPONSIVE CONTROL GRID FIXED WORKSPACES ===================== */
.responsive-table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
    width: 100%; border-collapse: separate; border-spacing: 0; text-align: center; margin-top: 0.8rem;
    border-radius: var(--border-radius-2); overflow: hidden; border: 1px solid var(--color-info-light);
}
table th {
    padding: 0.8rem 0.5rem; color: var(--color-dark); font-weight: 600; font-size: 0.85rem;
    background: var(--color-background); border-bottom: 2px solid var(--color-info-light); border-right: 1px solid var(--color-info-light); vertical-align: middle;
}
table td {
    padding: 0.85rem 0.5rem; font-size: 0.85rem; color: var(--color-dark-variant);
    border-bottom: 1px solid var(--color-info-light); border-right: 1px solid var(--color-info-light); background: var(--color-white); vertical-align: middle;
}

table tr th:last-of-type, table tr td:last-child { border-right: none; }
table thead tr:first-child th { border-right: 1px solid var(--color-info-light); }
table thead tr:first-child th:last-child { border-right: none; }
table tbody tr:last-child td { border-bottom: none; }
table tbody td strong { color: var(--color-primary); font-weight: 700; }
table tbody tr td.text-muted { padding: 2rem !important; font-style: italic; background: rgba(132, 139, 200, 0.03); }

.table-actions-container { display: flex; gap: 0.4rem; justify-content: center; align-items: center; }
.action-edit-row-btn {
    background: var(--color-primary); color: white; padding: 0.3rem 0.6rem; border-radius: var(--border-radius-1);
    font-size: 0.78rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 0.2rem; transition: all 200ms ease; border: none;
}
.action-edit-row-btn:hover { background: var(--color-primary-variant); }

.action-delete-row-btn {
    background: var(--color-danger); color: white; padding: 0.3rem 0.6rem; border-radius: var(--border-radius-1);
    font-size: 0.78rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 0.2rem; transition: all 200ms ease; border: none;
}
.action-delete-row-btn:hover { background: #d94b56; }
.action-clear-all-dtr-btn {
    background: var(--color-danger);
    color: #ffffff;
    padding: 0.55rem 0.8rem;
    border-radius: var(--border-radius-1);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    transition: background 200ms ease, transform 200ms ease;
}
.action-clear-all-dtr-btn span {
    font-size: 1rem !important;
    color: #ffffff !important;
}
.action-clear-all-dtr-btn:hover {
    background: #d94b56;
    transform: translateY(-1px);
}

.dashboard-bottom-row { display: flex; gap: 1.6rem; margin-top: 2rem; width: 100%; }
.preview-card { background: var(--color-white); padding: var(--card-padding); border-radius: var(--card-border-radius); box-shadow: var(--box-shadow); width: 100%; }
.dtr-preview { flex: 2; }
.calendar-preview { flex: 1.2; display: flex; flex-direction: column; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-header h2 { color: var(--color-dark); font-size: 1.2rem; font-weight: 700; }

.shortcut-icon { font-size: 1.2rem; color: var(--color-info-dark); cursor: pointer; opacity: 0; transform: scale(0.9); transition: all 250ms ease; padding: 0.4rem; border-radius: 50%; background: var(--color-background); }
.preview-card:hover .shortcut-icon { opacity: 1; transform: scale(1); }
.shortcut-icon:hover { color: var(--color-primary); background: var(--color-light); }

/* ===================== LOG ATTENDANCE WORKSPACES ===================== */
/* ===================== CALENDAR DISPLAY CONFIGURATIONS ===================== */
.custom-calendar-container {
    background: var(--color-white);
    border-radius: var(--border-radius-3);
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.calendar-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.4rem;
}

.calendar-header-nav h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark);
}

.calendar-nav-buttons {
    display: flex;
    gap: 0.3rem;
}

.calendar-nav-buttons .nav-btn {
    background: var(--color-background);
    color: var(--color-dark);
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

/* Dashboard calendar preview: old rounded layout */
.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 0.6rem !important;
    text-align: center !important;
    width: 100% !important;
}

.day-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-info-dark);
    padding-bottom: 0.2rem;
}

.day-number {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--color-dark);
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    background: var(--color-background);
}

.day-number.present {
    background: var(--color-cal-present);
    color: #1b9c70 !important;
    font-weight: 600;
}

.day-number.half-day {
    background: var(--color-cal-warning);
    color: #b57a22 !important;
    font-weight: 600;
}

.day-number.absent {
    background: var(--color-cal-danger);
    color: #d94b56 !important;
    font-weight: 600;
}

.day-number.holiday {
    background: var(--color-cal-holiday);
    color: #7c5cfa !important;
    font-weight: 600;
}

.day-number.custom {
    background: var(--color-cal-custom);
    color: #1565c0 !important;
    font-weight: 600;
}

.mini-note { display: flex; align-items: center; gap: 0.4rem; color: var(--color-dark-variant); background: var(--color-light); padding: 0.7rem; border-radius: var(--border-radius-2); margin-top: auto; }
.mini-note span { font-size: 1.1rem; color: var(--color-primary); }

/* ===================== LOG ATTENDANCE WORKSPACES ===================== */
.calendar-split-container { display: flex; gap: 1.6rem; margin-top: 1.5rem; width: 100%; align-items: flex-start; }
.calendar-section { flex: 1; min-width: 280px; background: var(--color-white); padding: var(--card-padding); border-radius: var(--card-border-radius); box-shadow: var(--box-shadow); }
.calendar-picker-box { background: var(--color-background); padding: var(--padding-1); border-radius: var(--border-radius-3); border: 1px solid var(--color-info-light); }
.calendar-picker-box input { width: 100%; padding: 0.8rem; border-radius: var(--border-radius-2); background: var(--color-white); border: 1px solid var(--color-info-dark); font-family: inherit; color: var(--color-dark); }

.manual-grid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 0.8rem; }
.custom-select-input { width: 100%; padding: 0.8rem; border-radius: var(--border-radius-2); background: var(--color-white); border: 1px solid var(--color-info-dark); color: var(--color-dark); font-family: inherit; font-size: 0.95rem; cursor: pointer; }
.metric-time-picker {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
}
.metric-time-picker select {
    width: 100% !important;
    padding: 0.78rem 0.65rem !important;
    border: 1px solid var(--color-info-light) !important;
    border-radius: var(--border-radius-2) !important;
    background: #f3f4f6 !important;
    color: #202528 !important;
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}
.metric-time-picker select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(115, 128, 236, 0.14);
}
.log-shift-btn { width: 100%; background: var(--color-primary); color: #fff; padding: 0.8rem; border-radius: var(--border-radius-2); font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; border: none; }

.google-calendar-card { flex: 2; min-width: 450px; background: var(--color-white); border-radius: var(--card-border-radius); padding: var(--card-padding); box-shadow: var(--box-shadow); }
.gcal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; color: var(--color-dark); }
/* Calendar workspace full view: table layout */
.gcal-wrapper {
    border: 1px solid var(--color-info-light);
    border-radius: var(--border-radius-2);
    overflow: hidden;
    background: var(--color-white);
}

.gcal-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--color-background);
    text-align: center;
    font-weight: 600;
    color: var(--color-dark);
}

.gcal-grid-header div {
    padding: 0.75rem 0.4rem;
    border-right: 1px solid var(--color-info-light);
    border-bottom: 1px solid var(--color-info-light);
}

.gcal-grid-header div:last-child {
    border-right: none;
}

.gcal-grid-body {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 0 !important;
    text-align: center !important;
    width: 100% !important;
}

.gcal-cell {
    min-height: 6.8rem;
    border-right: 1px solid var(--color-info-light);
    border-bottom: 1px solid var(--color-info-light);
    padding: 0.55rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    background: var(--color-white);
}

.gcal-cell:nth-child(7n) {
    border-right: none;
}

.gcal-cell .cell-num {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-dark-variant);
}

.gcal-cell .cell-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.4rem;
    border-radius: var(--border-radius-1);
    font-weight: 500;
    text-align: center;
    margin-top: auto;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gcal-cell.present-cell {
    background: rgba(65, 241, 182, 0.08);
}

.gcal-cell.present-cell .cell-badge {
    background: var(--color-success);
    color: #1b9c70 !important;
}

.gcal-cell.half-day-cell {
    background: rgba(255, 187, 85, 0.08);
}

.gcal-cell.half-day-cell .cell-badge {
    background: var(--color-warning);
    color: #b57a22 !important;
}

.gcal-cell.absent-cell {
    background: rgba(255, 119, 130, 0.08);
}

.gcal-cell.absent-cell .cell-badge {
    background: var(--color-danger);
    color: #d94b56 !important;
}

.gcal-cell.holiday-cell {
    background: rgba(181, 122, 242, 0.08);
}

.gcal-cell.holiday-cell .cell-badge {
    background: #b57af2;
    color: #7c5cfa !important;
}

.gcal-cell.custom-cell {
    background: rgba(33, 150, 243, 0.09);
}

.gcal-cell.custom-cell .cell-badge {
    background: #2196f3;
    color: #0d47a1 !important;
}

.gcal-cell.empty-cell {
    background: rgba(132, 139, 200, 0.04);
    opacity: 0.4;
}

.full-dtr-card { width: 100%; overflow-x: auto; }
.full-width-table { min-width: 750px; }

/* ===================== FIXED GATE OVERLAY CONTEXT MATRIX ===================== */
.app-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background);
    color: var(--color-dark);
    transition: opacity 250ms ease, visibility 250ms ease;
}
.app-loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.app-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}
.app-loading-card h2 {
    color: var(--color-dark);
    font-size: 1.35rem;
}
.app-loading-card p {
    color: var(--color-dark-variant);
    font-size: 0.85rem;
}
.app-loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--color-info-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.setup-overlay { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background: var(--color-background); z-index: 9999; 
    display: flex; align-items: center; justify-content: center;
    opacity: 1; visibility: visible; transition: all 300ms ease;
}
.setup-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
}
.setup-overlay[style*="display: none"] {
    display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; z-index: -1000 !important;
}

.setup-card { background: var(--color-white); padding: 2.5rem; border-radius: var(--card-border-radius); width: 92%; max-width: 500px; box-shadow: var(--box-shadow); overflow-y:auto; max-height:95vh; position: relative; }

/* BUTTON CLASSIFICATION PACKAGES */
.start-system-btn { 
    width: 100%; padding: 0.95rem; font-size: 1rem; font-weight: 600; border-radius: var(--border-radius-2); cursor: pointer; text-align: center; margin-top: 0.5rem; border: none; transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-action-login-purple-btn {
    background: var(--color-primary) !important; color: #fff !important;
    box-shadow: 0 0.4rem 1rem rgba(115, 128, 236, 0.25);
}
.form-action-login-purple-btn:hover { background: var(--color-primary-variant) !important; }

.form-submit-register-green-btn {
    background: var(--color-success) !important; color: #1b9c70 !important;
    box-shadow: 0 0.4rem 1rem rgba(65, 241, 182, 0.25);
}
.form-submit-register-green-btn:hover { background: #32ca96 !important; color: #0e6b4b !important; }

/* MODALS LAYOUT ALIGNMENTS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.5); z-index: 10000; display: none; align-items: center; justify-content: center; }
.modal-overlay[style*="display: block"], .modal-overlay[style*="display: flex"] { display: flex !important; }
.modal-content { background: var(--color-white) !important; padding: 2.2rem !important; border-radius: var(--card-border-radius) !important; width: 90% !important; max-width: 460px !important; box-shadow: var(--box-shadow) !important; animation: fadeIn 300ms ease; overflow-y: auto; max-height: 90vh; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; width: 100%; }
.modal-header h2 { font-weight: 700; color: var(--color-dark); font-size: 1.35rem; }
.modal-body { display: flex; flex-direction: column; gap: 1rem; width: 100%; text-align: left; }

.save-profile-btn { 
    width: 100% !important; background: var(--color-primary) !important; color: #fff !important; padding: 0.95rem !important; font-weight: 600 !important; border-radius: var(--border-radius-2) !important; cursor: pointer !important; text-align: center !important; border: none !important; display: block !important; font-family: inherit !important; font-size: 0.95rem !important; transition: all 200ms ease !important; box-shadow: 0 4px 10px rgba(115, 128, 236, 0.2) !important; margin: 0 !important;
}
.save-profile-btn:hover { background: var(--color-primary-variant) !important; }

.destructive-red-action-btn {
    background: #ff4d4d !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(255, 77, 77, 0.25) !important;
}
.destructive-red-action-btn:hover { background: #e63939 !important; }
.delete-account-confirm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.delete-account-confirm-actions .save-profile-btn {
    min-width: 0 !important;
    height: 3.45rem !important;
    padding: 0.85rem 0.75rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
}
.delete-account-confirm-actions .material-icons-sharp {
    margin-right: 0 !important;
}
.secondary-auth-action-btn {
    background: var(--color-background) !important;
    color: var(--color-dark) !important;
    border: 1px solid var(--color-info-light) !important;
    box-shadow: none !important;
    margin-top: 0.6rem !important;
}
.secondary-auth-action-btn:hover {
    background: var(--color-light) !important;
}
.close-modal { cursor: pointer; color: var(--color-info-dark); font-size: 1.4rem; }

/* FOOTERS WATERMARKS */
footer { width: 100%; margin-top: auto; padding: 2.5rem 0 1rem 0; text-align: center; }
footer .footer-content p { font-size: 0.8rem; color: var(--color-info-dark); font-weight: 500; letter-spacing: 0.3px; }
footer .footer-content span { color: var(--color-primary); font-weight: 700; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== RESPONSIVE CONFIGURATIONS ===================== */
@media screen and (max-width: 1200px) {
    aside { width: 5.6rem; } aside .logo h2, aside .sidebar h3 { display: none; } aside .sidebar a { width: 5.6rem; } aside .sidebar a:last-child { position: relative; margin-top: 1.8rem; }
    main { margin-left: 7.4rem; width: calc(100% - 7.4rem); }
    .insights { grid-template-columns: repeat(2, 1fr); gap: 1rem; } .profile-banner { flex-direction: column; align-items: flex-start; gap: 1.5rem; } .dashboard-bottom-row { flex-direction: column; }
}
@media screen and (max-width: 768px) {
    html { font-size: 13px; }
    body {
        width: 100%;
        overflow-x: hidden;
    }
    .container {
        width: 100%;
        padding: 0;
        overflow-x: hidden;
    }
    aside {
        width: 16rem !important;
        height: 100dvh;
        background: var(--color-white);
        box-shadow: 1rem 0 2rem rgba(0, 0, 0, 0.18);
        transform: translateX(-110%);
        transition: transform 260ms ease;
        z-index: 11000;
    }
    aside.sidebar-open {
        transform: translateX(0);
    }
    aside .top {
        margin-top: 1rem;
    }
    aside .logo h2,
    aside .sidebar h3 {
        display: block !important;
    }
    aside .close {
        display: block !important;
        cursor: pointer;
    }
    aside .sidebar {
        top: 2rem;
        height: calc(100dvh - 6rem);
    }
    aside .sidebar a {
        width: 100% !important;
        height: 3.8rem;
        margin-left: 1rem;
    }
    aside .sidebar a:last-child {
        position: absolute;
        bottom: 1rem;
        margin-top: 0;
    }
    aside .sidebar a:hover span {
        margin-left: 0;
    }
    main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem;
        padding-top: 1rem;
        overflow-x: hidden;
    }
    main > section > h1 {
        font-size: 2rem;
        line-height: 1.1;
        word-break: normal;
    }
    .top-header-right {
        justify-content: flex-start;
        gap: 0.75rem;
        padding-top: 0.25rem;
        margin-bottom: 1rem;
    }
    .top-header-right #menu-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 2.8rem;
        height: 2.8rem;
        border-radius: var(--border-radius-2);
        background: var(--color-white);
        box-shadow: var(--box-shadow);
        margin-right: auto;
        flex-shrink: 0;
    }
    .top-header-right .theme-switch-wrapper {
        flex-shrink: 0;
    }
    .top-header-right .profile-nav {
        gap: 0.5rem;
        padding: 0.2rem;
        flex-shrink: 0;
    }
    .top-header-right .profile-nav .info p {
        font-size: 0.9rem;
    }
    .theme-switch-pill {
        width: 4.2rem;
        height: 2rem;
    }
    .theme-switch-handle {
        width: 1.9rem;
        height: 1.6rem;
    }
    body.dark-theme-variables .theme-switch-handle {
        transform: translateX(1.9rem);
    }
    .profile-banner {
        padding: 1.25rem;
        border-radius: var(--border-radius-3);
        width: 100%;
    }
    .profile-details {
        width: 100%;
    }
    .profile-details h2 {
        font-size: 1.45rem;
        line-height: 1.2;
    }
    .profile-details .sub-details,
    .current-timeline-badges {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem !important;
        width: 100%;
    }
    .intern-progress {
        width: 100%;
        min-width: 0;
    }
    .insights {
        grid-template-columns: 1fr;
    }
    .insights > div,
    .preview-card,
    .calendar-section,
    .google-calendar-card {
        border-radius: var(--border-radius-3);
        padding: 1.25rem;
    }
    .dashboard-bottom-row,
    .calendar-split-container {
        flex-direction: column;
        gap: 1rem;
    }
    .calendar-section,
    .google-calendar-card {
        width: 100%;
        min-width: 0;
        flex: none;
    }
    .calendar-picker-box {
        padding: 1rem;
    }
    .manual-grid-row {
        grid-template-columns: 1fr;
    }
    .gcal-header {
        gap: 0.75rem;
        align-items: flex-start;
    }
    .gcal-header h2 {
        font-size: 1.35rem;
        line-height: 1.2;
    }
    .gcal-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .gcal-grid-header,
    .gcal-grid-body {
        min-width: 560px;
    }
    .gcal-cell {
        min-height: 5.2rem;
        padding: 0.45rem;
    }
    .full-dtr-card {
        overflow-x: auto;
    }
    .delete-account-confirm-actions { grid-template-columns: 1fr; }
}

@media screen and (max-width: 420px) {
    main {
        padding: 0.85rem;
    }
    main > section > h1 {
        font-size: 1.75rem;
    }
    .top-header-right {
        gap: 0.45rem;
    }
    .profile-photo-icon span {
        font-size: 2rem !important;
    }
    .top-header-right .profile-nav .info small {
        display: none;
    }
    .insights h1 {
        font-size: 1.45rem;
    }
}