/* ===== IQUL Corporate Light Theme ===== */

:root {
    --primary: #0f4c81;
    --primary-dark: #0b3a63;
    --primary-light: #eaf2f8;

    --background: #f7f9fc;
    --surface: #ffffff;
    --surface-alt: #f3f6fa;

    --text-primary: #1b2430;
    --text-secondary: #5b6675;
    --text-muted: #7f8a98;

    --border: #dbe3ec;
    --border-strong: #c6d1dd;

    --danger: #c62828;
    --danger-bg: #fdecec;

    --success: #2e7d32;
    --success-bg: #eaf7ed;

    --warning: #ef6c00;
    --warning-bg: #fff4e8;

    --shadow-sm: 0 2px 8px rgba(15, 36, 60, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 36, 60, 0.08);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --transition: 0.18s ease;
}

/* ===== Reset ===== */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

body {
    font-family: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.45;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

/* Keine Unterstreichungen für Links/Buttons */
a,
a:visited,
a:hover,
a:active {
    text-decoration: none;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4 {
    font-family: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0;
    color: var(--text-primary);
    letter-spacing: 0;
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

h2 {
    font-size: 19px;
    margin-bottom: 8px;
}

h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

h4 {
    font-size: 14px;
    margin-bottom: 6px;
}

p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-top: 0;
}

/* ===== Topbar ===== */
.topbar {
    min-height: 72px;
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-shadow: 0 4px 18px rgba(8, 28, 48, 0.16);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    color: #fff;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a {
    color: rgba(255, 255, 255, 0.94);
    padding: 9px 13px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: background var(--transition), color var(--transition), opacity var(--transition);
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.nav-logout-form {
    margin: 0;
}

.nav-link-button {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.94);
    padding: 9px 13px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: background var(--transition), color var(--transition), opacity var(--transition);
    cursor: pointer;
}

.nav-link-button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ===== Content Area ===== */
.content {
    padding: 32px 28px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== Card ===== */
.card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h1,
.card h2,
.card h3,
.card h4 {
    margin-top: 0;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
}

/* ===== Buttons ===== */
button,
.btn {
    appearance: none;
    font-family: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    padding: 9px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 3px 10px rgba(15, 76, 129, 0.16);
}

button:hover,
.btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

button:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-ghost:hover {
    background: var(--surface-alt);
    border-color: var(--border-strong);
}

.btn-danger {
    background: #b42318;
    color: #ffffff;
    border: 1px solid #b42318;
}

.btn-danger:hover {
    background: #912018;
    border-color: #912018;
}

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

.btn-success:hover {
    background: #256b29;
    border-color: #256b29;
}

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

.btn-warning:hover {
    background: #cf5e00;
    border-color: #cf5e00;
}

/* ===== Forms ===== */
.form label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-sizing: border-box;
    font-family: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.35;
    color: var(--text-primary);
    background: #fff;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.10);
}

.form input::placeholder,
.form textarea::placeholder {
    color: var(--text-muted);
}

/* ===== Alerts ===== */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}

.alert-error {
    background: var(--danger-bg);
    border-color: rgba(198, 40, 40, 0.15);
    color: var(--danger);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: #ffd7b5;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: #cce8d0;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===== Tables / Calendar Table Base ===== */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
}

.calendar-table th,
.calendar-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
}

.calendar-table th {
    background: var(--surface-alt);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-secondary);
}

.calendar-table td {
    font-size: 12px;
    line-height: 1.35;
}

.calendar-table tr:last-child td {
    border-bottom: none;
}

/* ===== Empty Slot ===== */
.calendar-slot.empty {
    background: #fbfcfe;
    color: var(--text-muted);
    border-left: 4px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
}

/* ===== Calendar Toolbar ===== */
.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 8px 0 14px;
    flex-wrap: wrap;
}

.calendar-filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.calendar-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #d6e1ec;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    color: #415266;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.calendar-filter:hover,
.calendar-filter.is-active {
    background: #eff6ff;
    color: #0f4c8a;
    border-color: #b9d1ea;
    box-shadow: 0 4px 10px rgba(15, 36, 60, 0.06);
}

.filter-icon,
.legend-icon {
    font-size: 13px;
    line-height: 1;
}

/* ===== Calendar Legend ===== */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dde6ef;
    font-size: 11px;
    font-weight: 700;
    color: #56677a;
}

/* ===== Calendar Entries ===== */
.calendar-slot.calendar-entry {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #dbe4ee;
    border-left: 4px solid #cbd5e1;
    border-radius: 12px;
    padding: 8px 9px 8px 10px;
    margin-top: 7px;
    box-shadow: 0 4px 12px rgba(15, 36, 60, 0.05);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.calendar-slot.calendar-entry.exam-click {
    cursor: pointer;
}

.calendar-slot.calendar-entry.exam-click:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 36, 60, 0.08);
    border-color: #c6d6e6;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.calendar-slot.calendar-entry.is-static {
    cursor: default;
}

/* Entry Colors */
.calendar-entry.type-exam {
    border-left-color: #2563eb;
}

.calendar-entry.type-setup {
    border-left-color: #f59e0b;
}

.calendar-entry.type-vacation {
    border-left-color: #16a34a;
}

.calendar-entry.type-fza {
    border-left-color: #7c3aed;
}

.calendar-entry.type-sick {
    border-left-color: #ef4444;
}

.calendar-legend-item.type-exam {
    color: #1d4ed8;
}

.calendar-legend-item.type-setup {
    color: #d97706;
}

.calendar-legend-item.type-vacation {
    color: #15803d;
}

.calendar-legend-item.type-fza {
    color: #6d28d9;
}

.calendar-legend-item.type-sick {
    color: #dc2626;
}

.calendar-entry-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.calendar-entry-kind {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #64748b;
}

.calendar-entry-icon {
    font-size: 12px;
    line-height: 1;
}

.calendar-entry-count {
    font-size: 9px;
    color: #7b8794;
    white-space: nowrap;
}

.calendar-entry-title {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0;
}

.calendar-entry-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-entry-edit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #dbe4ee;
    background: #fff;
    color: #64748b;
    font-size: 11px;
    line-height: 1;
    flex: 0 0 auto;
}

.calendar-entry-edit-icon:hover {
    background: var(--surface-alt);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.calendar-entry-users {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-entry-user {
    display: block;
    font-size: 10px;
    line-height: 1.3;
    color: #5b6672;
    white-space: normal;
    word-break: break-word;
}

.calendar-entry-empty {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-muted);
}

.calendar-entry-locations {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-entry-location-row {
    padding: 7px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #edf2f7;
}

.calendar-entry-location-name {
    font-size: 10px;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    color: #607086;
    margin-bottom: 4px;
}

.calendar-entry-users.compact {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* ===== Chips ===== */
.chip {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0;
}

.chip-vacation {
    background: var(--success-bg);
    color: var(--success);
}

.chip-fza {
    background: var(--warning-bg);
    color: var(--warning);
}

.chip-sick {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ===== Icon Button ===== */
.icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 36, 60, 0.05);
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.icon-btn:hover {
    background: var(--surface-alt);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

/* ===== Header Icon Button Override ===== */
.topbar .icon-btn {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    box-shadow: none;
}

.topbar .icon-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.30);
}

.topbar .icon-btn svg {
    fill: currentColor;
}

/* ===== Badge ===== */
.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d92d20;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

/* ===== Calendar Nav ===== */
.calendar-nav-modern {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 18px 0 28px 0;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(15, 36, 60, 0.04);
}

.nav-btn:hover {
    background: var(--surface-alt);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.nav-current {
    background: var(--primary-light);
    border-color: #bfd4e6;
    color: var(--primary-dark);
}

/* ===== Dashboard 60/40 Layout ===== */
.dash-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
    align-items: start;
}

.dash-left,
.dash-right {
    min-width: 0;
}

.dash-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== Calendar Actions ===== */
.calendar-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 16px 0;
}

/* ===== Utility ===== */
.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-12 {
    margin-top: 12px;
}

.mt-18 {
    margin-top: 18px;
}

.mt-20 {
    margin-top: 20px;
}

.info-text {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.is-hidden {
    display: none !important;
}

/* ===== Layout Helpers ===== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.page-header h1 {
    margin: 0;
}

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

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.calendar-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-wrap {
    max-width: 760px;
}

.register-wrap {
    max-width: 920px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.auth-switch {
    margin-top: 18px;
    color: var(--text-secondary);
    font-size: 13px;
}

.auth-switch a {
    font-weight: 700;
    color: var(--primary);
}

.auth-switch a:hover {
    color: var(--primary-dark);
}

/* ===== Calendar Day ===== */
.day-number {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.day-outside {
    opacity: 0.55;
    background: #f8fafc;
}

/* ===== Forms / Actions ===== */
.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inline-form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.inline-form button {
    margin: 0;
}

.entry-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.review-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-actions form {
    margin: 0;
}

.review-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.review-delete-form {
    margin-top: 12px;
}

.form-hint {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.type-box {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-alt);
    margin-bottom: 18px;
}

/* ===== Reviews ===== */
.review-history {
    display: grid;
    gap: 16px;
}

.review-entry {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    background: var(--surface-alt);
}

.review-entry-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.review-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.review-metrics div {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.review-metrics span {
    color: var(--text-secondary);
    font-size: 12px;
}

.review-metrics-detailed div {
    align-items: flex-start;
    flex-direction: column;
}

.review-metrics-detailed small {
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: pre-wrap;
}

.review-note {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    color: var(--text-primary);
}

.review-note strong {
    display: block;
    margin-bottom: 6px;
}

.review-average-box {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-weight: 700;
    color: var(--text-primary);
}

.review-share-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.review-share-state.is-shared {
    background: var(--success-bg);
    border-color: #cce8d0;
    color: var(--success);
}

.review-meta-note {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.empty-state {
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    padding: 18px;
    color: var(--text-secondary);
    background: #fff;
}

/* ===== Surveys ===== */
.table-subtext {
    margin-top: 6px;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.survey-employee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.survey-question-list,
.survey-fill-list,
.survey-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.survey-question-item,
.survey-fill-item,
.survey-answer-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 14px;
}

.survey-question-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 14px;
    align-items: end;
}

.survey-question-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.survey-answer-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.required-mark {
    color: var(--danger);
    font-weight: 700;
}

/* ===== Dashboard ===== */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.dash-stat {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    margin-top: 8px;
    color: var(--primary);
}

/* ===== Mobile Navigation ===== */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 22px;
    color: #fff;
    cursor: pointer;
    box-shadow: none;
    padding: 0;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .dash-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .calendar-toolbar {
        align-items: stretch;
    }

    .calendar-filter-group {
        width: 100%;
    }

    .survey-question-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar {
        height: auto;
        min-height: 72px;
        padding: 14px 18px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        width: 100%;
        display: none;
        flex-direction: column;
        background: var(--primary-dark);
        border-radius: 12px;
        padding: 10px;
        margin-top: 10px;
        gap: 6px;
    }

    .nav.nav-open {
        display: flex;
    }

    .nav a {
        width: 100%;
        padding: 10px 12px;
        border-radius: 8px;
    }

    .content {
        padding: 20px 16px;
    }

    .card {
        padding: 18px;
        border-radius: 14px;
    }

    h1 {
        font-size: 21px;
    }

    h2 {
        font-size: 17px;
    }

    h3 {
        font-size: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .calendar-table-wrap .calendar-table {
        min-width: 900px;
    }

    .calendar-actions {
        justify-content: stretch;
    }

    .calendar-actions .btn {
        width: 100%;
        text-align: center;
    }

    .calendar-nav-modern {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 14px 0 20px 0;
    }

    .nav-btn,
    .nav-current {
        width: 100%;
        text-align: center;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header .btn,
    .actions .btn,
    .form-actions .btn,
    .form-actions button {
        width: 100%;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .entry-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .entry-actions form,
    .entry-actions a,
    .entry-actions button {
        width: 100%;
    }

    .review-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .review-actions form,
    .review-actions button {
        width: 100%;
    }

    .review-entry-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-metrics {
        grid-template-columns: 1fr;
    }

    .dash-stats {
        grid-template-columns: 1fr;
    }

    .survey-employee-list {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== Mobile User Cards ===== */

.users-desktop-view {
    display: block;
}

.users-mobile-view {
    display: none;
}

.mobile-info-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
}

.mobile-info-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-info-card-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.mobile-info-card-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.mobile-info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-info-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.mobile-info-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.mobile-info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mobile-info-value {
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-word;
}

@media (max-width: 768px) {
    .users-desktop-view {
        display: none;
    }

    .users-mobile-view {
        display: block;
    }
}


/* ===== Mobile Request Cards ===== */

.requests-desktop-view {
    display: block;
}

.requests-mobile-view {
    display: none;
}

@media (max-width: 768px) {
    .requests-desktop-view {
        display: none;
    }

    .requests-mobile-view {
        display: block;
    }
}

/* ===== Mobile Review Cards ===== */

.reviews-desktop-view {
    display: block;
}

.reviews-mobile-view {
    display: none;
}

@media (max-width: 768px) {
    .reviews-desktop-view {
        display: none;
    }

    .reviews-mobile-view {
        display: block;
    }
}

/* ===== Mobile Survey Cards ===== */

.surveys-desktop-view {
    display: block;
}

.surveys-mobile-view {
    display: none;
}

@media (max-width: 768px) {
    .surveys-desktop-view {
        display: none;
    }

    .surveys-mobile-view {
        display: block;
    }
}

/* ===== Dashboard Birthday Mobile Cards ===== */

.dashboard-birthdays-desktop {
    display: block;
}

.dashboard-birthdays-mobile {
    display: none;
}

@media (max-width: 768px) {
    .dashboard-birthdays-desktop {
        display: none;
    }

    .dashboard-birthdays-mobile {
        display: block;
    }
}
/* ===== Mobile Team Cards ===== */

.teams-desktop-view {
    display: block;
}

.teams-mobile-view {
    display: none;
}

@media (max-width: 768px) {
    .teams-desktop-view {
        display: none;
    }

    .teams-mobile-view {
        display: block;
    }
}


/* ===== Audit Log Responsive ===== */

.auditlogs-desktop-view {
    display: block;
}

.auditlogs-mobile-view {
    display: none;
}

.audit-severity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.audit-severity-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: #cfe0ee;
}

.audit-severity-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: #ffd7b0;
}

.audit-severity-error,
.audit-severity-critical {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: #f3b9b9;
}

.audit-context-block,
.audit-context-mobile {
    margin-top: 6px;
}

.audit-context-block code,
.audit-context-mobile code {
    display: block;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.audit-mobile-card .table-subtext {
    margin-top: 4px;
}

@media (max-width: 768px) {
    .auditlogs-desktop-view {
        display: none;
    }

    .auditlogs-mobile-view {
        display: block;
    }

    .audit-mobile-card {
        margin-bottom: 16px;
    }

    .audit-mobile-card .mobile-info-card-header {
        align-items: flex-start;
    }

    .audit-mobile-card .mobile-info-card-header h3 {
        word-break: break-word;
        margin-bottom: 4px;
    }

    .audit-mobile-card .audit-severity-badge {
        margin-left: 8px;
        flex-shrink: 0;
    }
}

.mobile-info-value {
    overflow-wrap: anywhere;
}