/* =====================================================================
   NARTTADIN FARM - style.css
   Tema: Hijau (#0B6B2A), putih, abu-abu muda
   ===================================================================== */

:root {
    --green-dark:   #0B6B2A;
    --green:        #198a3c;
    --green-light:  #e8f3ec;
    --green-hover:  #095a23;
    --sidebar-bg:   #0B6B2A;
    --sidebar-active:#0a5723;
    --gray-bg:      #f4f6f5;
    --gray-text:    #6c757d;
    --card-shadow:  0 4px 18px rgba(0,0,0,.06);
    --radius:       14px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gray-bg);
    color: #2c3338;
    margin: 0;
}

/* ===================== LOGIN PAGE ===================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-left {
    flex: 1;
    position: relative;
    background:
        linear-gradient(180deg, rgba(11,107,42,.55), rgba(11,107,42,.85)),
        url('../img/bg-perkebunan.svg') center/cover no-repeat;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.login-left .brand-logo {
    width: 120px;
    height: 120px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.login-left .brand-logo img { width: 78px; }

.login-left h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0 0 6px;
}
.login-left p.subtitle {
    font-size: 1rem;
    opacity: .95;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.login-left p.desc {
    max-width: 420px;
    line-height: 1.7;
    opacity: .92;
    font-size: .95rem;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: var(--radius);
    padding: 38px 34px;
    box-shadow: var(--card-shadow);
    border: 1px solid #eef1ef;
}
.login-card h2 {
    color: var(--green-dark);
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}
.login-card .welcome-sub {
    text-align: center;
    color: var(--gray-text);
    margin-bottom: 26px;
    font-size: .92rem;
}

.form-label { font-weight: 600; font-size: .88rem; color: #3a4248; }

.input-icon-group { position: relative; }
.input-icon-group .form-control { padding-left: 42px; height: 48px; border-radius: 10px; }
.input-icon-group .icon-left {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--green); pointer-events: none;
}
.input-icon-group .toggle-pass {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--gray-text); cursor: pointer; background: none; border: 0;
}

.form-control:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 .2rem rgba(25,138,60,.15);
}

.btn-green {
    background: var(--green-dark);
    border: none;
    color: #fff;
    font-weight: 600;
    height: 48px;
    border-radius: 10px;
    width: 100%;
    transition: .2s;
}
.btn-green:hover { background: var(--green-hover); color: #fff; }

/* ===================== LAYOUT DASHBOARD ===================== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease;
}
.sidebar .sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 22px;
    font-weight: 800; font-size: 1.05rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar .sidebar-brand img { width: 30px; }

.sidebar .nav-menu { padding: 14px 0; flex: 1; overflow-y: auto; }
.sidebar .nav-menu a {
    display: flex; align-items: center; gap: 13px;
    padding: 13px 24px;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .94rem;
    border-left: 4px solid transparent;
    transition: .15s;
}
.sidebar .nav-menu a i { width: 20px; text-align: center; }
.sidebar .nav-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .nav-menu a.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left-color: #bff0c9;
    font-weight: 600;
}

.main-area {
    flex: 1;
    margin-left: 250px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #fff;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    position: sticky; top: 0; z-index: 1030;
}
.topbar .brand-mobile { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--green-dark); }
.topbar .brand-mobile img { width: 26px; }
.topbar .btn-toggle { border: none; background: none; font-size: 1.3rem; color: var(--green-dark); }

.user-badge {
    display: flex; align-items: center; gap: 8px;
    background: var(--green-light);
    color: var(--green-dark);
    padding: 7px 14px;
    border-radius: 30px;
    font-weight: 600; font-size: .9rem;
    border: none;
}

.content { padding: 26px; }

.page-title { font-weight: 800; color: #1f2a24; margin-bottom: 2px; }
.page-sub { color: var(--gray-text); font-size: .92rem; margin-bottom: 22px; }

/* ===================== CARDS ===================== */
.card-soft {
    background: #fff;
    border: 1px solid #eef1ef;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid #eef1ef;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.stat-card .stat-icon {
    width: 62px; height: 62px;
    background: var(--green-light);
    color: var(--green-dark);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
}
.stat-card .stat-label { color: var(--gray-text); font-size: .92rem; margin: 0; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 800; color: #1f2a24; line-height: 1.1; }
.stat-card .stat-value small { font-size: .95rem; font-weight: 600; color: var(--gray-text); }
.stat-card .stat-note { font-size: .8rem; color: var(--gray-text); margin: 0; }

/* ===================== TABLE ===================== */
.table thead th {
    background: var(--green-light);
    color: var(--green-dark);
    font-weight: 700;
    font-size: .86rem;
    border: none;
    white-space: nowrap;
}
.table td { font-size: .9rem; vertical-align: middle; }

.badge-masuk  { background: #dcf3e3; color: #0B6B2A; }
.badge-keluar { background: #fde8e8; color: #b42318; }
.badge-soft   { font-weight: 600; padding: 5px 11px; border-radius: 20px; font-size: .78rem; }

.btn-green-solid { background: var(--green-dark); border: none; color: #fff; font-weight: 600; }
.btn-green-solid:hover { background: var(--green-hover); color: #fff; }
.btn-outline-green { border: 1px solid var(--green-dark); color: var(--green-dark); font-weight: 600; }
.btn-outline-green:hover { background: var(--green-dark); color: #fff; }

/* ===================== ALERTS ===================== */
.alert { border-radius: 10px; border: none; }

/* ===================== RESPONSIVE ===================== */
.overlay-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1035;
}

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .overlay-backdrop.show { display: block; }
}

@media (max-width: 767px) {
    .login-left { display: none; }
    .content { padding: 18px; }
    .stat-card { padding: 18px; }
    .stat-card .stat-value { font-size: 1.6rem; }
}
