:root {
    --bg: #f5f7ff;
    --surface: #ffffff;
    --ink: #1b2340;
    --muted: #5b6588;
    --primary: #3559d7;
    --border: #dde4fb;
    --danger: #b13b3b;
    --success: #15663b;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
}

.admin-sidebar {
    background: #121934;
    color: #e4e9ff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.admin-sidebar-head .admin-brand {
    min-width: 0;
}

.admin-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #e4e9ff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.admin-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.admin-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.65rem;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(27, 35, 64, 0.06);
}

.admin-sidebar-toggle svg {
    flex-shrink: 0;
}

.admin-sidebar-toggle-label {
    display: none;
}

@media (min-width: 480px) {
    .admin-sidebar-toggle-label {
        display: inline;
    }
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.admin-brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.admin-nav {
    display: grid;
    gap: 0.45rem;
}

.admin-nav a {
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    color: #dbe3ff;
    text-decoration: none;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-user {
    margin-top: auto;
    display: grid;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.admin-user a {
    color: #fff;
    text-decoration: none;
}

.admin-main {
    padding: 1.3rem;
    min-width: 0;
}

h1 {
    margin-top: 0;
}

p {
    color: var(--muted);
}

.admin-alert {
    margin-bottom: 1rem;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    border: 1px solid transparent;
}

.admin-alert.success {
    background: #e8f8ef;
    color: var(--success);
    border-color: #aee1c4;
}

.admin-alert.error {
    background: #ffefef;
    color: var(--danger);
    border-color: #efb8b8;
}

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 1180px;
}

.dashboard-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem;
    border-radius: 20px;
    background:
        radial-gradient(ellipse 120% 80% at 100% 0%, rgba(53, 89, 215, 0.14), transparent 55%),
        radial-gradient(ellipse 80% 60% at 0% 100%, rgba(99, 102, 241, 0.1), transparent 50%),
        linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border: 1px solid rgba(221, 228, 251, 0.95);
    box-shadow: 0 4px 24px rgba(27, 35, 64, 0.06);
}

.dashboard-hero-copy {
    flex: 1;
    min-width: min(100%, 280px);
}

.dashboard-hero-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-hero-title {
    margin: 0;
    font-size: clamp(1.32rem, 2.6vw, 1.72rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--ink);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.dashboard-hero-name {
    color: var(--primary);
}

.dashboard-hero-lead {
    margin: 0.55rem 0 0;
    font-size: 0.94rem;
    color: var(--muted);
    max-width: 36rem;
    line-height: 1.55;
}

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

.dashboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.05rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.dashboard-btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(53, 89, 215, 0.32);
}

.dashboard-btn--primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.dashboard-btn--ghost {
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
    border: 1px solid var(--border);
}

.dashboard-btn--ghost:hover {
    background: #fff;
    border-color: #c8d4f8;
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
    gap: 0.85rem;
}

.dashboard-kpi {
    position: relative;
    padding: 1rem 1rem 1rem 1.12rem;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(27, 35, 64, 0.04);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-kpi::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--kpi-accent, var(--primary));
    border-radius: 4px 0 0 4px;
}

.dashboard-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(27, 35, 64, 0.08);
}

.dashboard-kpi-value {
    font-size: 1.62rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ink);
    line-height: 1.1;
}

.dashboard-kpi-label {
    margin-top: 0.38rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.4;
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dashboard-section-title {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 0.65rem;
}

.dashboard-link-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 8px rgba(27, 35, 64, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(53, 89, 215, 0.38);
    box-shadow: 0 10px 32px rgba(53, 89, 215, 0.11);
}

.dashboard-link-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dashboard-link-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
}

.dashboard-link-card-title {
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--ink);
}

.dashboard-link-card-desc {
    font-size: 0.81rem;
    color: var(--muted);
    line-height: 1.48;
}

.dashboard-link-card-arrow {
    flex-shrink: 0;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--primary);
    opacity: 0.88;
    transition: transform 0.18s ease;
}

.dashboard-link-card:hover .dashboard-link-card-arrow {
    transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-btn,
    .dashboard-kpi,
    .dashboard-link-card,
    .dashboard-link-card-arrow {
        transition: none;
    }

    .dashboard-btn--primary:hover,
    .dashboard-kpi:hover,
    .dashboard-link-card:hover {
        transform: none;
    }

    .dashboard-link-card:hover .dashboard-link-card-arrow {
        transform: none;
    }
}

.admin-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    display: grid;
    gap: 0.6rem;
}

.admin-form label {
    font-weight: 600;
    font-size: 0.93rem;
}

.admin-form input,
.admin-form textarea,
.admin-form button {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
}

.admin-form input,
.admin-form textarea {
    border: 1px solid #ced8fb;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox input {
    width: auto;
}

.admin-form button,
.actions button {
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
}

.table-wrap {
    margin-top: 1rem;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.7rem;
    border-bottom: 1px solid #edf1ff;
    text-align: left;
    font-size: 0.92rem;
}

.actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.actions a {
    text-decoration: none;
    color: #2f4dbb;
}

.actions form {
    margin: 0;
}

.actions .danger {
    background: var(--danger);
}

.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background:
        radial-gradient(circle at top right, rgba(86, 118, 244, 0.25), transparent 45%),
        radial-gradient(circle at bottom left, rgba(29, 184, 134, 0.16), transparent 40%),
        linear-gradient(160deg, #eef2ff 0%, #f8fbff 45%, #edf4ff 100%);
}

.login-shell {
    width: min(1020px, 100%);
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 1rem;
    align-items: stretch;
}

.login-hero {
    border-radius: 24px;
    padding: 1.6rem 1.5rem;
    background: linear-gradient(145deg, #13204b 0%, #2a3f97 62%, #365bcf 100%);
    color: #e9efff;
    box-shadow: 0 18px 40px rgba(29, 59, 156, 0.22);
}

.login-hero-brand {
    margin-bottom: 1rem;
    text-align: center;
}

.login-logo {
    display: block;
    object-fit: contain;
}

.login-logo--hero {
    width: min(148px, 42vw);
    height: auto;
    max-height: 120px;
    margin: 0 auto;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

.login-card-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.login-logo--card {
    width: 112px;
    height: auto;
    max-height: 112px;
    object-fit: contain;
}

.login-badge {
    display: inline-block;
    padding: 0.35rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
}

.login-hero h1 {
    margin: 0.9rem 0 0.7rem;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.3;
}

.login-hero p {
    margin: 0;
    color: #d3ddff;
}

.login-hero ul {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.5rem;
    color: #ebf0ff;
}

.login-card {
    border: 1px solid rgba(216, 225, 255, 0.95);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 22px;
    padding: 1.2rem;
    box-shadow: 0 18px 40px rgba(38, 66, 156, 0.12);
}

.login-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.login-header p {
    margin: 0.35rem 0 0.9rem;
    color: #59648a;
}

.login-card form {
    display: grid;
    gap: 0.58rem;
}

.login-card label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2a3763;
}

.login-card input,
.login-card button {
    width: 100%;
    font-family: inherit;
}

.login-card input {
    border: 1px solid #cdd8fc;
    border-radius: 12px;
    padding: 0.68rem 0.75rem;
    background: #fff;
}

.login-card input:focus {
    outline: 2px solid #bfd0ff;
    border-color: #7996ec;
}

.login-card button {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2f52cc 0%, #4e77f0 100%);
    color: #fff;
    padding: 0.72rem 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.login-card button:hover {
    filter: brightness(1.03);
}

.login-hint {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: #627198;
}

.login-back-home {
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: center;
}

.login-back-home a {
    color: #2f4dbb;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-back-home a:hover {
    text-decoration: underline;
}

.filters {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem;
}

.filters label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.filters input,
.filters select {
    width: 100%;
    border: 1px solid #ced8fb;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    font-family: inherit;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.result-meta {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
}

.filter-actions a {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #2f4dbb;
    text-decoration: none;
    padding: 0.58rem 0.75rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.73rem;
    font-weight: 700;
}

.status-new {
    background: #e7f0ff;
    color: #2446b8;
}

.status-read {
    background: #fff5db;
    color: #8b6610;
}

.status-closed {
    background: #e8f8ef;
    color: #17653d;
}

.status-legacy {
    background: #efefef;
    color: #5b5b5b;
}

.pagination {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.65rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    text-decoration: none;
    color: #2f4dbb;
    background: #fff;
}

.pagination a.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

@media (min-width: 901px) {
    .admin-sidebar-backdrop {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

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

    .admin-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 190;
        background: rgba(18, 25, 52, 0.48);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.22s ease, visibility 0.22s ease;
        pointer-events: none;
    }

    .admin-shell.is-sidebar-open .admin-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(288px, 88vw);
        height: 100vh;
        height: 100dvh;
        margin: 0;
        z-index: 200;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .admin-shell.is-sidebar-open .admin-sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 36px rgba(0, 0, 0, 0.22);
    }

    .admin-sidebar-close {
        display: inline-flex;
    }

    .admin-main {
        padding: clamp(0.75rem, 3.5vw, 1.25rem);
    }

    .admin-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .dashboard {
        gap: 1.35rem;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 1.15rem 1.2rem;
        border-radius: 16px;
    }

    .dashboard-hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-btn {
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    .dashboard-kpis {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr));
    }

    .dashboard-shortcuts {
        grid-template-columns: 1fr;
    }

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

    .login-shell {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .dashboard-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .dashboard-kpis {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .admin-sidebar,
    .admin-sidebar-backdrop {
        transition: none !important;
    }
}

/* ─── Program Files Admin UI ─────────────────────────────────────────────── */

.pf-upload-form,
.pf-edit-form {
    max-width: 900px;
}

.pf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    align-items: start;
}

.pf-form-fields {
    display: grid;
    gap: 0.6rem;
}

.admin-form select {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid #ced8fb;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    background: #fff;
    color: #1b2340;
}

.pf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: end;
}

/* Dropzone */
.pf-dropzone {
    position: relative;
    border: 2px dashed #c5d2fb;
    border-radius: 14px;
    background: #f6f8ff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pf-dropzone:hover,
.pf-dropzone.is-dragging {
    border-color: #3559d7;
    background: #eef2ff;
}

.pf-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.pf-dropzone-inner {
    text-align: center;
    padding: 1.5rem 1rem;
    pointer-events: none;
}

.pf-dropzone-icon {
    color: #7b93e8;
    margin-bottom: 0.6rem;
}

.pf-dropzone-label {
    margin: 0 0 0.3rem;
    font-weight: 600;
    color: #2a3763;
    font-size: 0.95rem;
}

.pf-dropzone-sub {
    margin: 0 0 0.65rem;
    font-size: 0.86rem;
    color: #5b6588;
}

.pf-dropzone-browse {
    color: #3559d7;
    font-weight: 600;
    text-decoration: underline;
}

.pf-dropzone-types {
    margin: 0;
    font-size: 0.78rem;
    color: #8591b8;
    letter-spacing: 0.02em;
}

/* File preview inside dropzone */
.pf-file-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e2e9ff;
}

.pf-preview-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pf-preview-info strong {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-preview-info span {
    font-size: 0.8rem;
    color: #7b8cb8;
}

.pf-preview-remove {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #ffe8e8;
    border: 0;
    color: #b13b3b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-preview-remove:hover {
    background: #ffd0d0;
}

/* File type icon badge */
.pf-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.5rem;
    min-width: 38px;
}

.pf-file-icon--pdf { background: #ffe8e8; color: #c0261d; }
.pf-file-icon--doc,
.pf-file-icon--docx { background: #e7eeff; color: #2b5eb9; }
.pf-file-icon--xls,
.pf-file-icon--xlsx { background: #e8f8ef; color: #1d6f42; }
.pf-file-icon--ppt,
.pf-file-icon--pptx { background: #fff0e8; color: #c44510; }
.pf-file-icon--zip { background: #f2eeff; color: #6733b5; }

/* Type badge in table */
.pf-type-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.22rem 0.5rem;
}

.pf-type-pdf { background: #ffe8e8; color: #c0261d; }
.pf-type-doc,
.pf-type-docx { background: #e7eeff; color: #2b5eb9; }
.pf-type-xls,
.pf-type-xlsx { background: #e8f8ef; color: #1d6f42; }
.pf-type-ppt,
.pf-type-pptx { background: #fff0e8; color: #c44510; }
.pf-type-zip { background: #f2eeff; color: #6733b5; }

/* Submit button with icon */
.pf-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    padding: 0.65rem 1.1rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.pf-submit-btn:hover {
    background: #2a4dc5;
}

.pf-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Edit mode header */
.pf-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f4f7ff;
    border: 1px solid #dde7ff;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.pf-edit-file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pf-edit-file-info strong {
    display: block;
    font-size: 0.9rem;
}

.pf-edit-file-info span {
    font-size: 0.8rem;
    color: #7b8cb8;
}

.pf-cancel-btn {
    flex-shrink: 0;
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: #2f4dbb;
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
}

/* Table header row */
.pf-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid #edf1ff;
}

/* Empty state */
.pf-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #8591b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.pf-empty p {
    margin: 0;
    font-size: 0.92rem;
}

@media (max-width: 700px) {
    .pf-form-grid {
        grid-template-columns: 1fr;
    }

    .pf-row {
        grid-template-columns: 1fr;
    }
}

/* Hero slides admin */
.admin-slide-guide {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    background: #eef3ff;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--ink);
}

.admin-slide-image-fieldset {
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: #fafcff;
}

.admin-slide-image-fieldset legend {
    padding: 0 0.35rem;
    font-weight: 700;
    font-size: 0.92rem;
}

.admin-muted {
    font-size: 0.85rem;
    color: var(--muted);
}

.admin-slide-current-thumb {
    margin-top: 1rem;
}

.admin-slide-current-thumb img {
    margin-top: 0.35rem;
    max-width: min(100%, 320px);
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(20, 35, 90, 0.1);
    object-fit: cover;
}

.admin-slide-thumb-cell {
    width: 96px;
}

.admin-slide-thumb-cell img {
    display: block;
    width: 88px;
    height: 49px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

.admin-slide-fit-checkbox {
    margin-top: 1rem;
}

.admin-slide-fit-hint {
    margin: 0.35rem 0 0;
}

#full_image_bg_color {
    display: block;
    width: 100%;
    max-width: 11rem;
    height: 2.5rem;
    padding: 4px;
    margin-top: 0.35rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
}

.profile-admin-form .profile-fieldset {
    margin: 0 0 1.35rem;
    padding: 1rem 1.1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fafcfe;
}

.profile-admin-form .profile-fieldset legend {
    padding: 0 0.4rem;
    font-weight: 700;
}

.profile-admin-form .profile-fieldset + .profile-fieldset {
    margin-top: 1rem;
}

.profile-admin-form textarea:not(.js-tinymce-prof) {
    font-family:
        ui-monospace,
        "Cascadia Mono",
        "Segoe UI Mono",
        monospace;
    font-size: 0.88rem;
    line-height: 1.5;
}

.informasi-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.informasi-block-title {
    margin: 0;
    font-size: 1.15rem;
}

.informasi-add-link {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    text-decoration: none;
    color: #2f4dbb;
    font-size: 0.92rem;
    font-weight: 600;
}

.informasi-add-link:hover {
    background: #f8f9ff;
}

.informasi-block,
.informasi-hero-block {
    margin-bottom: 2rem;
}

.informasi-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.informasi-form-actions button {
    width: auto;
}

.informasi-peng-form textarea.js-tinymce-info {
    font-family: inherit;
    font-size: 0.95rem;
}

.informasi-berita-form textarea.js-tinymce-berita {
    font-family: inherit;
    font-size: 0.95rem;
}

/* ─── Admin topbar & profil pengguna ─────────────────────────────────────── */

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin: -0.15rem 0 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

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

.admin-profile {
    position: relative;
    flex-shrink: 0;
}

.admin-profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 2px 10px rgba(27, 35, 64, 0.06);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-profile-trigger:hover {
    border-color: #b8c8f5;
    box-shadow: 0 4px 14px rgba(53, 89, 215, 0.12);
}

.admin-profile-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.admin-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-sizing: border-box;
    border: 2px solid rgba(53, 89, 215, 0.2);
}

.admin-profile-avatar--large {
    width: 96px;
    height: 96px;
}

.admin-profile-avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #3559d7 0%, #5b7bef 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.admin-profile-avatar--large.admin-profile-avatar--placeholder {
    font-size: 1.35rem;
}

.admin-profile-text {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.2;
}

@media (min-width: 520px) {
    .admin-profile-text {
        display: flex;
    }
}

.admin-profile-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ink);
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-profile-role {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-profile-chevron {
    flex-shrink: 0;
    color: var(--muted);
    margin-left: 0.1rem;
}

.admin-profile-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 208px;
    padding: 0.35rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(27, 35, 64, 0.12);
    z-index: 50;
}

.admin-profile-menu-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    margin: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s;
}

a.admin-profile-menu-item {
    color: inherit;
}

.admin-profile-menu-item:hover {
    background: #f0f3ff;
}

.admin-sidebar-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-logout {
    display: block;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    color: #dbe3ff;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.admin-sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-modal[hidden] {
    display: none !important;
}

.admin-modal:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    padding: 1rem;
    box-sizing: border-box;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 22, 48, 0.45);
    backdrop滤镜: blur(2px); /* invalid - use backdrop-filter */
}

.admin-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    max-height: min(88vh, 640px);
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(27, 35, 64, 0.18);
}

.admin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.admin-modal-title {
    margin: 0;
    font-size: 1.15rem;
}

.admin-modal-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin: -0.35rem -0.35rem 0 0;
    border: 0;
    border-radius: 10px;
    background: #f1f3fa;
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.admin-modal-close:hover {
    background: #e6e9f5;
}

.admin-modal-body {
    padding: 1rem 1.1rem 1.25rem;
}

.admin-account-section + .admin-account-section {
    margin-top: 1.35rem;
    padding-top: 1.25rem;
    border-top: 1px solid #edf1ff;
}

.admin-account-heading {
    margin: 0 0 0.6rem;
    font-size: 1rem;
}

.admin-avatar-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.admin-avatar-preview-wrap {
    flex-shrink: 0;
}

.admin-avatar-upload-actions {
    flex: 1;
    min-width: 160px;
}

.admin-btn-secondary {
    display: inline-block;
    padding: 0.55rem 0.95rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: #2f4dbb;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s;
}

.admin-btn-secondary:hover {
    background: #f6f8ff;
}

.admin-account-settings-form button[type='submit'],
.admin-account-password-form button[type='submit'] {
    width: auto;
    margin-top: 0.25rem;
}

.admin-avatar-status {
    margin: 0.5rem 0 0;
    min-height: 1.25em;
}

/* Riwayat login / logout (halaman pengguna admin) */
.admin-auth-event-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.admin-auth-event-badge--in {
    background: #e8f8ef;
    color: #15663b;
    border: 1px solid #aee1c4;
}

.admin-auth-event-badge--out {
    background: #eef1f8;
    color: #4f5d8a;
    border: 1px solid #d5ddf0;
}

.admin-auth-ip {
    font-size: 0.82rem;
    background: #f4f6fc;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    border: 1px solid #e8ecfb;
}

.admin-auth-events-table .admin-auth-ua {
    max-width: min(420px, 38vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--muted);
}

.admin-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin: 1rem 0 0.5rem;
}

.admin-btn-primary {
    display: inline-block;
    padding: 0.55rem 0.95rem;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
    font-family: inherit;
    border: 0;
    cursor: pointer;
}

.admin-btn-primary:hover {
    filter: brightness(1.06);
}

.admin-form--wide {
    max-width: 720px;
}

.admin-form--wide fieldset {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin: 1rem 0;
    background: var(--surface);
}

.admin-form--wide legend {
    font-weight: 700;
    padding: 0 0.4rem;
    font-size: 0.95rem;
}

.muted {
    color: var(--muted);
    font-size: 0.88rem;
}

.export-hint {
    margin-top: 0;
}

.actions--nowrap {
    white-space: nowrap;
}
