/* =====================================================
   Design tokens
   Palette: navy (primary), gold (accent), off-white (bg),
   charcoal (text), sage (secondary)
   ===================================================== */
:root {
    --navy: #1B3A5C;
    --navy-dark: #122943;
    --gold: #D9A441;
    --off-white: #F7F5F1;
    --charcoal: #2B2B2B;
    --sage: #7A8B6F;
    --border: #E3DFD6;
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --admin-bg: #131B2E;
    --admin-ink: #fff;
    --admin-muted: rgba(255, 255, 255, .65);
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--charcoal);
    background: #eaf4ff;
}

body:not(.admin-body) {
    padding-top: 84px;
}

.home-section-header .btn {
    white-space: nowrap;
}

.home-card {
    transition: transform .2s ease, box-shadow .2s ease;
    max-width: 100%;
    margin: 0 auto;
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 49, 102, .12) !important;
}

.home-card .card-media {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 12px;
}

.home-card .card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-card .card-body {
    padding: 0.8rem 0.75rem 0.95rem;
}

.home-card-title {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.home-card-meta {
    font-size: 0.8rem;
    line-height: 1.4;
}

@media (max-width: 576px) {
    .home-section-header {
        margin-bottom: 1rem;
    }

    .home-section-header .btn {
        width: auto;
        margin-top: .35rem;
        padding-left: 0.95rem;
        padding-right: 0.95rem;
    }

    .home-card {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .home-card .card-media {
        height: 118px;
    }

    .home-card .card-body {
        padding: 0.7rem 0.7rem 0.85rem;
    }

    .home-card-title {
        font-size: 0.9rem;
    }

    .home-card-meta {
        font-size: 0.75rem;
    }
}

.footer-map-container {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.footer-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .footer-map-container {
        padding-bottom: 120%;
    }
}

@media (max-width: 576px) {
    .footer-map-container {
        padding-bottom: 100%;
        margin-top: 1rem;
    }

    .site-footer .row {
        flex-direction: column;
    }

    .site-footer .col-md-3 {
        width: 100% !important;
    }
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: var(--font-display);
}

a {
    text-decoration: none;
}

/* ============ ADMIN PANEL ============ */
.admin-body {
    margin: 0;
    background: linear-gradient(180deg, var(--navy) 0%, #0f243d 100%);
    min-height: 100vh;
}

.admin-shell {
    display: block;
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: var(--admin-bg);
    color: var(--admin-ink);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 30px rgba(0, 0, 0, .18);
    transition: transform .3s ease;
}

.admin-body.sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
}

.admin-main {
    margin-left: 250px;
    min-width: 0;
    min-height: 100vh;
    background: #f8f9fa;
    transition: margin .3s ease;
}

.admin-body.sidebar-collapsed .admin-main {
    margin-left: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1.5rem 1.25rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--admin-ink);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--admin-ink);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: .65rem;
    font-weight: 600;
    color: var(--admin-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-top: .2rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    gap: .15rem;
}

.sidebar-nav a {
    color: var(--admin-muted);
    padding: .65rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-size: .93rem;
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: background .15s ease, color .15s ease, transform .08s ease;
    border-radius: 8px;
    width: auto;
    margin: .45rem 1rem;
    background: transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, .12);
    color: var(--admin-ink);
    transform: translateY(-1px);
}

.sidebar-nav a.active {
    background: #ffffff;
    color: var(--navy-dark);
    border-left-color: transparent;
    font-weight: 700;
}

.sidebar-nav a.logout-link {
    margin-top: auto;
}

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

.admin-topbar {
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    padding: 1.1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    border: none;
    background: transparent;
    color: var(--navy-dark);
    padding: .4rem;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color .2s ease;
}

.sidebar-toggle:hover {
    color: var(--navy);
}

.sidebar-toggle:active {
    opacity: .8;
}

.admin-topbar h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin: 0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--charcoal);
    font-size: .9rem;
}

.admin-content {
    padding: 2rem 1.25rem 2rem;
    max-width: 1120px;
    width: min(100%, 1120px);
    margin: 0 auto;
}

.welcome-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    max-width: 850px;
}

.welcome-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin: 0 0 .5rem 0;
    letter-spacing: -.3px;
    line-height: 1.1;
    max-width: 760px;
}

.welcome-subtitle {
    color: #6b7280;
    font-size: .95rem;
    margin: 0;
    font-weight: 500;
    max-width: 760px;
}

.card-panel {
    background: #fff;
    border: none;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}

.card-panel h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.card-panel .table {
    font-size: .95rem;
}

.card-panel .table thead {
    background: #f8f9fa;
    border-top: 1px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.card-panel .table thead th {
    font-weight: 600;
    color: var(--navy-dark);
    padding: 1rem 1.5rem;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.card-panel .table tbody td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: #4b5563;
}

.card-panel .table tbody tr:hover {
    background: #f8f9fa;
}

.dashboard-panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-panel-header>div {
    min-width: 0;
}

.dashboard-panel-header h2 {
    margin: 0;
    font-size: 1rem;
}

.dashboard-panel-header .btn-gold {
    margin-top: 0.25rem;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: .6rem;
    vertical-align: middle;
}

.bg-success {
    background: #22c55e;
}

.dashboard-info-card {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}

.dashboard-info-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.dashboard-info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dashboard-info-image--placeholder {
    color: #94a3b8;
    font-size: 2.5rem;
}

.dashboard-info-body {
    padding: 1.5rem;
}

.dashboard-info-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: .75rem;
}

.dashboard-info-text {
    font-size: .95rem;
    color: #4b5563;
    margin-bottom: 1rem;
}

.dashboard-info-meta {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.badge-light {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    font-size: .8rem;
    padding: .45rem .8rem;
}

.stat-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: all .3s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy-dark);
    line-height: 1;
    margin-bottom: .5rem;
}

.stat-label {
    color: #6b7280;
    font-size: .85rem;
    font-weight: 500;
}

.btn-navy {
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .75rem 1.15rem;
    box-shadow: 0 8px 16px rgba(18, 41, 67, .12);
}

.btn-navy:hover {
    background: var(--navy-dark);
    color: #fff;
}

.btn-gold {
    background: #1d4c7d;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: .75rem 1.15rem;
    box-shadow: 0 8px 20px rgba(29, 76, 125, .18);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.btn-gold:hover {
    background: #173f69;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(29, 76, 125, .2);
}

.form-card {
    padding: 2rem;
    max-width: 900px;
}

.form-panel-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy-dark);
}

.form-panel-header p {
    color: #556b86;
    font-size: .95rem;
    margin: 0;
}

.form-card .form-label {
    font-weight: 600;
    color: #24324a;
}

.form-card .form-control,
.form-card .form-select,
.form-card .ck-editor__editable_inline {
    border-radius: 12px;
    min-height: 54px;
    border: 1px solid #d7dce6;
}

.form-card .ck-editor__editable_inline {
    min-height: 320px;
    padding: 1rem;
}

.form-card .form-text {
    color: #5b6f89;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1.25rem;
}

.form-card .alert-danger {
    border-radius: 14px;
    padding: 1rem 1.15rem;
}

.table-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
}

.login-card {
    background: #fff;
    border-radius: 14px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

/* ============ PUBLIC SITE ============ */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #e8efff 0%, #f7f8fc 100%);
    padding: 2rem 1rem;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 2.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 70px rgba(36, 60, 90, .12);
    border: 1px solid rgba(18, 41, 67, .08);
}

.login-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    color: #122943;
}

.login-subtitle {
    margin: .5rem 0 0;
    color: #6b7280;
}

.login-help {
    font-size: .88rem;
    line-height: 1.5;
}

.btn-navy {
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: .85rem 1.15rem;
    box-shadow: 0 10px 25px rgba(18, 41, 67, .15);
    transition: transform .15s ease, background .15s ease;
}

.btn-navy:hover {
    background: var(--navy-dark);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #24324a;
}

.form-control {
    border-radius: 14px;
    min-height: 52px;
    border: 1px solid #d6dcee;
}

.search-bar {
    max-width: 760px;
    margin: 0 auto 0;
    padding: 0 1rem;
}

.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    border-bottom: 1px solid rgba(33, 33, 33, .08);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(27,58,92,0.85)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-navbar .navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--charcoal) !important;
}

.site-navbar .nav-link {
    color: rgba(43, 43, 43, .8) !important;
    font-weight: 600;
    letter-spacing: .01em;
}

.site-navbar .nav-link.active,
.site-navbar .nav-link:hover {
    color: var(--navy-dark) !important;
}

.site-navbar .navbar-brand {
    font-size: 1rem;
}

.hero-band {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f2e6c 0%, #184091 38%, #0f3570 100%);
    color: #fff;
    margin-top: -84px;
    padding: calc(5.5rem + 84px) 0 5rem;
}

.hero-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: .35;
    pointer-events: none;
}

.hero-band .container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #c6d5ff;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .82rem;
    font-weight: 700;
}

@media (max-width: 767px) {
    .hero-band {
        padding: calc(4rem + 84px) 0 3.5rem;
    }

    .hero-band .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hero-band h1 {
        font-size: 2rem;
        text-align: center;
    }

    .hero-band p {
        margin: 0 auto 1.5rem;
        max-width: 100%;
        text-align: center;
        font-size: 1rem;
    }

    .hero-band .btn {
        width: 100%;
        max-width: 100%;
    }

    .hero-band .btn-outline-light {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }
}

.hero-band h1 {
    font-weight: 800;
    font-size: clamp(2.8rem, 4vw, 4.5rem);
    line-height: 1.05;
}

.hero-band .text-accent {
    color: #ffd659;
}

.hero-band p {
    max-width: 720px;
    margin: 0 auto 1.75rem;
}

.hero-band .btn-outline-light {
    border-color: rgba(255, 255, 255, .9);
    color: #fff;
}

.hero-band .btn-outline-light:hover {
    color: #0f2e6c;
    background: rgba(255, 255, 255, .95);
}

@media (min-width: 768px) {
    .hero-band p {
        margin: 0 0 1.75rem 0;
    }
}

.kegiatan-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: transform .15s ease, box-shadow .15s ease;
}

.kegiatan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(27, 58, 92, .12);
}

.kegiatan-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.kegiatan-card .foto-kosong {
    width: 100%;
    height: 190px;
    background: var(--off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b7b2a6;
    font-size: 2rem;
}

.kegiatan-card .card-body {
    padding: 1.1rem 1.25rem 1.4rem;
}

.kegiatan-card .tanggal-badge {
    color: var(--sage);
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.kegiatan-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: .35rem 0 .5rem;
    color: var(--navy-dark);
}

.kegiatan-card p {
    color: #555;
    font-size: .92rem;
}

.guru-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.guru-card img,
.guru-card .foto-kosong {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto .9rem;
}

.guru-card .foto-kosong {
    background: var(--off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b7b2a6;
    font-size: 1.6rem;
}

.guru-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .15rem;
    color: var(--navy-dark);
}

.guru-card .jabatan {
    color: var(--sage);
    font-size: .85rem;
    font-weight: 500;
}

.detail-card {
    max-width: 900px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .08);
}

.detail-hero-container {
    max-height: 520px;
    overflow: hidden;
    background: #f8f9fa;
}

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

.detail-card-body {
    padding: 2rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: #64748b;
    font-size: .95rem;
}

.detail-author {
    font-weight: 600;
}

.detail-title {
    font-size: clamp(2rem, 2.5vw, 2.8rem);
    line-height: 1.05;
    color: var(--navy-dark);
}

.detail-content {
    color: #334155;
    line-height: 1.85;
}

.detail-content p {
    margin-bottom: 1.5rem;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 1.5rem 0;
}

.detail-content blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    background: #f8fafc;
    border-left: 4px solid var(--gold);
    color: #475569;
}

footer.site-footer {
    background: #0b1735;
    color: rgba(255, 255, 255, .82);
    padding: 3rem 0 2rem;
}

footer.site-footer .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

footer.site-footer .footer-brand i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    color: #ffd659;
}

footer.site-footer .footer-text {
    color: rgba(255, 255, 255, .7);
    font-size: .95rem;
    line-height: 1.8;
    max-width: 320px;
    margin-bottom: 1.25rem;
}

footer.site-footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-right: .6rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .9);
    transition: background .2s ease, transform .2s ease;
}

footer.site-footer .footer-social a:hover {
    background: rgba(255, 255, 255, .12);
    transform: translateY(-2px);
}

footer.site-footer .footer-title {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

footer.site-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer.site-footer .footer-links li {
    margin-bottom: .75rem;
}

footer.site-footer .footer-links a {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    transition: color .2s ease;
}

footer.site-footer .footer-links a:hover {
    color: #ffd659;
}

footer.site-footer .footer-contact p {
    color: rgba(255, 255, 255, .78);
    margin-bottom: .85rem;
    line-height: 1.75;
}

footer.site-footer .footer-contact i {
    color: #ffd659;
}

footer.site-footer .footer-map {
    display: block;
    text-decoration: none;
}

footer.site-footer .map-preview {
    min-height: 160px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .04) 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    padding: 1rem;
    text-align: center;
}

footer.site-footer .footer-bottom {
    color: rgba(255, 255, 255, .55);
}

footer.site-footer .footer-bottom small {
    display: inline-block;
    margin-bottom: .5rem;
    font-size: .85rem;
}

@media (min-width: 768px) {
    footer.site-footer .footer-bottom {
        flex-wrap: nowrap;
    }

    footer.site-footer .footer-bottom small {
        margin-bottom: 0;
    }
}

/* Admin search bar: rounded, icon, clear button, submit */
.search-bar {
    width: 100%;
    max-width: 760px;
    margin: 0 auto 0;
    padding: 0 1rem;
    box-sizing: border-box;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-radius: 28px;
    padding: 10px 12px;
    border: 2px solid #6c63ff;
    background: #fff;
    box-shadow: 0 6px 18px rgba(108, 99, 255, .08);
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 8px 26px rgba(108, 99, 255, .12);
}

.search-icon {
    color: #6c63ff;
    font-size: 1.1rem;
    padding: 0 .4rem;
}

.search-input {
    border: none;
    outline: none;
    flex: 1 1 0;
    min-width: 0;
    font-size: 1rem;
    padding: .9rem 1rem;
    border-radius: 999px;
    background: transparent;
    box-sizing: border-box;
}

.search-clear {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1rem;
    cursor: pointer;
    padding: .3rem .6rem;
    display: none;
    /* shown by JS */
}

.search-submit {
    background: #00b894;
    /* green accent */
    color: #fff;
    border: none;
    padding: .9rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.search-submit .fa-search {
    margin-right: .35rem;
}

/* ============ RESPONSIVE ADJUSTMENTS ============ */
@media (max-width: 1199px) {
    .admin-sidebar {
        position: fixed;
        width: 240px;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        z-index: 1000;
        box-shadow: none;
    }

    .admin-main {
        margin-left: 240px;
    }

    .admin-content {
        padding: 1.5rem 1rem 2rem;
    }

    .admin-topbar {
        padding: 1rem 1rem;
    }

    .admin-topbar h1 {
        font-size: 1.15rem;
    }

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

    .card-panel,
    .form-card {
        padding: 1.3rem;
    }

    .stat-card {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 991px) {
    .admin-sidebar {
        position: fixed;
        width: 100%;
        transform: translateX(-100%);
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        z-index: 1100;
        box-shadow: none;
    }

    .admin-body.sidebar-collapsed .admin-sidebar {
        transform: translateX(0);
    }

    .admin-topbar {
        padding: 1rem .9rem;
    }

    .admin-user {
        width: 100%;
        justify-content: flex-start;
        margin-top: .8rem;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .admin-shell {
        min-height: auto;
    }
}

@media (max-width: 767px) {
    body:not(.admin-body) {
        padding-top: 84px;
    }

    .admin-sidebar {
        padding-top: 1rem;
    }

    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: .75rem;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-content {
        padding: 1.25rem .85rem 1.5rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-subtitle {
        font-size: .95rem;
    }

    .card-panel,
    .detail-card,
    .guru-card,
    .kegiatan-card,
    .form-card,
    .login-card {
        border-radius: 16px;
        padding: 1.25rem;
    }

    .login-card {
        margin: 1.5rem;
    }

    .hero-band {
        margin-top: -84px;
        padding: calc(4rem + 84px) 0 4rem;
    }

    .hero-band p,
    .detail-content p,
    .footer-text,
    footer.site-footer .footer-contact p {
        font-size: .95rem;
    }

    .footer-brand,
    .footer-title,
    .footer-bottom small {
        font-size: .95rem;
    }

    footer.site-footer .footer-map {
        min-height: 180px;
    }

    .site-navbar .navbar-collapse {
        background: #fff;
        padding: 1rem;
        border-top: 1px solid rgba(0, 0, 0, .08);
    }

    .site-navbar .navbar-nav {
        gap: .5rem;
    }

    .site-navbar .nav-link {
        padding-left: 0;
        padding-right: 0;
    }

    .search-bar {
        width: 100%;
        padding: 0 1rem;
    }

    .search-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
    }

    .search-input {
        width: 100%;
        margin: 0;
    }

    .search-submit {
        width: 100%;
    }

    .card-panel {
        padding: 1rem;
    }

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

    .table {
        width: 100%;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 1rem;
        background: #fff;
    }

    .table tbody td {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: .5rem;
        align-items: center;
        width: 100%;
        padding: .5rem 0;
        border-bottom: none;
    }

    .table tbody td:last-child {
        justify-content: flex-start;
    }

    .table tbody td::before {
        content: attr(data-label);
        color: #6b7280;
        font-size: .85rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .table tbody td img,
    .table tbody td .table-thumb {
        margin: 0;
        width: 72px;
        height: 72px;
    }

    .table tbody td:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        justify-content: flex-start;
    }

    .btn-sm {
        width: auto;
        min-width: 48px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: .5rem;
    }
}

@media (max-width: 575px) {

    .search-input-wrapper,
    .kegiatan-card .card-body,
    .detail-card-body,
    .dashboard-panel-header,
    .form-actions {
        flex-direction: column;
    }

    .search-input-wrapper {
        gap: .75rem;
    }

    .admin-topbar h1 {
        font-size: 1.05rem;
    }

    .stat-card {
        gap: 1rem;
    }

    .detail-meta {
        flex-direction: column;
        gap: .6rem;
    }

    .footer-site .footer-bottom,
    footer.site-footer .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}