* {
    box-sizing: border-box;
}

:root {
    --navy: #263746;
    --navy-dark: #1d2a35;
    --blue: #2f6f9f;
    --blue-dark: #24597f;
    --line: #b7b7b7;
    --panel: #f2f2f2;
    --paper: #ffffff;
    --text: #202020;
    --muted: #666666;
    --danger: #a33a32;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #e6e6e6;
}

body {
    font-size: 14px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(#d9d9d9 1px, transparent 1px),
        linear-gradient(90deg, #d9d9d9 1px, transparent 1px),
        #ededed;
    background-size: 24px 24px;
}

.login-shell {
    width: 100%;
    max-width: 430px;
}

.login-card {
    background: var(--paper);
    border: 1px solid #999;
    box-shadow: 4px 4px 0 #a5a5a5;
    padding: 28px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: var(--navy);
    color: #fff;
    border: 2px solid #111;
    font-weight: 700;
    margin-bottom: 12px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--blue-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

h1 {
    margin: 0;
    font-size: 24px;
}

.subtitle {
    margin: 5px 0 24px;
    color: var(--muted);
}

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid #888;
    background: #fff;
    font: inherit;
}

input:focus {
    outline: 2px solid #8db6d2;
    outline-offset: 1px;
}

.btn-primary {
    width: 100%;
    min-height: 44px;
    margin-top: 20px;
    border: 1px solid #1b405c;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.alert {
    border: 1px solid;
    padding: 10px;
    margin-bottom: 12px;
}

.alert-error {
    color: #6e1d18;
    border-color: #bd7b75;
    background: #f7e3e1;
}

.login-card footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid #ccc;
    color: #777;
    font-size: 11px;
}

.topbar {
    min-height: 58px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: var(--navy);
    color: #fff;
    border-bottom: 3px solid #111;
}

.topbar-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: #d9e2e8;
    letter-spacing: 1px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-user a {
    color: #fff;
    border: 1px solid #b9c5cd;
    padding: 6px 10px;
    text-decoration: none;
}

.app-layout {
    display: flex;
    min-height: calc(100vh - 58px);
}

.sidebar {
    width: 220px;
    flex: 0 0 220px;
    background: #d4d4d4;
    border-right: 1px solid #999;
    padding: 12px 0;
}

.menu-title {
    padding: 12px 14px 6px;
    color: #555;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.menu-link {
    display: block;
    padding: 9px 14px;
    border-top: 1px solid #c0c0c0;
    color: #222;
    text-decoration: none;
}

.menu-link.active {
    background: #fff;
    font-weight: 700;
    border-left: 4px solid var(--blue);
    padding-left: 10px;
}

.menu-link.disabled {
    color: #777;
    cursor: default;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 22px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
}

.page-heading h1 {
    font-size: 26px;
}

.date-box {
    border: 1px solid #999;
    background: #fff;
    padding: 8px 12px;
    font-family: "Courier New", monospace;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stat-box,
.panel {
    border: 1px solid #999;
    background: #fff;
    box-shadow: 2px 2px 0 #c0c0c0;
}

.stat-box {
    padding: 16px;
}

.stat-label {
    display: block;
    color: #555;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.stat-box strong {
    display: block;
    margin: 8px 0 3px;
    font-family: "Courier New", monospace;
    font-size: 28px;
}

.stat-box small {
    color: #777;
}

.panel {
    margin-top: 18px;
}

.panel-header {
    padding: 9px 12px;
    background: var(--panel);
    border-bottom: 1px solid #aaa;
    font-weight: 700;
}

.panel-body {
    padding: 14px;
    line-height: 1.6;
}

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

    .sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #999;
    }

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

    .page-heading,
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .content {
        padding: 14px;
    }
}

@media print {
    .sidebar,
    .topbar-user,
    .date-box {
        display: none;
    }

    .content {
        padding: 0;
    }

    .app-page {
        background: #fff;
    }
}


/* v1.1 — Produk & Harga */
.notice {
    border: 1px solid var(--line);
    padding: 10px 12px;
    margin-bottom: 14px;
    background: var(--paper);
}

.notice.success {
    border-left: 4px solid #3f7d4f;
}

.notice.error {
    border-left: 4px solid var(--danger);
}

.product-form {
    max-width: 1000px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field label {
    font-weight: bold;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid #9d9d9d;
    background: #fff;
    color: var(--text);
    padding: 8px 9px;
    font: inherit;
    border-radius: 0;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 2px solid #8db2cc;
    outline-offset: 0;
}

.form-field small {
    color: var(--muted);
    font-size: 12px;
}

.required {
    color: var(--danger);
}

.form-field-check {
    justify-content: flex-end;
}

.check-label {
    display: inline-flex;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    min-height: 38px;
}

.check-label input {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.button {
    display: inline-block;
    border: 1px solid #888;
    background: #eeeeee;
    color: #111;
    padding: 7px 12px;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    border-radius: 0;
}

.button:hover {
    background: #dedede;
}

.button.primary {
    border-color: #24597f;
    background: var(--blue);
    color: #fff;
}

.button.primary:hover {
    background: var(--blue-dark);
}

.button.small {
    padding: 5px 8px;
    font-size: 12px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.data-table th,
.data-table td {
    border: 1px solid #b5b5b5;
    padding: 7px 8px;
    vertical-align: top;
}

.data-table th {
    background: #e5e5e5;
    text-align: left;
    font-size: 12px;
}

.data-table tbody tr:nth-child(even) {
    background: #f7f7f7;
}

.text-right {
    text-align: right !important;
    white-space: nowrap;
}

.table-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.status {
    display: inline-block;
    padding: 3px 6px;
    border: 1px solid #888;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.status.active {
    background: #edf5ed;
}

.status.inactive {
    background: #eeeeee;
    color: #666;
}

.action-cell {
    white-space: nowrap;
}

.inline-form {
    display: inline;
}

.empty-cell {
    text-align: center;
    color: var(--muted);
    padding: 20px !important;
}

@media (max-width: 800px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-wide {
        grid-column: auto;
    }

    .form-field-check {
        justify-content: flex-start;
    }

    .content {
        padding: 16px;
    }
}

.form-field select,
.form-field textarea,
select,
textarea {
    width: 100%;
    border: 1px solid #9d9d9d;
    background: #fff;
    color: var(--text);
    padding: 8px 9px;
    font: inherit;
    border-radius: 0;
}
.form-field textarea,
textarea { min-height: 70px; resize: vertical; }
@media print {
    .panel { box-shadow: none; }
    .button, .form-actions, .notice, .page-heading .date-box { display: none !important; }
    .panel { margin-top: 8px; }
}
