:root {
    --bg: #eef3f8;
    --surface: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #d7dee8;
    --primary: #14745f;
    --primary-strong: #0f594a;
    --accent: #d39b2a;
    --danger: #b3262d;
    --success-bg: #e9f8ef;
    --success-text: #176b3a;
    --danger-bg: #fff1f0;
    --sidebar: #121c33;
    --sidebar-soft: #1d2b49;
    --shadow: 0 18px 44px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 22% 0, rgba(20, 116, 95, 0.10), transparent 30%),
        radial-gradient(circle at 100% 10%, rgba(211, 155, 42, 0.12), transparent 26%),
        var(--bg);
    color: var(--ink);
    font-family: Cambria, Georgia, "Times New Roman", serif;
    font-size: 12px;
    text-rendering: optimizeLegibility;
}

.admin-shell {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background:
        linear-gradient(180deg, rgba(18, 28, 51, 0.98), rgba(20, 35, 62, 0.98)),
        radial-gradient(circle at 20% 10%, rgba(211, 155, 42, 0.18), transparent 28%);
    color: #fff;
    padding: 24px 18px;
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.12);
    overflow-y: auto;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
    padding: 0 8px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f2c96d, var(--accent));
    color: #101828;
    font-weight: 800;
    box-shadow: 0 14px 26px rgba(211, 155, 42, 0.22);
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    margin-top: 4px;
    color: #bdc7d8;
}

.menu {
    display: grid;
    gap: 7px;
}

.menu-section {
    margin: 14px 12px 4px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.menu-section:first-child {
    margin-top: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 11px 13px;
    border-radius: 8px;
    color: #d7deea;
    text-decoration: none;
    line-height: 1.35;
    border: 1px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.10);
    color: #fff;
    transform: translateX(2px);
}

.menu-item.active {
    box-shadow: inset 4px 0 0 var(--accent);
}

.menu-item span {
    min-width: 0;
}

.content {
    padding: 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
    padding: 22px 24px;
    border: 1px solid rgba(215, 222, 232, 0.85);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 0;
    font-size: 30px;
    letter-spacing: 0;
}

.visit-link,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.visit-link,
.button.secondary {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.button.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: 0 10px 20px rgba(20, 116, 95, 0.18);
}

.button.primary:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
}

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

.button.danger:hover {
    background: #8e1f27;
}

.button.warning {
    border-color: #c89218;
    background: #fff7e0;
    color: #8a5a00;
}

.button.warning:hover {
    background: #ffefbd;
    transform: translateY(-1px);
}

.visit-link:hover,
.button.secondary:hover {
    border-color: #c5d0dd;
    background: #f8fafc;
    transform: translateY(-1px);
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid transparent;
}

.alert p {
    margin-bottom: 4px;
}

.alert.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #bfe8cd;
}

.alert.danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: #f3b4ae;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    padding: 20px;
    border-color: rgba(215, 222, 232, 0.88);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: var(--shadow);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(20, 116, 95, 0.10);
}

.stat-card::after {
    content: "";
    position: absolute;
    right: 30px;
    bottom: -28px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(211, 155, 42, 0.12);
}

.stat-card span {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.stat-card strong {
    position: relative;
    z-index: 1;
    color: var(--ink);
    font-size: 38px;
    letter-spacing: 0;
}

.panel {
    padding: 24px;
    border-color: rgba(215, 222, 232, 0.88);
    box-shadow: var(--shadow);
}

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

.panel-header h2 {
    margin-bottom: 6px;
    font-size: 22px;
}

.panel-header p,
.empty-state p {
    color: var(--muted);
}

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

.report-card {
    display: grid;
    gap: 16px;
    align-content: space-between;
    min-height: 154px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.report-card h3 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 17px;
}

.report-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-cover-preview,
.admin-cover-empty {
    width: 118px;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
}

.admin-cover-preview {
    border: 1px solid var(--line);
    object-fit: cover;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.admin-cover-empty {
    display: grid;
    place-items: center;
    border: 1px dashed var(--line);
    background: #f8fafc;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 14px 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

tbody tr:hover {
    background: #fbfdff;
}

td {
    color: #344054;
}

td strong {
    color: var(--ink);
}

tbody tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.badge.skripsi {
    background: #e8f3ff;
    color: #175cd3;
}

.badge.jurnal {
    background: #fff4d7;
    color: #8a5a00;
}

.empty-state {
    padding: 34px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.96)),
        #fbfdff;
}

.data-form {
    display: grid;
    gap: 20px;
}

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

.field {
    display: grid;
    gap: 7px;
}

.field.span-2 {
    grid-column: span 2;
}

.field span {
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.14);
    outline: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

    .sidebar {
        position: static;
        height: auto;
    }

    .brand {
        padding-bottom: 18px;
    }

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

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

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

    .field.span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 18px;
    }

    .topbar,
    .panel-header,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    h1 {
        font-size: 24px;
    }

    .panel {
        padding: 18px;
    }

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

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

.button-row,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px 110px;
    gap: 10px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fafc, #eef4f8);
}

select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.14);
    outline: 0;
}

.status {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.status.draft {
    background: #f2f4f7;
    color: #475467;
}

.status.revision {
    background: #fff7e0;
    color: #8a5a00;
}

.status.verified {
    background: #e8f3ff;
    color: #175cd3;
}

.status.published {
    background: #e9f8ef;
    color: #176b3a;
}

.status.rejected {
    background: #fff1f0;
    color: var(--danger);
}

.status.active {
    background: #e9f8ef;
    color: #176b3a;
}

.status.inactive {
    background: #f2f4f7;
    color: #667085;
}

.publication-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 18px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.flow-step {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
}

.flow-step.active {
    border-color: var(--primary);
    background: #e9f8ef;
    color: var(--primary-strong);
}

td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.action-stack {
    display: grid;
    min-width: 230px;
    gap: 8px;
}

.action-stack.compact {
    min-width: 140px;
}

.mini-link,
.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.mini-link:hover,
.mini-button:hover {
    border-color: #c5d0dd;
    background: #f8fafc;
    transform: translateY(-1px);
}

.mini-button.success {
    border-color: #176b3a;
    background: #e9f8ef;
    color: #176b3a;
}

.mini-button.warning {
    border-color: #c89218;
    background: #fff7e0;
    color: #8a5a00;
}

.mini-button.danger {
    border-color: #f3b4ae;
    background: #fff1f0;
    color: var(--danger);
}

.mini-button:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.file-panel {
    margin-top: 20px;
}

.file-list {
    display: grid;
    gap: 10px;
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.file-row strong,
.file-row span {
    display: block;
}

.file-row span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.table-muted {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.review-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.review-summary article,
.review-card,
.revision-note {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.review-summary article {
    padding: 16px;
}

.review-summary span,
.revision-note strong {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.review-summary strong {
    display: block;
    margin-top: 7px;
}

.revision-note {
    margin-bottom: 18px;
    padding: 16px;
    background: #fff7e0;
}

.revision-note p {
    margin: 8px 0 0;
    color: #694300;
    line-height: 1.6;
}

.review-grid {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 16px;
}

.review-card {
    padding: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.review-card h3 {
    margin-bottom: 14px;
}

.metadata-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.metadata-list div {
    display: grid;
    gap: 4px;
}

.abstract-preview {
    color: var(--muted);
    line-height: 1.75;
}

.section-file-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-actions-panel {
    margin-top: 20px;
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.reject-form {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
    .stats-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .review-summary,
    .review-grid,
    .section-file-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .stats-grid-wide,
    .filter-form {
        grid-template-columns: 1fr;
    }

    .button-row,
    .inline-actions,
    .file-row {
        align-items: stretch;
        flex-direction: column;
    }
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0, rgba(20, 116, 95, 0.16), transparent 32%),
        radial-gradient(circle at 100% 100%, rgba(211, 155, 42, 0.16), transparent 32%),
        #f5f7fb;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(460px, 100%);
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.register-panel {
    width: min(720px, 100%);
}

.register-form {
    margin-top: 18px;
}

.auth-switch {
    margin: 18px 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.login-brand {
    padding: 0 0 20px;
    color: var(--ink);
}

.login-panel h1 {
    margin-bottom: 8px;
}

.login-panel > p,
.user-line {
    color: var(--muted);
}

.logo-setting-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.logo-setting-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.logo-setting-card > span {
    font-weight: 800;
}

.logo-preview {
    display: grid;
    place-items: center;
    min-height: 118px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.logo-preview img {
    max-width: 120px;
    max-height: 82px;
    object-fit: contain;
}

.logo-preview strong {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--primary);
    font-size: 18px;
}

.license-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.license-status-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.license-status-card h3 {
    margin-bottom: 12px;
}

.mini-detail-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.mini-detail-list div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.mini-detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mini-detail-list dt {
    color: var(--muted);
    font-weight: 800;
}

.mini-detail-list dd {
    margin: 0;
    word-break: break-word;
}

.license-steps {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}

.generated-license-box textarea {
    width: 100%;
    min-height: 150px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: 12px Consolas, monospace;
    line-height: 1.6;
    resize: vertical;
}

.generated-detail {
    margin-top: 16px;
}

@media (max-width: 1100px) {
    .logo-setting-grid,
    .license-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .logo-setting-grid,
    .license-admin-grid {
        grid-template-columns: 1fr;
    }
}
