/* ============================================================
   Rexxscode CMS Admin — Material 3 Light Theme
   Design reference: Ui_Projek_LMS (Vokasi Pintar)
   ============================================================ */
:root {
    --primary: #00288e;
    --on-primary: #ffffff;
    --primary-container: #1e40af;
    --on-primary-container: #a8b8ff;
    --secondary: #006c49;
    --on-secondary: #ffffff;
    --secondary-container: #6cf8bb;
    --on-secondary-container: #00714d;
    --tertiary: #4c2e00;
    --tertiary-container: #ffddb8;
    --on-tertiary-container: #653e00;
    --background: #f8f9ff;
    --surface: #f8f9ff;
    --surface-lowest: #ffffff;
    --surface-low: #eff4ff;
    --surface-container: #e6eeff;
    --surface-high: #dee9fc;
    --surface-highest: #d9e3f6;
    --surface-variant: #d9e3f6;
    --on-surface: #121c2a;
    --on-surface-variant: #444653;
    --outline: #757684;
    --outline-variant: #c4c5d5;
    --error: #ba1a1a;
    --error-container: #ffdad6;
    --on-error-container: #93000a;
    --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --radius: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --shadow-card: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 4px 6px -1px rgba(0, 40, 142, 0.05);
    --shadow-card-hover: 0px 10px 15px -3px rgba(0, 40, 142, 0.1);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background-color: var(--background);
    color: var(--on-surface);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--primary-container);
}

/* ---------- Icons ---------- */
.icon {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
}

.icon.fill {
    font-variation-settings: 'FILL' 1;
}

.icon.sm { font-size: 18px; }
.icon.lg { font-size: 32px; }

/* ---------- App shell ---------- */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Top App Bar ---------- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    background: linear-gradient(180deg, #12274d 0%, #0c1a36 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.brand {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--primary);
    white-space: nowrap;
}

.brand-mobile {
    display: none;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 8px;
    border-radius: 9999px;
    cursor: pointer;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.icon-btn .dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
}

.header-email {
    display: none;
    font-size: 13px;
    color: #c3d0e8;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-container);
    color: var(--on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- Layout: sidebar + content ---------- */
.app-body {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 256px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #12274d 0%, #0c1a36 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: none;
    flex-direction: column;
    padding: 16px 12px 16px;
    gap: 8px;
    overflow-y: auto;
}

.sidebar.open {
    display: flex;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 64px;
    flex-shrink: 0;
    margin-bottom: 16px;
}

.sidebar-brand .brand {
    font-size: 24px;
}

.profile-stub {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.profile-stub .profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-stub .profile-role {
    font-size: 12px;
    color: var(--on-surface-variant);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-section {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--on-surface-variant);
    padding: 8px 16px 4px;
    margin-top: 8px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--on-surface-variant);
    font-size: 14px;
    font-weight: 500;
    border-right: 4px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.side-link .icon {
    color: var(--on-surface-variant);
    transition: color 0.15s;
}

.side-link:hover {
    background: var(--surface-variant);
    color: var(--primary);
}

.side-link:hover .icon {
    color: var(--primary);
}

.side-link.active {
    background: var(--surface-variant);
    color: var(--primary);
    font-weight: 700;
    border-right-color: var(--primary);
}

.side-link.active .icon {
    color: var(--primary);
    font-variation-settings: 'FILL' 1;
}

.side-logout {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--outline-variant);
}

.side-logout .btn {
    width: 100%;
    justify-content: center;
}

/* ---------- Navy sidebar theme ---------- */
.sidebar .brand {
    color: #ffffff;
}

.sidebar .profile-name {
    color: #e8edf7;
}

.sidebar .profile-role {
    color: #9fb0cf;
}

.sidebar .side-section {
    color: #8fa3c6;
}

.sidebar .side-link {
    color: #c3d0e8;
}

.sidebar .side-link .icon {
    color: #c3d0e8;
}

.sidebar .side-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar .side-link:hover .icon {
    color: #7db4ff;
}

.sidebar .side-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-right-color: #7db4ff;
}

.sidebar .side-link.active .icon {
    color: #7db4ff;
}

.sidebar .side-logout {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.sidebar .side-logout .btn {
    color: #c3d0e8;
    border-color: rgba(255, 255, 255, 0.18);
    background: transparent;
}

.sidebar .side-logout .btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ---------- Sidebar file-tree groups ---------- */
.side-group-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.side-group-toggle .chevron {
    margin-left: auto;
    font-family: 'Material Symbols Outlined';
    font-size: 18px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.side-group.open .side-group-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.side-group.open .side-group-toggle .icon {
    color: #7db4ff;
}

.side-group.open .side-group-toggle .chevron {
    transform: rotate(180deg);
}

.side-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-group.open .side-submenu {
    max-height: 480px;
}

.side-submenu .side-link {
    margin-left: 22px;
    padding: 10px 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    border-right: 4px solid transparent;
}

.side-submenu .side-link .icon {
    font-size: 18px;
}

.side-submenu .side-link.active {
    border-left-color: #7db4ff;
    border-right-color: #7db4ff;
}

.main {
    flex: 1;
    min-width: 0;
    padding: 96px 24px 48px;
}

/* ---------- Page header ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.page-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--on-surface);
}

.page-subtitle {
    color: var(--on-surface-variant);
    font-size: 16px;
    margin-top: 6px;
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card + .card {
    margin-top: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    background: var(--surface-lowest);
    border-bottom: 1px solid var(--outline-variant);
    font-size: 18px;
    font-weight: 600;
    color: var(--on-surface);
}

.card-header-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--on-surface);
}

.card-header-sub {
    font-size: 14px;
    color: var(--on-surface-variant);
    margin-top: 2px;
}

.card-body {
    padding: 24px;
}

.card-block {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
}

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

.stat {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface-variant);
}

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

.stat-value.orange { color: var(--tertiary); }
.stat-value.purple { color: var(--primary-container); }
.stat-value.red { color: var(--error); }

/* ---------- Visit chart ---------- */
.visit-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 240px;
    padding: 8px 4px 0;
}
.visit-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}
.visit-chart-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--on-surface-variant);
    margin-bottom: 6px;
}
.visit-chart-track {
    width: 100%;
    max-width: 48px;
    height: 170px;
    background: var(--surface-low);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.visit-chart-bar {
    width: 100%;
    min-height: 2px;
    background: linear-gradient(180deg, var(--primary-container), var(--primary));
    border-radius: 8px;
    transition: height 0.4s ease;
}
.visit-chart-label {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--on-surface-variant);
    text-align: center;
    white-space: nowrap;
}

.stat.stat-blue { background: var(--primary-container); border-color: transparent; }
.stat.stat-blue .stat-label { color: rgba(255, 255, 255, 0.8); }
.stat.stat-blue .stat-value { color: #ffffff; }
.stat.stat-orange { background: var(--tertiary-container); border-color: transparent; }
.stat.stat-orange .stat-label { color: rgba(101, 62, 0, 0.75); }
.stat.stat-orange .stat-value { color: var(--on-tertiary-container); }
.stat.stat-purple { background: #ece4ff; border-color: transparent; }
.stat.stat-purple .stat-label { color: rgba(91, 33, 182, 0.75); }
.stat.stat-purple .stat-value { color: #5b21b6; }
.stat.stat-green { background: var(--secondary-container); border-color: transparent; }
.stat.stat-green .stat-label { color: rgba(0, 113, 77, 0.75); }
.stat.stat-green .stat-value { color: var(--on-secondary-container); }
.stat.stat-red { background: var(--error-container); border-color: transparent; }
.stat.stat-red .stat-label { color: rgba(147, 0, 10, 0.75); }
.stat.stat-red .stat-value { color: var(--on-error-container); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 24px;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--primary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    box-shadow: var(--shadow-card);
}

.btn:hover {
    background: var(--surface-variant);
    color: var(--primary);
    box-shadow: var(--shadow-card-hover);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 1px 2px rgba(0, 40, 142, 0.2);
}

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

.btn-danger {
    background: var(--error-container);
    border-color: transparent;
    color: var(--on-error-container);
}

.btn-danger:hover {
    background: var(--error);
    border-color: var(--error);
    color: var(--on-primary);
}

.btn-sm {
    height: 32px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: none;
}

.btn-block {
    width: 100%;
}

/* ---------- Table ---------- */
.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface-variant);
    background: var(--surface-lowest);
    border-bottom: 1px solid var(--outline-variant);
    white-space: nowrap;
}

.table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--outline-variant);
    vertical-align: middle;
    color: var(--on-surface);
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: var(--surface-lowest);
}

.table-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.cell-title {
    font-weight: 600;
    color: var(--on-surface);
}

.cell-muted {
    color: var(--on-surface-variant);
    font-size: 13px;
}

.avatar-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-cell .avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.empty {
    padding: 56px 24px;
    text-align: center;
    color: var(--on-surface-variant);
}

.empty .glyph {
    font-family: 'Material Symbols Outlined';
    font-size: 36px;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 40;
    display: block;
    margin-bottom: 12px;
    color: var(--primary);
    opacity: 0.4;
}

/* ---------- Badges & tags ---------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface-variant);
    color: var(--on-surface-variant);
    white-space: nowrap;
}

.badge-green { background: var(--secondary-container); color: var(--on-secondary-container); }
.badge-purple { background: var(--surface-variant); color: var(--primary); }
.badge-orange { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.badge-red { background: var(--error-container); color: var(--on-error-container); }

.tag {
    display: inline-block;
    padding: 3px 10px;
    margin: 0 4px 4px 0;
    border-radius: 8px;
    font-size: 12px;
    color: var(--on-surface-variant);
    background: var(--surface-variant);
}

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid .span-2 {
    grid-column: span 2;
}

.field-group {
    margin-bottom: 4px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface-variant);
}

.req {
    color: var(--error);
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 11px 16px;
    background: var(--surface-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    color: var(--on-surface);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--on-surface-variant);
    opacity: 0.6;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 40, 142, 0.15);
}

.textarea {
    resize: vertical;
    min-height: 120px;
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.lang-tag {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9999px;
    color: var(--on-secondary-container);
    background: var(--secondary-container);
}

.help {
    margin-top: 6px;
    font-size: 13px;
    color: var(--on-surface-variant);
}

.help a {
    font-weight: 600;
}

.error {
    margin-top: 6px;
    font-size: 13px;
    color: var(--error);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--on-surface-variant);
    font-size: 14px;
    cursor: pointer;
}

.checkbox input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--outline-variant);
}

/* ---------- Flash / alerts ---------- */
.alert {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background: var(--error-container);
    color: var(--on-error-container);
}

/* ---------- Login ---------- */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, var(--surface-low) 0%, var(--background) 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.auth-brand {
    padding: 32px 32px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand .brand {
    font-size: 26px;
}

.auth-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--on-surface);
}

.auth-sub {
    font-size: 14px;
    color: var(--on-surface-variant);
    margin: 6px 0 0;
}

.auth-body {
    padding: 24px 32px 32px;
}

/* ---------- Messages (contact) ---------- */
.msg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--outline-variant);
}

.msg-meta-item {
    font-size: 13px;
    color: var(--on-surface-variant);
}

.msg-meta-item strong {
    color: var(--on-surface);
    font-weight: 600;
}

.msg-body {
    background: var(--surface-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    padding: 20px;
    white-space: pre-wrap;
    line-height: 1.7;
    color: var(--on-surface);
}

/* ---------- Media preview ---------- */
.preview {
    margin-top: 12px;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    max-width: 320px;
    overflow: hidden;
}

.preview img {
    display: block;
    width: 100%;
}

.preview.preview-small {
    max-width: 96px;
    padding: 8px;
}

.preview.preview-small img {
    width: auto;
    height: 48px;
    margin: 0 auto;
}

/* ---------- Skill logos & tech stack picker ---------- */
.logo-thumb {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    background: var(--surface-lowest);
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-thumb-empty {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    background: var(--surface-low);
}

.skill-group {
    margin-top: 16px;
}

.skill-group.hidden {
    display: none;
}

.skill-option.hidden {
    display: none !important;
}

.skill-search-meta {
    font-size: 12px;
    color: var(--on-surface-variant);
    margin: 10px 0 0;
}

.skill-group-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: 8px;
}

.skill-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.skill-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    background: var(--surface-lowest);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--on-surface);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.skill-option:hover {
    border-color: var(--primary);
}

.skill-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.skill-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--surface-low);
}

.skill-option-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.skill-option-logo-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--surface-low);
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
}

/* ---------- Gallery picker ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.gallery-item {
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-lowest);
    display: block;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.gallery-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--error);
    cursor: pointer;
}

.gallery-remove input {
    width: 14px;
    height: 14px;
    accent-color: var(--error);
}

/* ---------- Footer ---------- */
.app-footer {
    background: var(--surface-lowest);
    border-top: 1px solid var(--outline-variant);
    padding: 24px;
    margin-left: 256px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-footer .brand {
    font-size: 14px;
    font-weight: 700;
}

.app-footer .copyright {
    font-size: 14px;
    color: var(--secondary);
}

.app-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.app-footer nav a {
    font-size: 13px;
    color: var(--on-surface-variant);
}

.app-footer nav a:hover {
    color: var(--secondary);
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .sidebar {
        display: flex;
    }

    .app-header {
        padding-left: 288px;
    }

    .brand-mobile {
        display: none;
    }

    .header-email {
        display: inline;
    }

    .main {
        margin-left: 256px;
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.32s ease;
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 39;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.32s ease, visibility 0.32s ease;
    }

    .sidebar-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    .app-header {
        padding-left: 16px;
    }

    .brand-mobile {
        display: block;
    }

    .main {
        padding: 88px 16px 32px;
        margin-left: 0;
    }

    .app-footer {
        margin-left: 0;
    }

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

    .form-grid .span-2 {
        grid-column: span 1;
    }

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

    .header-email {
        display: none;
    }
}