:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #d7e0ea;
    --text: #19324d;
    --muted: #6b7d90;
    --primary: #0e7490;
    --primary-dark: #0b5f76;
    --secondary: #d97706;
    --danger: #b91c1c;
    --success: #15803d;
    --warning: #b45309;
    --shadow: 0 18px 40px rgba(20, 54, 88, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: var(--bg);
}

body.modal-open {
    overflow: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4, p {
    margin-top: 0;
}

ul {
    margin: 0;
    padding-left: 18px;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.muted,
.note-text,
.table .muted,
.progress-line small {
    color: var(--muted);
    font-size: 0.92rem;
}

.note-text {
    margin-top: 8px;
}

.button,
button,
input,
select,
textarea {
    font: inherit;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #15a3c5);
    color: #fff;
    padding: 12px 18px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(14, 116, 144, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
button:hover {
    transform: translateY(-1px);
}

.button-light {
    background: #e8f7fb;
    color: var(--primary-dark);
    box-shadow: none;
}

.button-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
}

.button.full {
    width: 100%;
}

.button-small {
    padding: 8px 12px;
    font-size: 0.88rem;
    border-radius: 10px;
    box-shadow: none;
}

.preview-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
    border: 1px solid #93c5fd;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.84rem;
    white-space: nowrap;
}

.preview-chip:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.text-link {
    display: inline-block;
    margin-top: 12px;
}

.button-link {
    background: none;
    border: 0;
    color: var(--primary);
    padding: 0;
    cursor: pointer;
}

.button-link.danger {
    color: var(--danger);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: var(--success);
}

.badge-warning {
    background: #ffedd5;
    color: var(--warning);
}

.badge-danger {
    background: #fee2e2;
    color: var(--danger);
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

.alerts {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.alert {
    border-radius: 14px;
    padding: 14px 18px;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf5;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(243, 246, 251, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(215, 224, 234, 0.85);
}

.public-nav,
.topbar,
.hero-section,
.login-panel {
    display: flex;
    gap: 24px;
}

.public-nav {
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.brand,
.sidebar-brand a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand-mark,
.sidebar-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f766e, #0ea5e9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand strong,
.sidebar-brand strong {
    display: block;
    font-size: 1rem;
}

.brand small,
.sidebar-brand small,
.topbar p,
.sidebar-user small {
    color: var(--muted);
    display: block;
}

.public-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.public-main {
    padding: 28px 0 48px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #dff5fb;
    color: var(--primary-dark);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-section {
    align-items: stretch;
    margin-bottom: 44px;
}

.hero-copy,
.hero-slider {
    flex: 1;
}

.hero-copy {
    background: linear-gradient(160deg, #e8fbff, #fdf6e8);
    border-radius: 28px;
    padding: 42px;
    box-shadow: var(--shadow);
}

.hero-copy h1 {
    font-size: clamp(2rem, 3vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 18px;
}

.hero-copy p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

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

.hero-slider {
    position: relative;
    min-height: 420px;
}

.slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.slide.active {
    opacity: 1;
    transform: translateY(0);
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    inset: auto 24px 24px 24px;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    padding: 22px;
    border-radius: 22px;
}

.section {
    margin-bottom: 44px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.6rem, 2vw, 2.3rem);
}

.card-grid,
.sop-grid,
.panel-grid,
.stats-grid,
.cards-grid,
.three-grid {
    display: grid;
    gap: 20px;
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.content-card,
.sop-card,
.agenda-item,
.panel,
.stat-card,
.document-card,
.validation-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.content-card,
.sop-card,
.stat-card {
    padding: 24px;
}

.content-card h3,
.sop-card h3 {
    margin-bottom: 12px;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.meta {
    color: var(--secondary);
    font-size: 0.86rem;
    font-weight: 700;
}

.announcement-detail {
    margin-bottom: 22px;
    padding: 28px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.announcement-detail-body {
    color: var(--text);
    line-height: 1.8;
}

.announcement-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.sop-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.sop-card {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.agenda-list {
    display: grid;
    gap: 16px;
}

.agenda-item {
    padding: 18px;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
}

.agenda-date {
    border-radius: 18px;
    background: linear-gradient(135deg, #0f766e, #0ea5e9);
    color: #fff;
    padding: 16px;
    text-align: center;
}

.agenda-date strong {
    display: block;
    font-size: 2rem;
}

.public-footer {
    background: linear-gradient(180deg, #10243a, #0f172a);
    color: #e2e8f0;
    padding-top: 42px;
}

.footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.public-footer a {
    color: #bae6fd;
}

.footer-copy {
    text-align: center;
    padding: 20px 0;
    margin-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-section {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
}

.login-panel {
    width: 100%;
    align-items: stretch;
}

.login-copy,
.auth-card {
    flex: 1;
    background: var(--surface);
    border-radius: 24px;
    padding: 34px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.login-copy {
    background: linear-gradient(160deg, #fff8eb, #effbff);
}

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

.role-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
}

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

.filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.form-group span {
    font-weight: 700;
    font-size: 0.94rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
}

textarea {
    resize: vertical;
}

.full-width {
    grid-column: 1 / -1;
}

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

.form-submit {
    display: flex;
    align-items: end;
}

.narrow-form {
    max-width: 760px;
}

.app-shell {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    background: linear-gradient(180deg, #102b45, #0f172a);
    color: #dbeafe;
    padding: 26px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.sidebar-brand a {
    color: #fff;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar,
.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    overflow: hidden;
}

.profile-avatar.large {
    width: 96px;
    height: 96px;
    margin: 0 auto 18px;
}

.sidebar-user-avatar img,
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    flex: 1 1 auto;
    align-content: start;
    overflow-y: auto;
    padding-right: 6px;
    margin-right: -6px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(186, 230, 253, 0.28);
    border-radius: 999px;
}

.sidebar-nav a,
.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #dbeafe;
    transition: background 0.2s ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover,
.sidebar-footer a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.menu-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.72rem;
    font-weight: 800;
}

.sidebar-footer {
    display: grid;
    gap: 8px;
    flex: 0 0 auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-main {
    flex: 1;
    min-width: 0;
}

.topbar {
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-shell {
    position: relative;
}

.notification-toggle {
    position: relative;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notification-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-bell svg {
    width: 24px;
    height: 24px;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--danger), #ef4444);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

.notification-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: min(420px, calc(100vw - 36px));
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 22px 50px rgba(20, 54, 88, 0.18);
    padding: 18px;
    display: none;
    z-index: 32;
}

.notification-shell.open .notification-panel {
    display: block;
}

.notification-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #edf2f7;
}

.notification-panel-head h2 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.notification-panel-head p {
    margin-bottom: 0;
}

.notification-list {
    display: grid;
    gap: 12px;
    max-height: 420px;
    overflow-y: auto;
}

.notification-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fbfe);
    border: 1px solid #e2e8f0;
    color: inherit;
}

.notification-item:hover {
    border-color: #7dd3fc;
    background: linear-gradient(180deg, #f9fcff, #eef8ff);
}

.notification-item.is-read {
    background: #f8fafc;
    border-color: #e5e7eb;
    opacity: 0.78;
}

.notification-item.is-read .notification-marker {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
}

.notification-marker {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.notification-copy strong,
.notification-copy span,
.notification-copy small {
    display: block;
}

.notification-copy span {
    color: var(--text);
    line-height: 1.45;
}

.notification-copy small {
    color: var(--muted);
}

.notification-empty {
    padding: 22px;
}

.topbar h1 {
    margin-bottom: 4px;
}

.sidebar-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 0;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.content {
    padding: 0 28px 28px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 20px;
}

.stats-grid-student {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: linear-gradient(180deg, #ffffff, #f8fbfe);
}

.stat-card-highlight {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    border-color: rgba(15, 118, 110, 0.18);
    color: #ffffff;
    box-shadow: 0 24px 48px rgba(15, 118, 110, 0.24);
    position: relative;
    overflow: hidden;
}

.stat-card-highlight::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.stat-card-highlight .stat-label,
.stat-card-highlight p {
    color: rgba(255, 255, 255, 0.92);
}

.stat-card-highlight strong {
    color: #ffffff;
    font-size: 2.15rem;
}

.stat-card-highlight .stat-label {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.stat-card-highlight p {
    max-width: 28ch;
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.stats-grid-student .stat-card-highlight {
    grid-column: 1 / -1;
}

.stat-label {
    color: var(--muted);
    display: block;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
}

.panel-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-bottom: 20px;
}

.single-panel {
    margin-bottom: 20px;
}

.panel {
    padding: 22px;
}

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

.panel-header.align-start {
    align-items: flex-start;
}

.panel-title-stack h2,
.panel-title-stack h3 {
    margin-bottom: 6px;
}

.panel-title-stack p {
    margin-bottom: 0;
    color: var(--muted);
}

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

.table-toolbar {
    margin-bottom: 18px;
}

.stack-layout {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.form-panel-shell {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff, #f4f9fd);
    padding: 22px;
}

.subsection-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
}

.validation-toolbar {
    margin-bottom: 14px;
}

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

.summary-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.92rem;
}

.validation-filter {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff, #f4f9fd);
    margin-bottom: 20px;
}

.validation-filter .form-submit {
    align-items: center;
}

.validation-table-wrap {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}

.validation-table {
    min-width: 980px;
}

.validation-table th {
    background: #f8fbff;
    white-space: nowrap;
}

.validation-table td {
    white-space: nowrap;
}

.validation-table td:nth-child(2),
.validation-table td:nth-child(4),
.validation-table td:nth-child(5) {
    white-space: normal;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 660px;
}

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-size: 0.9rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.empty-cell,
.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 20px;
}

.timeline-card,
.list-card,
.profile-card,
.student-summary {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
}

.timeline-card.success {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.simple-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
}

.simple-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.timeline-list {
    display: grid;
    gap: 14px;
}

.timeline-item {
    padding-left: 18px;
    border-left: 3px solid #bae6fd;
}

.import-box {
    margin-top: 24px;
    padding: 18px;
    border-radius: 16px;
    background: #f6fbff;
    border: 1px dashed #7dd3fc;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.three-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.document-meta,
.validation-meta {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.support-document-row {
    display: grid;
    gap: 10px;
}

.support-document-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff, #eef7ff);
    border: 1px solid #dbeafe;
}

.support-document-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.support-document-copy span,
.support-document-copy small {
    display: block;
}

.support-document-copy span {
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.support-document-copy small {
    color: var(--muted);
}

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

.progress-line span,
.progress-line small {
    display: block;
}

.validation-items {
    display: grid;
    gap: 16px;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.pagination-summary {
    color: var(--muted);
    font-weight: 600;
}

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

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pagination-link:hover,
.pagination-link:focus {
    transform: translateY(-1px);
    border-color: #7dd3fc;
    background: #f0f9ff;
    color: #0369a1;
}

.pagination-link.active {
    background: linear-gradient(135deg, var(--primary), #15a3c5);
    border-color: transparent;
    color: #fff;
}

.validation-card {
    padding: 20px;
}

.validation-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

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

.profile-card .simple-list li {
    text-align: left;
}

.form-panel {
    padding: 20px;
}

.preview-modal {
    position: fixed;
    inset: 0;
    padding: 28px 20px;
    background: rgba(15, 23, 42, 0.56);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.preview-modal.open {
    display: flex;
}

.preview-dialog {
    width: min(980px, 100%);
    max-height: calc(100vh - 56px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
    overflow: hidden;
}

.preview-header,
.preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #e2e8f0;
}

.preview-footer {
    border-bottom: 0;
    border-top: 1px solid #e2e8f0;
}

.preview-header h2 {
    margin-bottom: 0;
    font-size: 1.05rem;
}

.preview-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 1.6rem;
    line-height: 1;
    box-shadow: none;
}

.preview-body {
    min-height: 320px;
    max-height: calc(100vh - 220px);
    padding: 0;
    background: #f8fafc;
    overflow: auto;
}

.preview-frame,
.preview-image {
    width: 100%;
    height: min(70vh, 760px);
    display: block;
    border: 0;
}

.preview-image {
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    margin: 0 auto;
    background: #fff;
}

.preview-placeholder,
.preview-fallback {
    padding: 28px;
    color: var(--muted);
    line-height: 1.6;
}

.scroll-top-button {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #15a3c5);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 32px rgba(14, 116, 144, 0.28);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 35;
}

.scroll-top-button svg {
    width: 24px;
    height: 24px;
}

.scroll-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top-button:hover {
    transform: translateY(-2px);
}

@media (max-width: 1100px) {
    .hero-section,
    .login-panel,
    .panel-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -320px;
        z-index: 30;
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        transition: left 0.25s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .content,
    .topbar {
        padding-left: 18px;
        padding-right: 18px;
    }

    .scroll-top-button {
        right: 18px;
        bottom: 18px;
    }

    .validation-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notification-panel {
        right: auto;
        left: 0;
    }

    .stats-grid-student {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .public-links {
        display: none;
    }

    .hero-copy,
    .login-copy,
    .auth-card,
    .panel,
    .stat-card {
        padding: 22px;
    }

    .agenda-item {
        grid-template-columns: 1fr;
    }

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

    .table-meta,
    .pagination-bar,
    .pagination-links {
        width: 100%;
    }

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

    .pagination-bar {
        align-items: flex-start;
    }

    .notification-panel {
        position: fixed;
        top: 96px;
        left: 18px;
        right: 18px;
        width: auto;
    }

    .support-document-card,
    .preview-header,
    .preview-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .preview-body {
        max-height: calc(100vh - 260px);
    }

    .topbar,
    .topbar-left,
    .topbar-right {
        flex-direction: column;
        align-items: flex-start;
    }

    .simple-list li {
        flex-direction: column;
    }
}
