:root {
    --base-font-size: 16px;
    --brand-logo-size: 80px;
    --color-bg: #f5f7fa;
    --color-surface: #ffffff;
    --color-text: #1b1f24;
    --color-muted: #5b6672;
    --color-primary: #1d4ed8;
    --color-primary-dark: #1e40af;
    --color-accent: #0f766e;
    --color-warning: #b45309;
    --color-border: #d0d7de;
    --color-focus: #0ea5e9;
}
 
html {
    font-size: var(--base-font-size);
}
 
* {
    box-sizing: border-box;
}
 
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

body.poster-modal-open {
    overflow: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}
 
a:hover {
    text-decoration: underline;
}
 
.skip-link {
    position: absolute;
    left: -999px;
    top: 1rem;
    background: var(--color-primary);
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    z-index: 1000;
}
 
.skip-link:focus {
    left: 1rem;
}
 
header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
 
.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-logo {
    width: var(--brand-logo-size);
    height: var(--brand-logo-size);
    max-width: var(--brand-logo-size);
    max-height: var(--brand-logo-size);
    object-fit: contain;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand h1 {
    margin: 0;
    font-size: 1.4rem;
}
 
.brand-subtitle {
    font-size: 0.9rem;
    color: var(--color-muted);
}
 
.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
 
.header-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.top-nav,
.sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
 
.top-nav a,
.top-nav button {
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-text);
    font-weight: 600;
}
 
.top-nav a:hover,
.top-nav button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}
 
.top-nav form {
    margin: 0;
}
 
.font-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-surface);
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
}
 
.font-label {
    font-size: 0.85rem;
    color: var(--color-muted);
}
 
.font-controls button {
    border: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-text);
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    font-weight: 600;
}
 
.font-controls button.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
 
.language-controls select {
    padding: 0.35rem 0.5rem;
    border-radius: 0.4rem;
    border: 1px solid var(--color-border);
    background: #ffffff;
}
 
.app-shell {
    display: flex;
    min-height: calc(100vh - 140px);
}
 
.sidebar {
    width: 260px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
 
.sidebar-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}
 
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a,
.sidebar-nav button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text);
    font-weight: 600;
    text-align: left;
    justify-content: flex-start;
    width: 100%;
}
 
.sidebar-nav a:hover,
.sidebar-nav button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #f0f6ff;
}

.sidebar-nav .icon {
    width: 1.5rem;
    display: inline-flex;
    justify-content: center;
}

.sidebar-logout {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}
 
.sidebar-logout button {
    width: 100%;
    border: 1px solid var(--color-border);
}
 
.icon {
    font-size: 1.1rem;
}
 
.main-content {
    flex: 1;
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
}
 
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header p {
    margin: 0.25rem 0 0;
    color: var(--color-muted);
}

.page-header .subtitle {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-header p {
    margin: 0.25rem 0 0;
    color: var(--color-muted);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stat-card span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.stat-card strong {
    font-size: 1.6rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e0e7ff;
    color: var(--color-primary-dark);
}

.status-chip.success {
    background: #dcfce7;
    color: #166534;
}

.status-chip.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-chip.danger {
    background: #fee2e2;
    color: #991b1b;
}

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

.info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.info-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.info-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.info-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-panel__full {
    grid-column: 1 / -1;
}

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

.calendar-day {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: #ffffff;
}

.calendar-day h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.calendar-event {
    border-left: 4px solid var(--color-primary);
    background: #f8fafc;
    padding: 0.6rem;
    border-radius: 0.5rem;
    margin-bottom: 0.6rem;
}

.calendar-event:last-child {
    margin-bottom: 0;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-grid {
    display: grid;
    gap: 0.6rem;
}

.action-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    background: #ffffff;
    font-weight: 600;
    color: var(--color-text);
}

.action-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}

.action-link.secondary {
    background: #f8fafc;
}

.patient-overview {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(240px, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7aa2f7, #1d4ed8);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.profile-card h3 {
    margin: 0.25rem 0;
}

.profile-card p {
    margin: 0.15rem 0;
    color: var(--color-muted);
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.profile-meta span {
    color: var(--color-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-card {
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.detail-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.detail-card__header h4 {
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.detail-grid span {
    display: block;
    font-size: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-grid strong {
    display: block;
    margin-top: 0.2rem;
}

.patient-files {
    grid-column: span 1;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.file-list li span {
    display: block;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.patient-visits {
    margin-top: 1rem;
}

.visit-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-button {
    border: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-text);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.tab-button.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #eef2ff;
}

.attendance-period-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attendance-summary-grid {
    margin-bottom: 1rem;
}

.attendance-summary-grid .stat-card small {
    color: var(--color-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.attendance-table td {
    vertical-align: middle;
}

.admin-alert-grid {
    margin-bottom: 0;
}

.alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.alert-list li {
    border: 1px solid var(--color-border);
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.alert-list li strong {
    display: block;
}

.alert-list li > div span {
    display: block;
    font-size: 0.82rem;
    color: var(--color-muted);
}

.alert-list .status-chip {
    flex-shrink: 0;
}

.alert-list__empty {
    color: var(--color-muted);
    justify-content: flex-start;
}

.tab-count {
    background: #e2e8f0;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: grid;
    gap: 0.75rem;
}

.visit-card {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1.5fr 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.visit-card span {
    display: block;
    font-size: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.visit-card strong {
    display: block;
    margin-top: 0.15rem;
}

.visit-date strong {
    font-size: 1rem;
}

.visit-status {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

@media (max-width: 1100px) {
    .patient-overview {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

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

.calendar-board {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background: var(--color-surface);
    overflow: auto;
}

.calendar-board__row {
    display: grid;
    grid-template-columns: 220px repeat(7, minmax(140px, 1fr));
    border-bottom: 1px solid var(--color-border);
}

.calendar-board__row:last-child {
    border-bottom: none;
}

.calendar-board__header {
    background: #f8fafc;
    font-weight: 600;
}

.calendar-board__doctor {
    padding: 0.75rem 1rem;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.calendar-board__doctor span {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.calendar-board__cell {
    padding: 0.75rem;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 90px;
}

.calendar-board__cell:last-child {
    border-right: none;
}

.calendar-board__weekday {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
}

.calendar-board__date {
    font-size: 0.9rem;
}

.calendar-board__times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.calendar-board__note {
    font-size: 0.75rem;
    color: var(--color-warning);
}

.filter-panel {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    margin-bottom: 1.5rem;
}

.filter-panel summary {
    cursor: pointer;
    font-weight: 600;
}

.filter-panel form {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.75rem;
}

section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
 
.landing-hero {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.landing-hero-slider {
    position: relative;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    width: 100%;
    background: #0f172a;
}

.landing-hero-slider__track {
    display: flex;
    transition: transform 700ms ease;
    will-change: transform;
}

.landing-hero-slider__slide {
    margin: 0;
    flex: 0 0 100%;
    width: 100%;
    height: clamp(320px, 52vw, 620px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}

.landing-hero-slider__slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.landing-hero-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(15, 23, 42, 0.45);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.landing-hero-slider__nav:hover {
    background: rgba(15, 23, 42, 0.72);
}

.landing-hero-slider__nav--prev {
    left: 0.9rem;
}

.landing-hero-slider__nav--next {
    right: 0.9rem;
}

.landing-hero-slider__indicators {
    position: absolute;
    left: 50%;
    bottom: 0.9rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    z-index: 1;
}

.landing-hero-slider__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.35);
    background: rgba(255, 255, 255, 0.55);
    padding: 0;
}

.landing-hero-slider__dot.is-active {
    background: #ffffff;
}
 
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
 
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 1px solid var(--color-primary);
    background: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
}
 
.button-link:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    text-decoration: none;
}
 
.button-link.secondary {
    background: #ffffff;
    color: var(--color-primary);
}
 
.button-link.secondary:hover {
    background: #eef2ff;
    color: var(--color-primary);
}
 
.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}
 
.highlight-card {
    border: 1px solid var(--color-border);
    background: #f8fafc;
    border-radius: 0.6rem;
    padding: 0.75rem;
}
 
.notice-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}
 
.notice-card {
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-warning);
    border-radius: 0.6rem;
    padding: 0.85rem;
    background: #fffbeb;
}

.notice-card--program {
    border-left-color: var(--color-primary);
    background: #eff6ff;
    display: grid;
    gap: 0.75rem;
}

.notice-empty {
    margin: 0;
    color: var(--color-muted);
}

.landing-section-title {
    margin: 0 0 1.1rem;
    width: 100%;
    text-align: center !important;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(1.35rem, 2.35vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.landing-downloads h3 {
    margin-top: 0;
}

.landing-connect__intro {
    margin: 0 auto 1rem;
    max-width: 680px;
    text-align: center;
    color: var(--color-muted);
}

.landing-bmi__intro {
    margin: 0 auto 1rem;
    max-width: 680px;
    text-align: center;
    color: var(--color-muted);
}

.landing-connect {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.landing-section-title--social {
    margin-bottom: 0.55rem;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    font-weight: 900;
    color: #111827;
}

.landing-connect__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 180px));
    justify-content: center;
    gap: 1.15rem;
    max-width: 620px;
    margin: 0 auto;
}

.connect-card {
    width: 180px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    transition: transform 150ms ease;
}

.connect-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.connect-card__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border: 2px solid #8b8f98;
    border-radius: 1.6rem;
    overflow: hidden;
}

.connect-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.connect-card__label {
    background: #3f3f46;
    color: #ffffff;
    text-align: left;
    margin-top: 0.35rem;
    padding: 0.48rem 0.72rem;
    font-size: 1.03rem;
    font-weight: 700;
}

.downloads-table-wrap {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow-x: auto;
    background: #ffffff;
}

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

.downloads-table thead th {
    background: #33296b;
    color: #ffffff;
    font-size: 0.9rem;
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #2a2257;
}

.downloads-table td {
    padding: 0.8rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

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

.downloads-table__number {
    width: 70px;
    text-align: center;
}

.downloads-table__description {
    margin: 0.35rem 0 0;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.downloads-format-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.55rem;
    padding: 0.24rem 0.45rem;
    border-radius: 0.3rem;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.downloads-format-badge:hover {
    background: #dc2626;
    text-decoration: none;
}

.downloads-format-badge.is-disabled {
    background: #94a3b8;
    color: #ffffff;
}

.downloads-table__empty {
    color: var(--color-muted);
    text-align: center;
    margin: 0;
}

.bulletin-meta {
    list-style: none;
    margin: 0.75rem 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
    font-size: 0.95rem;
}

.bulletin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.bulletin-actions .button-link {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
}

.program-poster-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 1.8vw, 1rem);
}

.program-poster-modal[hidden] {
    display: none;
}

.program-poster-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(2px);
}

.program-poster-modal__content {
    position: relative;
    width: min(760px, 92vw);
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 0.85rem;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
}

.program-poster-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem 0.65rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.program-poster-modal__header h5 {
    margin: 0;
    font-size: 1rem;
}

.program-poster-modal__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.program-poster-modal__open-full {
    border: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-primary);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.program-poster-modal__open-full:hover {
    border-color: var(--color-primary);
    background: #eff6ff;
    text-decoration: none;
}

button.program-poster-modal__close {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    padding: 0;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

button.program-poster-modal__close:hover {
    border-color: #94a3b8;
    color: #0f172a;
    background: #e2e8f0;
}

.program-poster-modal__image-wrap {
    padding: 0.75rem;
    overflow: auto;
    overscroll-behavior: contain;
    background: #f8fafc;
    display: flex;
    justify-content: center;
}

.program-poster-modal__image-frame {
    width: min(520px, 100%);
    max-height: calc(100vh - 11rem);
    aspect-ratio: 3 / 4;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-poster-modal img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    object-fit: contain;
}
 
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
 
.article-card {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
 
.article-media {
    padding: 0.75rem;
    background: #f1f5f9;
}
 
.article-media svg {
    width: 100%;
    height: 120px;
    display: block;
}
 
.article-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 1rem 1rem;
    flex: 1;
}
 
.article-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
}
 
.card-link {
    font-weight: 600;
    margin-top: auto;
}

.admin-bulletin-poster-preview {
    width: min(280px, 100%);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    display: block;
}

.uitm-footer {
    margin-top: 1rem;
    color: #ececf6;
    background: #24155a;
}

.uitm-footer a {
    transition: color 160ms ease, opacity 160ms ease, background-color 160ms ease;
}

.uitm-footer__top {
    padding: 2.55rem 0 2.35rem;
    background-image:
        linear-gradient(rgba(38, 22, 95, 0.9), rgba(28, 16, 72, 0.94)),
        url("https://perlis.uitm.edu.my/images/gambar/BottomBackground.jpg");
    background-size: cover;
    background-position: center;
}

.uitm-footer__inner {
    width: min(1200px, calc(100% - 2.8rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

.uitm-footer__column h3 {
    margin: 0 0 0.95rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.uitm-footer__news,
.uitm-footer__links,
.uitm-footer__contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.uitm-footer__news {
    display: grid;
    gap: 0.75rem;
}

.uitm-footer__news li {
    border-bottom: 1px solid rgba(225, 223, 250, 0.36);
    padding-bottom: 0.74rem;
}

.uitm-footer__news li:last-child {
    border-bottom: none;
}

.uitm-footer__news time {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.35rem;
    color: #e4e3f2;
    font-size: 0.92rem;
}

.uitm-footer__news time span {
    font-size: 0.86rem;
    line-height: 1;
    opacity: 0.95;
}

.uitm-footer__news a,
.uitm-footer__links a,
.uitm-footer__contact-list a,
.uitm-footer__policy-links a {
    color: #bab7d6;
    text-decoration: none;
}

.uitm-footer__news a:hover,
.uitm-footer__links a:hover,
.uitm-footer__contact-list a:hover,
.uitm-footer__policy-links a:hover {
    color: #ffffff;
    text-decoration: none;
}

.uitm-footer__news a {
    display: inline-block;
    line-height: 1.5;
}

.uitm-footer__links {
    display: grid;
    gap: 0.4rem;
}

.uitm-footer__contact-block {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ececf7;
}

.uitm-footer__contact-block p {
    margin: 0;
}

.uitm-footer__contact-block .uitm-footer__org {
    font-weight: 700;
}

.uitm-footer__contact-list {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
}

.uitm-footer__contact-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.uitm-footer__contact-list li span,
.uitm-footer__contact-list li img {
    color: #f0effa;
    width: 1rem;
    text-align: center;
    font-size: 0.88rem;
}

.uitm-footer__contact-list li img {
    height: 1rem;
    object-fit: contain;
}

.uitm-footer__brand-logo {
    display: inline-flex;
    margin-bottom: 0.7rem;
}

.uitm-footer__brand-logo img {
    width: min(235px, 100%);
    height: auto;
    display: block;
    filter: saturate(1.02);
}

.uitm-footer__socials {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.uitm-footer__socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.96;
}

.uitm-footer__socials a img {
    width: 1.85rem;
    height: 1.85rem;
    display: block;
}

.uitm-footer__socials a:hover {
    opacity: 1;
}

.uitm-footer__bottom {
    background-image:
        linear-gradient(rgba(23, 12, 56, 0.92), rgba(23, 12, 56, 0.92)),
        url("https://perlis.uitm.edu.my/images/gambar/FooterBackground.jpg");
    background-position: center;
    background-repeat: no-repeat;
    border-top: 1px solid #b68c2f;
    padding: 0.92rem 0;
}

.uitm-footer__inner--bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}

.uitm-footer__inner--bottom p {
    margin: 0;
    color: #f2f1fa;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.uitm-footer__policy-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.uitm-footer__policy-links span {
    color: #dad8eb;
}

.uitm-footer__to-top {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.uitm-footer__to-top:hover {
    background: rgba(255, 255, 255, 0.18);
    text-decoration: none;
}
 
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
 
.bmi-card {
    border-left: 4px solid var(--color-accent);
}
 
.bmi-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
 
.bmi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}
 
.bmi-result {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f0fdfb;
    border-radius: 0.5rem;
    border: 1px solid #cceae6;
}
 
h2 {
    margin-top: 0;
}
 
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    overflow: hidden;
}
 
th,
td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}
 
thead {
    background: #eef2f7;
}
 
tr:last-child td {
    border-bottom: none;
}
 
form {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1rem;
}
 
form > div {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
 
label {
    font-weight: 600;
}
 
input,
select,
textarea {
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: #ffffff;
}
 
button {
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}
 
button:hover {
    background: var(--color-primary-dark);
}
 
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
 
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    background: #fdfdfd;
}
 
.alert-success {
    border-left: 4px solid var(--color-accent);
}
 
.alert-danger {
    border-left: 4px solid var(--color-warning);
}
 
footer {
    text-align: center;
    color: var(--color-muted);
    padding: 2rem 1rem;
}

.page-copyright {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 1rem 1rem 1.25rem;
}
*:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}
 
@media (max-width: 1024px) {
    .main-content {
        max-width: 100%;
        padding: 1.75rem 1.5rem 2rem;
    }

    .landing-hero {
        margin-bottom: 1rem;
    }

    .uitm-footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.35rem;
    }

    .uitm-footer__inner--bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    header {
        align-items: flex-start;
    }

    .top-nav {
        width: 100%;
    }
 
    .app-shell {
        flex-direction: column;
    }
 
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
 
    .main-content {
        padding: 1.5rem 1rem 2rem;
    }

    .landing-hero-slider__slide {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .landing-hero-slider__slide img {
        object-fit: cover;
    }

    .landing-hero-slider__nav {
        width: 1.9rem;
        height: 1.9rem;
        font-size: 0.95rem;
    }

    .landing-hero-slider__nav--prev {
        left: 0.55rem;
    }

    .landing-hero-slider__nav--next {
        right: 0.55rem;
    }

    section {
        padding: 1rem;
    }

    .notice-board,
    .articles-grid,
    .bmi-grid {
        grid-template-columns: 1fr;
    }

    .landing-connect__grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .connect-card {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .uitm-footer__top {
        padding: 2rem 0 1.75rem;
    }

    .uitm-footer__inner {
        width: min(1200px, calc(100% - 1.75rem));
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .uitm-footer__column h3 {
        margin-bottom: 0.75rem;
    }

    .uitm-footer__inner--bottom {
        gap: 0.65rem;
    }

    .uitm-footer__policy-links {
        font-size: 0.82rem;
    }

    .uitm-footer__to-top {
        align-self: flex-end;
    }

    .program-poster-modal {
        padding: 0;
    }

    .program-poster-modal__content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .program-poster-modal__header {
        padding: 0.7rem 0.75rem;
    }

    .program-poster-modal__header h5 {
        font-size: 0.95rem;
    }

    .program-poster-modal__image-wrap {
        padding: 0.55rem;
    }

    .program-poster-modal__image-frame {
        width: min(100%, 380px);
        max-height: calc(100vh - 8.8rem);
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.85rem 1rem;
    }

    .header-actions,
    .header-controls,
    .top-nav {
        width: 100%;
    }

    .top-nav a,
    .top-nav button {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: center;
    }

    .font-controls {
        width: 100%;
        justify-content: space-between;
    }

    .brand-logo {
        width: var(--brand-logo-size);
        height: var(--brand-logo-size);
    }

    .uitm-footer__links,
    .uitm-footer__news a {
        font-size: 0.9rem;
    }

    .uitm-footer__links a,
    .uitm-footer__news a,
    .uitm-footer__contact-list a {
        overflow-wrap: anywhere;
    }

    .uitm-footer__inner {
        width: min(1200px, calc(100% - 1.35rem));
    }

    .uitm-footer__policy-links {
        line-height: 1.5;
    }

    .bulletin-actions .button-link {
        width: 100%;
        justify-content: center;
    }

    .program-poster-modal__actions {
        gap: 0.35rem;
    }

    .program-poster-modal__open-full {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .program-poster-modal__close {
        width: 2.15rem;
        height: 2.15rem;
    }
}
