:root {
    --primary: #1b5e20;
    --accent: #ef6c00;
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #263238;
    --muted: #607d8b;
    --border: #e0e0e0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ===============================
   LOGIN
================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f8;
}

.login-card {
    display: flex;
    width: 760px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* KIRI */
.login-visual {
    width: 45%;
    background: linear-gradient(180deg, #e8f5e9, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-visual img {
    width: 80%;
    max-width: 280px;
}

/* KANAN */
.login-form {
    width: 55%;
    padding: 40px;
}

.login-form h1 {
    margin: 0;
    font-size: 24px;
    color: var(--primary);
}

.login-form p {
    margin: 6px 0 24px;
    font-size: 14px;
    color: var(--muted);
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 14px;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.login-footer {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
}

/* ===============================
   APP HEADER
================================ */

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 68px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1f4037, #2c7744);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    animation: headerFade .6s ease;
}

@keyframes headerFade {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-wrap {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-wrap img {
    max-width: 28px;
    max-height: 28px;
}

.brand-text {
    line-height: 1.1;
}

.company-name {
    font-size: 16px;
    font-weight: 700;
}

.company-sub {
    font-size: 11.5px;
    opacity: .85;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.15);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd200, #f7971e);
    color: #1f2937;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    opacity: .85;
    text-transform: uppercase;
}

/* ===============================
   SIDEBAR
================================ */

.sidebar {
    position: fixed;
    top: 68px;
    left: 0;
    bottom: 40px;
    width: 240px;
    background: linear-gradient(180deg,#ffffff,#f7f9fb);
    border-right: 1px solid #dbe5ef;
    padding: 12px 0;
    font-size: 14px;
    box-shadow: 4px 0 20px rgba(0,0,0,.06);
}

.sidebar-group {
    margin-bottom: 10px;
}

.sidebar-group-title {
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    text-decoration: none;
    color: #243447;
    font-weight: 600;
}

.sidebar-item.active,
.sidebar-submenu a.active {
    background: linear-gradient(135deg,#2ecc71,#27ae60);
    color: #fff;
    border-radius: 8px;
}

.sidebar-submenu {
    display: none;
    padding-left: 10px;
}

.sidebar-group.open .sidebar-submenu {
    display: block;
}

.sidebar-submenu a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #34495e;
    font-size: 13px;
}

/* ===============================
   CONTENT
================================ */

.content {
    margin-top: 0px;
    margin-left: 240px;
    margin-bottom: 40px;
    padding: 24px;
}

/* ===============================
   DASHBOARD / CARD
================================ */

.dashboard-hero {
    background: linear-gradient(135deg, #e8f5e9, #ffffff);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.dashboard-hero h1 {
    margin-top: 0;
}

.card {
    background: var(--card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

/* ===============================
   FOOTER
================================ */

.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #777;
    display: flex;
    align-items: center;
    padding-left: 260px;
}

/* ===============================
   FORM UTILITIES
================================ */

input[type="number"] {
    text-align: right;
}

.text-right {
    text-align: right;
}

.thumb {
    width: 100px;
}

/* SUPPLIER / CUSTOMER */

.supplier-wrap,
.customer-wrap {
    display: flex;
    gap: 10px;
}

.supplier-wrap input,
.customer-wrap input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f9fafb;
    font-weight: 600;
}

.btn-supplier,
.btn-customer {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-supplier:hover,
.btn-customer:hover {
    background: #0b5ed7;
}
