:root {
    --bg: #f2f5f8;
    --surface: #ffffff;
    --ink: #18212b;
    --muted: #5f6d7b;
    --brand: #0e4d92;
    --brand-2: #1c7ed6;
    --line: #d9e1ea;
    --danger: #b42318;
    --radius: 14px;
    --shadow: 0 16px 35px rgba(16, 36, 56, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(28, 126, 214, 0.14) 0, transparent 40%),
        radial-gradient(circle at 80% 15%, rgba(14, 77, 146, 0.12) 0, transparent 40%),
        var(--bg);
}

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

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.site-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 3px;
    border: 1px solid var(--line);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text small {
    font-size: 0.68rem;
    font-weight: 700;
    color: #4d5c6b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: var(--shadow);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.main-nav a {
    color: #34414f;
    padding: 8px 10px;
    border-radius: 8px;
}

.main-nav a.active,
.main-nav a:hover {
    background: #e9f3ff;
    color: var(--brand);
}

.main-nav .admin-link {
    background: var(--ink);
    color: #fff;
}

.hero {
    padding: 56px 0 28px;
    color: #fff;
    background: linear-gradient(135deg, #0f355f, #0e4d92 45%, #1c7ed6);
}

.hero h1 {
    margin: 0 0 8px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.8rem, 4.5vw, 3rem);
}

.hero p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.88);
}

.eyebrow {
    display: inline-block;
    margin: 0 0 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #b8d9ff;
}

.section {
    padding: 18px 0;
}

.content-card,
.stat-card,
.news-card,
.login-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.content-card h2 {
    margin-top: 0;
}

.richtext {
    line-height: 1.75;
    color: #2a3440;
}

.richtext h3 {
    margin: 1rem 0 0.4rem;
}

.richtext ul {
    padding-left: 22px;
}

.hero-image {
    width: 100%;
    max-height: 370px;
    object-fit: cover;
    border-radius: 12px;
    margin: 12px 0;
}

.site-footer {
    margin-top: 22px;
    padding: 40px 0 20px;
    background: #0f1721;
    color: #dbe5ef;
}

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

.footer-bottom {
    margin-top: 30px;
    border-top: 1px solid #2a3b4e;
    padding-top: 14px;
}

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

.card-grid {
    display: grid;
    gap: 20px;
}

.info-strip {
    margin-top: -10px;
}

.mini-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mini-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow);
}

.mini-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.mini-card p {
    margin: 0;
    color: #536171;
    font-size: 0.93rem;
}

.news-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
}

.news-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
}

.narrow {
    width: min(860px, 92%);
}

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

.table th,
.table td {
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

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

label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea {
    width: 100%;
    border: 1px solid #c8d3df;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

button {
    margin-top: 14px;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-weight: 700;
}

button.danger,
.btn-link.danger {
    background: var(--danger);
    color: #fff;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.alert.success {
    background: #e8f8ef;
    color: #086a35;
    border: 1px solid #a8dfbf;
}

.alert.error {
    background: #ffefef;
    color: #9a1a1a;
    border: 1px solid #f0b8b8;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 8% 10%, rgba(28, 126, 214, 0.24), transparent 34%),
        radial-gradient(circle at 92% 85%, rgba(14, 77, 146, 0.22), transparent 38%),
        linear-gradient(140deg, #e7eef6, #d6e2ef);
}

.login-card {
    width: min(520px, 100%);
    padding: 32px;
    border-radius: 18px;
    border: 1px solid #d2dceb;
    box-shadow: 0 24px 55px rgba(10, 38, 67, 0.16);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.login-brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 4px;
}

.login-kicker {
    margin: 0 0 2px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #46617d;
    font-weight: 700;
}

.login-brand h1 {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1.45rem;
}

.login-subtitle {
    margin: 3px 0 0;
    font-size: 0.76rem;
    color: #5b6a79;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.login-desc {
    margin: 0 0 14px;
    color: #445567;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    border: 1px solid #c3cfde;
    background: #fbfdff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #1c7ed6;
    box-shadow: 0 0 0 4px rgba(28, 126, 214, 0.16);
}

.login-submit {
    width: 100%;
    margin-top: 18px;
    padding: 12px 16px;
}

.admin-body {
    background: #eef2f6;
}

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

.admin-sidebar {
    background: #0f1721;
    color: #d4e0ec;
    padding: 24px 18px;
}

.admin-sidebar-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    display: block;
    margin: 0 0 10px;
    padding: 6px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #2a3e53;
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
}

.admin-sidebar a {
    color: #d4e0ec;
    padding: 9px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.admin-sidebar a:hover {
    background: #1e2c3e;
    border-color: #2c3f56;
    transform: translateX(1px);
}

.admin-sidebar a svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.admin-sidebar a span {
    line-height: 1.2;
}

.admin-main {
    padding: 22px;
}

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

.inline-form {
    display: inline;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    margin-left: 8px;
    font-weight: 700;
    cursor: pointer;
}

.user-form {
    max-width: 520px;
}

.icon-actions-row {
    margin-top: 14px;
    display: flex;
    gap: 8px;
}

.icon-action {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid #0f4f94;
    background: #0e4d92;
    color: #fff;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.icon-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-action.icon-link {
    text-decoration: none;
}

.icon-action.danger {
    border-color: #a11414;
    background: #c82626;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.media-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

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

.media-meta {
    padding: 10px 12px 6px;
    display: grid;
    gap: 4px;
}

.media-meta strong {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-actions {
    padding: 8px 12px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    margin: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.icon-btn span {
    font-size: 1rem;
    line-height: 1;
}

.icon-btn.copied {
    background: #198754;
}

.rt-editor {
    border: 1px solid #c8d3df;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.rt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #f4f8fc;
    border-bottom: 1px solid #dce5ef;
}

.rt-toolbar select,
.rt-toolbar .rt-color,
.rt-toolbar button {
    margin: 0;
    height: 34px;
    border-radius: 8px;
}

.rt-toolbar button {
    padding: 0 10px;
    background: #fff;
    color: #243447;
    border: 1px solid #c8d3df;
    font-weight: 700;
}

.rt-toolbar .rt-color {
    width: 40px;
    padding: 3px;
    border: 1px solid #c8d3df;
    background: #fff;
}

.rt-surface {
    min-height: 220px;
    padding: 12px;
    line-height: 1.7;
    outline: none;
}

.rt-surface:empty::before {
    content: "Tulis deskripsi di sini...";
    color: #8a98a7;
}

.editor-source {
    display: none;
}

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

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .news-card {
        grid-template-columns: 1fr;
    }
}
