@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

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

/* =================================
   BODY
================================= */
body {
    font-family: "DM Sans", sans-serif;
    background: linear-gradient(180deg,
            #f5f8f6 0%,
            #eef7f2 55%,
            #ffffff 100%);

    color: #333;
    font-size: 13px;
    min-height: 100vh;
}

/* =================================
   CONTAINER
================================= */
.container {
    width: 90%;
    max-width: 1050px;
    margin: 28px auto 45px;
}

/* =================================
   HEADER
================================= */
.header {
    position: relative;
    text-align: center;
    margin-bottom: 22px;
}

.header h1 {
    font-family: "Playfair Display", serif;
    color: #123c2d;

    font-size: 25px;
    font-weight: 700;

    margin-top: 7px;
}

/* =================================
   BUTTON KEMBALI
================================= */
.btn-kembali {
    position: absolute;

    left: 0;
    top: 2px;

    display: inline-block;

    padding: 8px 13px;

    background: #e8f5ec;
    color: #087443;

    border-radius: 7px;

    text-decoration: none;

    font-size: 11px;
    font-weight: 600;

    transition: 0.2s ease;
}

.btn-kembali:hover {
    background: #087443;
    color: #ffffff;
}

/* =================================
   CARD
================================= */
.card {
    background: #ffffff;

    border: 1px solid #e8efeb;
    border-radius: 12px;

    padding: 20px 22px;

    margin-bottom: 20px;

    box-shadow: 0 5px 18px rgba(25, 80, 60, 0.07);
}

.card h2 {
    color: #123c2d;

    font-size: 17px;
    font-weight: 700;

    margin-bottom: 17px;
}

/* =================================
   FORM
================================= */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;

    margin-bottom: 6px;

    color: #38574b;

    font-size: 12px;
    font-weight: 600;
}

/* =================================
   INPUT SELECT TEXTAREA
================================= */
.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {

    width: 100%;

    padding: 9px 11px;

    border: 1px solid #d6e2dc;
    border-radius: 7px;

    background: #fbfdfc;
    color: #333;

    font-family: "DM Sans", sans-serif;
    font-size: 12px;

    outline: none;

    transition: 0.2s ease;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
    height: 38px;
}

.form-group textarea {
    min-height: 120px;

    resize: vertical;

    line-height: 1.6;
}

/* =================================
   FOCUS
================================= */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {

    border-color: #087443;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(8, 116, 67, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a3b1aa;
}

/* =================================
   INPUT FILE
================================= */
.form-group input[type="file"] {

    width: 100%;

    padding: 8px;

    border: 1px solid #d6e2dc;
    border-radius: 7px;

    background: #f7faf8;

    font-family: "DM Sans", sans-serif;
    font-size: 11px;

    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #087443;
}

/* =================================
   INFORMASI FILE
================================= */
.info-file {

    margin-top: 7px;

    padding: 8px 10px;

    background: #eef7f2;

    border-left: 3px solid #087443;

    border-radius: 5px;

    color: #66766f;

    font-size: 10px;

    line-height: 1.6;
}

/* =================================
   NAMA FILE
================================= */
#nama-file {

    margin-top: 7px;

    color: #7b8c85;

    font-size: 10px;

    font-style: italic;
}

/* =================================
   PREVIEW GAMBAR
================================= */
.preview-gambar {

    display: block;

    width: 190px;
    height: 125px;

    margin-top: 10px;

    overflow: hidden;

    border-radius: 8px;

    border: 1px solid #dce7e1;

    background: #f5f8f6;
}

.preview-gambar img {

    display: none;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

/* =================================
   TOMBOL SIMPAN
================================= */
.aksi {

    margin-top: 18px;

    text-align: right;

    padding-top: 15px;

    border-top: 1px solid #edf1ee;
}

.btn-simpan {

    border: none;

    padding: 9px 17px;

    background: #087443;
    color: #ffffff;

    border-radius: 7px;

    font-family: "DM Sans", sans-serif;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s ease;
}

.btn-simpan:hover {

    background: #065d36;

    transform: translateY(-1px);
}

/* =================================
   TABLE HEADER
================================= */
.table-header {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 15px;
}

.table-header h2 {
    margin-bottom: 0;
}

/* =================================
   SEARCH
================================= */
#cariBerita {

    width: 230px;
    height: 35px;

    padding: 8px 11px;

    border: 1px solid #d6e2dc;
    border-radius: 7px;

    background: #fbfdfc;

    color: #333;

    font-family: "DM Sans", sans-serif;

    font-size: 11px;

    outline: none;

    transition: 0.2s ease;
}

#cariBerita:focus {

    border-color: #087443;

    box-shadow:
        0 0 0 3px rgba(8, 116, 67, 0.08);
}

/* =================================
   TABLE
================================= */
.table-card {
    overflow-x: auto;
}

table {

    width: 100%;

    border-collapse: collapse;

    min-width: 800px;
}

/* =================================
   TABLE HEADER
================================= */
thead {
    background: #123c2d;
}

thead th {

    padding: 10px 9px;

    color: #ffffff;

    font-size: 11px;
    font-weight: 600;

    text-align: center;

    white-space: nowrap;
}

/* =================================
   TABLE BODY
================================= */
tbody td {

    padding: 9px 8px;

    border-bottom: 1px solid #edf1ee;

    color: #56665f;

    font-size: 11px;

    vertical-align: middle;
}

tbody tr {

    transition: 0.15s ease;
}

tbody tr:hover {
    background: #f7faf8;
}

/* =================================
   JUDUL BERITA
================================= */
tbody td strong {

    display: inline-block;

    max-width: 270px;

    color: #123c2d;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.4;
}

/* =================================
   FOTO BERITA
================================= */
.foto-berita {

    display: block;

    width: 65px;
    height: 48px;

    object-fit: cover;

    border-radius: 6px;

    border: 1px solid #dce7e1;
}

/* =================================
   TANPA FOTO
================================= */
.tanpa-foto {

    width: 65px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eef7f2;

    color: #087443;

    border-radius: 6px;

    font-size: 18px;
}

/* =================================
   KATEGORI
================================= */
.kategori {

    display: inline-block;

    padding: 4px 8px;

    background: #e8f5ec;

    color: #087443;

    border-radius: 20px;

    font-size: 10px;

    font-weight: 600;

    white-space: nowrap;
}

/* =================================
   AKSI TABLE
================================= */
.aksi-table {

    text-align: center;

    white-space: nowrap;
}

/* =================================
   BUTTON EDIT
================================= */
.btn-edit {

    display: inline-block;

    padding: 6px 9px;

    margin: 2px;

    background: #e8f5ec;

    color: #087443;

    border-radius: 6px;

    text-decoration: none;

    font-size: 10px;

    font-weight: 600;

    transition: 0.2s ease;
}

.btn-edit:hover {

    background: #087443;

    color: #ffffff;
}

/* =================================
   BUTTON HAPUS
================================= */
.btn-hapus {

    display: inline-block;

    padding: 6px 9px;

    margin: 2px;

    background: #fff0f0;

    color: #c0392b;

    border-radius: 6px;

    text-decoration: none;

    font-size: 10px;

    font-weight: 600;

    transition: 0.2s ease;
}

.btn-hapus:hover {

    background: #c0392b;

    color: #ffffff;
}

/* =================================
   SCROLL TABLE
================================= */
.table-card::-webkit-scrollbar {
    height: 6px;
}

.table-card::-webkit-scrollbar-track {

    background: #eef3f0;

    border-radius: 10px;
}

.table-card::-webkit-scrollbar-thumb {

    background: #b8cec2;

    border-radius: 10px;
}

.table-card::-webkit-scrollbar-thumb:hover {
    background: #087443;
}

/* =================================
   RESPONSIVE TABLET
================================= */
@media (max-width: 750px) {

    .container {
        width: 94%;
        margin-top: 20px;
    }

    .header {

        padding-top: 42px;

        text-align: left;
    }

    .header h1 {
        font-size: 21px;
    }

    .btn-kembali {
        top: 0;
    }

    .card {
        padding: 17px;
    }

    .table-header {

        flex-direction: column;

        align-items: stretch;
    }

    #cariBerita {
        width: 100%;
    }
}

/* =================================
   RESPONSIVE HP
================================= */
@media (max-width: 480px) {

    body {
        font-size: 12px;
    }

    .container {
        width: 94%;
    }

    .header h1 {
        font-size: 19px;
    }

    .card h2 {
        font-size: 15px;
    }

    .preview-gambar {
        width: 160px;
        height: 110px;
    }

    .btn-simpan {
        width: 100%;
    }

    .aksi {
        text-align: center;
    }
}