/* =====================================================
   ADMIN CMS - PDS FERRY
   Clean Corporate Premium Style
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0b3c5d;
    --primary-dark: #06283d;
    --primary-soft: #e8f1f7;

    --accent: #d4a017;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;

    --bg: #f4f7fb;
    --white: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;

    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* =====================================================
   LAYOUT
===================================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
    padding: 28px 20px;
    color: var(--white);
    position: fixed;
    inset: 0 auto 0 0;
}

.admin-main {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
}

.admin-content {
    padding: 32px;
}

/* =====================================================
   SIDEBAR
===================================================== */

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

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 1px;
}

.sidebar-brand h3 {
    font-size: 18px;
    font-weight: 800;
}

.sidebar-brand span {
    font-size: 12px;
    opacity: 0.75;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.25s ease;
}

.sidebar-link i {
    width: 20px;
    font-size: 15px;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.13);
    color: var(--white);
}

/* =====================================================
   NAVBAR
===================================================== */

.admin-navbar {
    height: 96px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-navbar h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
}

.admin-navbar p {
    margin-top: 5px;
    font-size: 14px;
    color: var(--muted);
}

.navbar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-text {
    text-align: right;
}

.profile-text strong {
    display: block;
    font-size: 14px;
}

.profile-text span {
    font-size: 12px;
    color: var(--muted);
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* =====================================================
   STATS CARD
===================================================== */

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

.stats-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-card span {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.stats-card h2 {
    margin-top: 8px;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
}

.stats-card i {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* =====================================================
   PAGE HEADER
===================================================== */

.berita-header {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 26px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.berita-header span {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1.4px;
}

.berita-header h2 {
    margin-top: 6px;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
}

.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 14px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(11, 60, 93, 0.22);
    transition: 0.25s ease;
}

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

/* =====================================================
   TABLE
===================================================== */

.table-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.berita-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.berita-table thead {
    background: #f8fafc;
}

.berita-table th {
    padding: 18px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
}

.berita-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.berita-table tbody tr {
    transition: 0.2s ease;
}

.berita-table tbody tr:hover {
    background: #f9fbfd;
}

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

/* =====================================================
   TABLE CONTENT
===================================================== */

.thumb {
    width: 86px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
    background: #e5e7eb;
    border: 1px solid var(--border);
}

.judul-wrap h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    max-width: 360px;
    line-height: 1.4;
}

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

.author-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.author-box h5,
.date-wrap h5 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.author-box span,
.date-wrap span {
    font-size: 12px;
    color: var(--muted);
}

/* =====================================================
   STATUS
===================================================== */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.status.publish {
    background: #dcfce7;
    color: #15803d;
}

.status.draft {
    background: #fef3c7;
    color: #b45309;
}

/* =====================================================
   ACTION BUTTON
===================================================== */

.action-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btns a,
.action-btns button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: none;
    outline: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.22s ease;
}

.view-btn {
    background: #e0f2fe;
    color: #0369a1;
}

.edit-btn {
    background: #fef3c7;
    color: #b45309;
}

.delete-btn {
    background: #fee2e2;
    color: #b91c1c;
}

.view-btn:hover,
.edit-btn:hover,
.delete-btn:hover {
    transform: translateY(-2px);
    filter: brightness(0.97);
}

/* =====================================================
   EMPTY DATA
===================================================== */

.empty-data {
    padding: 52px 24px;
    text-align: center;
}

.empty-data i {
    font-size: 42px;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.empty-data h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
}

.empty-data p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

/* =====================================================
   FORM DEFAULT SUPPORT
===================================================== */

.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 15px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: 0.2s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 60, 93, 0.08);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
}

.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--text);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1024px) {
    .admin-sidebar {
        width: 240px;
    }

    .admin-main {
        margin-left: 240px;
        width: calc(100% - 240px);
    }

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

@media (max-width: 768px) {
    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .admin-navbar {
        height: auto;
        padding: 22px;
        align-items: flex-start;
        gap: 16px;
        flex-direction: column;
    }

    .admin-content {
        padding: 22px;
    }

    .berita-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .add-btn {
        width: 100%;
        justify-content: center;
    }

    .profile-text {
        text-align: left;
    }
}

/* FILTER CMS */
.cms-filter-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: 1fr 190px 170px auto auto;
    gap: 12px;
    align-items: center;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.cms-search {
    position: relative;
}

.cms-search i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #64748b;
}

.cms-search input,
.cms-filter-card select {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    padding: 0 15px;
    font-size: 14px;
    font-family: inherit;
    background: #f8fafc;
    outline: none;
}

.cms-search input {
    padding-left: 44px;
}

.cms-search input:focus,
.cms-filter-card select:focus {
    background: #ffffff;
    border-color: #0b3c5d;
    box-shadow: 0 0 0 4px rgba(11, 60, 93, 0.08);
}

.admin-alert {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.admin-alert.success {
    background: #dcfce7;
    color: #15803d;
}

.category-badge {
    display: inline-flex;
    padding: 7px 13px;
    border-radius: 999px;
    background: #eef6ff;
    color: #0b3c5d;
    font-size: 12px;
    font-weight: 800;
}

.admin-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

/* ADMIN PAGINATION */
.admin-pagination nav {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.admin-pagination nav > div:first-child {
    display: none;
}

.admin-pagination nav > div:last-child {
    display: flex;
    justify-content: center;
    width: 100%;
}

.admin-pagination span,
.admin-pagination a {
    text-decoration: none;
}

.admin-pagination svg {
    width: 18px !important;
    height: 18px !important;
}

.admin-pagination .relative {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 1100px) {
    .cms-filter-card {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .cms-filter-card {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   KRITIK SARAN
===================================================== */

.rating-stars {
    display: inline-flex;
    gap: 3px;
}

.rating-stars i {
    color: #cbd5e1;
    font-size: 13px;
}

.rating-stars i.active {
    color: #f59e0b;
}

.feedback-message {
    max-width: 280px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.status.baru {
    background: #dbeafe;
    color: #1d4ed8;
}

.status.dibaca {
    background: #fef3c7;
    color: #b45309;
}

.status.selesai {
    background: #dcfce7;
    color: #15803d;
}

.logout-btn {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    padding: 11px 16px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.logout-btn:hover {
    background: #fecaca;
}

.ck-editor__editable {
    min-height: 320px;
    border-radius: 0 0 14px 14px !important;
}

.ck.ck-editor {
    width: 100%;
}

.ck.ck-toolbar {
    border-radius: 14px 14px 0 0 !important;
}

