/* =========================
   RESET & GLOBAL
========================= */

* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f6f2, #e8dccb);
}

/* =========================
   LOGIN PAGE
========================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 15px 40px rgba(120, 90, 60, 0.12);
    text-align: center;
}

.logo {
    width: 180px;
    max-width: 60%;
    height: auto;
    margin: 0 auto 12px;
    display: block;
}

.login-card h2 {
    margin: 0 0 18px;
    color: #6b4f3a;
}

.input-group {
    text-align: left;
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: #6b4f3a;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #d6c6b3;
    font-size: 14px;
}

.btn-login {
    width: 100%;
    background: #4CAF50;
    color: #ffffff;
    padding: 10px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
}

.btn-login:hover {
    background: #3d8b40;
}

.error {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 10px;
    background: #ffe8e8;
    color: #b13a3a;
    text-align: left;
}

.success {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 10px;
    background: #e8f7e8;
    color: #2f7a2f;
    text-align: left;
}

.footer-text {
    margin-top: 16px;
    color: #6b4f3a;
    font-size: 14px;
}


/* =========================
   FORM PAGE CONTAINER
========================= */

.form-page {
    padding: 40px;
}

.container-form {

    max-width: 1100px;

    margin: auto;

    background: #ffffff;

    padding: 35px;

    border-radius: 20px;

    box-shadow: 0 15px 40px rgba(120, 90, 60, 0.12);
}

.container-form h2 {

    text-align: center;

    margin-bottom: 30px;

    color: #6b4f3a;
}


/* =========================
   FORM INPUT
========================= */

.form-group {

    margin-bottom: 18px;
}

.form-group label {

    display: block;

    margin-bottom: 6px;

    font-weight: 500;

    color: #6b4f3a;
}

.form-group input,
.form-group select {

    width: 100%;

    padding: 10px;

    border-radius: 10px;

    border: 1px solid #d6c6b3;

    font-size: 14px;

    outline: none;

    transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus {

    border-color: #b08968;

    box-shadow: 0 0 0 2px rgba(176,137,104,0.15);
}


/* =========================
   FARM BOX
========================= */

.farm-box {

    background: #faf7f2;

    border: 1px solid #eadfce;

    padding: 18px;

    border-radius: 15px;

    margin-top: 20px;
}


/* =========================
   FARM HEADER
========================= */

.farm-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 12px;
}

.farm-info {

    font-size: 15px;

    color: #5c4432;

    line-height: 1.5;
}


/* =========================
   TABLE
========================= */

.table-wrapper {

    overflow-x: auto;
}

table {

    width: 100%;

    border-collapse: collapse;

    margin-top: 10px;
}

th {

    background: #b08968;

    color: white;

    padding: 10px;

    font-size: 14px;

    font-weight: 500;

    text-align: center;
}

td {

    padding: 6px;

    border-bottom: 1px solid #eee;
}

tr:nth-child(even) {

    background: #f4eee6;
}

td input,
td select {

    width: 100%;

    padding: 6px;

    border-radius: 8px;

    border: 1px solid #d6c6b3;

    font-size: 13px;
}


/* =========================
   ROW CONTROL (jumlah baris)
========================= */

.row-control {

    display: flex;

    gap: 10px;

    margin-top: 12px;
}

.row-control input {

    width: 150px;
}


/* =========================
   BUTTON
========================= */

button {

    cursor: pointer;

    border: none;

    border-radius: 8px;

    padding: 7px 14px;

    font-size: 13px;
}


/* tambah farm */
.btn-add {

    background: #b08968;

    color: white;

    margin-top: 5px;
}

.btn-add:hover {

    background: #8f6b50;
}


/* tambah baris */
.btn-add-row {

    background: #6b8e23;

    color: white;
}

.btn-add-row:hover {

    background: #4f6b18;
}


/* hapus farm */
.btn-delete-farm {

    background: #c94c4c;

    color: white;
}

.btn-delete-farm:hover {

    background: #a63b3b;
}


/* simpan */
.btn-save {

    background: #4CAF50;

    color: white;
}

.btn-save:hover {

    background: #3d8b40;
}

/* pending */
.btn-pending {
    background: #f4c542;
    color: #3a2e00;
}

.btn-pending:hover {
    background: #e0b12d;
}


/* hapus semua */
.btn-delete-all {

    background: #c94c4c;

    color: white;
}

.btn-delete-all:hover {

    background: #a63b3b;
}


/* =========================
   ACTION BUTTON AREA
========================= */

.top-action {

    margin-top: 20px;

    display: flex;

    justify-content: flex-end;
}

.right-action {

    display: flex;

    gap: 10px;
}


/* =========================
   PENDING MANAGER
========================= */

.pending-manager {
    background: #fff8e7;
    border: 1px solid #edd8a1;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 20px;
}

.pending-manager h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #6b4f3a;
}

.pending-empty {
    margin: 0;
    color: #6b4f3a;
}

.pending-table th {
    background: #d7a33f;
}

.pending-table td {
    vertical-align: middle;
}

.pending-table tr.row-status-selesai {
    background: #e7f6ea;
}

.pending-table tr.row-status-pending {
    background: #fff5cc;
}

.pending-table tr.row-status-selesai td,
.pending-table tr.row-status-pending td {
    border-bottom-color: #eadfce;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-selesai {
    background: #2f7a2f;
    color: #ffffff;
}

.status-pending {
    background: #f4c542;
    color: #3a2e00;
}

.btn-edit-pending {
    display: inline-block;
    background: #6b8e23;
    color: #ffffff;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    text-decoration: none;
    margin-right: 6px;
}

.btn-edit-pending:hover {
    background: #4f6b18;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px)
{

    .container-form {

        padding: 18px;
    }

    .farm-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 10px;
    }

    .row-control {

        flex-direction: column;
    }

    .right-action {

        flex-direction: column;

        width: 100%;
    }

    .btn-pending,
    .btn-save,
    .btn-delete-all {

        width: 100%;
    }

}
