/* ============================================================
   SISTEM PENAWARAN HARGA MANUFAKTUR - Custom Styles
   Design System: Deep Navy (#091E42) sidebar, Corporate Blue (#0052CC)
   ============================================================ */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== BASE RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #191b23;
    background-color: #f4f5f7;
    margin: 0;
    padding: 0;
}

/* ===== LAYOUT ===== */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background-color: #091E42;
    color: #ffffff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    padding: 32px;
    background-color: #f4f5f7;
}

/* ===== SIDEBAR ===== */
.sidebar-logo {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    color: #ffffff;
}

.sidebar-logo span {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 12px 0;
    flex: 1;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding: 16px 20px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    margin: 2px 8px;
    border-radius: 4px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.08);
    color: #ffffff;
}

.nav-item.active {
    background-color: rgba(0, 82, 204, 0.35);
    color: #ffffff;
    font-weight: 600;
}

.nav-item.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-item .nav-badge {
    margin-left: auto;
    background-color: rgba(255,255,255,0.12);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.sidebar-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    color: #ffffff;
}

.sidebar-user i {
    font-size: 16px;
    margin-bottom: 4px;
    color: rgba(255,255,255,0.6);
}

.sidebar-user span:not(.sidebar-role) {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.sidebar-role {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
}

/* ===== HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
    color: #191b23;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: #0052CC;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0047B3;
}

.btn-primary:active {
    background-color: #003D99;
}

.btn-secondary {
    background-color: #ffffff;
    color: #191b23;
    border: 1px solid #c3c6d6;
}

.btn-secondary:hover {
    background-color: #f4f5f7;
    border-color: #737685;
}

.btn-tertiary {
    background-color: transparent;
    color: #434654;
}

.btn-tertiary:hover {
    background-color: rgba(9, 30, 66, 0.06);
}

.btn-danger {
    background-color: #ba1a1a;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #a11515;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
}

.btn-icon {
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: #434654;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: rgba(9, 30, 66, 0.08);
    color: #191b23;
}

.btn-icon.danger:hover {
    background-color: rgba(186, 26, 26, 0.08);
    color: #ba1a1a;
}

/* ===== CARDS ===== */
.card {
    background-color: #ffffff;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    padding: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #191b23;
    margin: 0;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background-color: #ffffff;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    padding: 16px 20px;
}

.summary-card .sc-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #737685;
    margin-bottom: 4px;
}

.summary-card .sc-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #191b23;
    line-height: 1.1;
}

.summary-card .sc-sub {
    font-size: 12px;
    color: #434654;
    margin-top: 4px;
}

.summary-card.sc-pending { border-left: 3px solid #f59e0b; }
.summary-card.sc-deal { border-left: 3px solid #059669; }
.summary-card.sc-revised { border-left: 3px solid #3b82f6; }
.summary-card.sc-total { border-left: 3px solid #0052CC; }

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
    border: 1px solid #c3c6d6;
    border-radius: 4px;
    background: #ffffff;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 18px;
}

table.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

table.data-table th {
    background-color: #ededf8;
    color: #434654;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #c3c6d6;
    white-space: nowrap;
    user-select: none;
}

table.data-table th.sortable {
    cursor: pointer;
}

table.data-table th.sortable:hover {
    color: #0052CC;
}

table.data-table th.sortable::after {
    content: ' ↕';
    opacity: 0.3;
    font-size: 11px;
}

table.data-table th.sortable.asc::after {
    content: ' ↑';
    opacity: 1;
    color: #0052CC;
}

table.data-table th.sortable.desc::after {
    content: ' ↓';
    opacity: 1;
    color: #0052CC;
}

table.data-table th.right-align,
table.data-table td.right-align {
    text-align: right;
}

table.data-table th.center-align,
table.data-table td.center-align {
    text-align: center;
}

table.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e7e7f2;
    color: #191b23;
}

table.data-table tbody tr {
    transition: background-color 0.1s ease;
}

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

table.data-table tbody tr:hover {
    background-color: #e1e2ec;
}

/* Tabular figures for financial numbers */
.tabular-nums {
    font-feature-settings: "tnum" 1;
    -webkit-font-feature-settings: "tnum" 1;
    font-variant-numeric: tabular-nums;
}

/* ===== STATUS PILLS ===== */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-pending {
    color: #b45309;
    background-color: rgba(245, 158, 11, 0.10);
}

.status-deal {
    color: #047857;
    background-color: rgba(5, 150, 105, 0.10);
}

.status-revised {
    color: #1d4ed8;
    background-color: rgba(59, 130, 246, 0.10);
}

.status-tolak {
    color: #991b1b;
    background-color: rgba(186, 26, 26, 0.10);
}

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

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #434654;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #191b23;
    background-color: #ffffff;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.form-control:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.15);
}

.form-control::placeholder {
    color: #737685;
}

.form-control.error {
    border-color: #ba1a1a;
    border-width: 2px;
}

.form-error {
    font-size: 12px;
    color: #ba1a1a;
    margin-top: 4px;
    display: none;
}

.form-error.show {
    display: block;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23434654' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Input with right-aligned text (for currency) */
.form-control.text-right {
    text-align: right;
}

/* ===== FORM ROW (grid) ===== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ===== CHART ===== */
.chart-container {
    background: #ffffff;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 24px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #191b23;
}

.chart-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.chart-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e7e7f2;
}

.chart-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #737685;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}

.chart-tab:hover {
    color: #0052CC;
}

.chart-tab.active {
    color: #0052CC;
    border-bottom-color: #0052CC;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.search-input {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #737685;
    font-size: 14px;
    z-index: 1;
}

.search-input .form-control {
    padding-left: 36px !important;
}

/* ===== TOAST / FLASH ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(-10px);
    animation: toastSlideIn 0.3s ease forwards;
}

.toast-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.toast-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.toast-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ===== TABLE ===== */
.table-container {
    background: #ffffff;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background-color: #ededf8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #434654;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #c3c6d6;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
    user-select: none;
}

.data-table th.sortable {
    cursor: pointer;
}

.data-table th.sortable:hover {
    background-color: #e1e2ec;
}

.data-table th.right-align,
.data-table td.right-align {
    text-align: right;
}

.data-table th.center-align,
.data-table td.center-align {
    text-align: center;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e7e7f2;
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background-color: #f3f3fd;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid #e1e2ec;
    font-size: 13px;
}

.pagination-info {
    color: #737685;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    background: #ffffff;
    color: #434654;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    border-color: #0052CC;
    color: #0052CC;
}

.pagination-btn.active {
    background: #0052CC;
    border-color: #0052CC;
    color: #ffffff;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #737685;
}

.empty-state .empty-icon {
    font-size: 48px;
    color: #c3c6d6;
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: #434654;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
    color: #737685;
}

/* ===== FONT UTILITIES ===== */
.font-semibold {
    font-weight: 600;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-danger {
    color: #ba1a1a;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #e7e7f2;
    background-color: #ffffff;
}

.pagination-info {
    font-size: 13px;
    color: #434654;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #c3c6d6;
    background: #ffffff;
    color: #434654;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 32px;
    text-align: center;
}

.pagination-btn:hover {
    background-color: #f4f5f7;
    border-color: #737685;
}

.pagination-btn.active {
    background-color: #0052CC;
    color: #ffffff;
    border-color: #0052CC;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 30, 66, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background-color: #ffffff;
    border-radius: 4px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0px 4px 12px rgba(9, 30, 66, 0.15);
    animation: modalFadeIn 0.2s ease;
}

.modal-wide {
    max-width: 720px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    color: #191b23;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #737685;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background-color: rgba(9, 30, 66, 0.06);
    color: #191b23;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e7e7f2;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e1e2ec;
    margin-bottom: 24px;
}

.tab-item {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #434654;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.tab-item:hover {
    color: #191b23;
}

.tab-item.active {
    color: #0052CC;
    border-bottom-color: #0052CC;
}

/* ===== SECTION ===== */
.form-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #191b23;
    margin: 0 0 4px 0;
}

.section-desc {
    font-size: 14px;
    color: #737685;
    margin-bottom: 16px;
}

/* ===== RINCIAN PEKERJAAN ===== */
.pekerjaan-card {
    background-color: #ffffff;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}

.pekerjaan-card .pekerjaan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pekerjaan-card .pekerjaan-number {
    font-size: 13px;
    font-weight: 600;
    color: #0052CC;
}

.pekerjaan-actions {
    display: flex;
    gap: 8px;
}

/* Nested material table */
.material-table-wrap {
    margin-top: 12px;
    border: 1px solid #e1e2ec;
    border-radius: 4px;
    overflow: hidden;
}

/* Nested sub-table */
.sub-table-wrap {
    margin-top: 12px;
    border: 1px solid #e1e2ec;
    border-radius: 4px;
    overflow: hidden;
}

.sub-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #faf8ff;
    border-bottom: 1px solid #e1e2ec;
    font-size: 12px;
    font-weight: 600;
    color: #434654;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sub-table-header .btn-xs {
    text-transform: none;
    letter-spacing: normal;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}

.material-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.material-table th {
    background-color: #ededf8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #434654;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #c3c6d6;
}

.material-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e7e7f2;
    vertical-align: middle;
}

.material-table tr:last-child td {
    border-bottom: none;
}

.material-table .material-input {
    width: 100%;
    padding: 6px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border: 1px solid #DFE1E6;
    border-radius: 3px;
    outline: none;
    transition: border-color 0.15s ease;
}

.material-table .material-input:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.12);
}

.material-table .material-input.text-right {
    text-align: right;
}

/* Calculation row */
.calc-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding: 12px;
    background-color: #faf8ff;
    border: 1px solid #e7e7f2;
    border-radius: 4px;
    flex-wrap: wrap;
}

.calc-row .calc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.calc-row .calc-item label {
    font-weight: 600;
    color: #434654;
    white-space: nowrap;
}

.calc-row .calc-item input {
    width: 80px;
    padding: 4px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border: 1px solid #DFE1E6;
    border-radius: 3px;
    text-align: right;
    outline: none;
}

.calc-row .calc-item input:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.12);
}

.calc-row .calc-value {
    font-size: 14px;
    font-weight: 700;
    color: #191b23;
}

.calc-row .calc-value .currency {
    font-weight: 400;
    color: #737685;
    font-size: 12px;
}

/* ===== RINGKASAN / SUMMARY ===== */
.summary-table {
    width: 100%;
    max-width: 500px;
    margin-left: auto;
}

.summary-table td {
    padding: 8px 12px;
    font-size: 14px;
}

.summary-table td:last-child {
    text-align: right;
    font-weight: 600;
    font-feature-settings: "tnum" 1;
}

.summary-table .summary-total td {
    border-top: 2px solid #191b23;
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
}

.summary-table .summary-ppn td {
    border-top: 1px solid #e7e7f2;
}

/* Biaya Kirim Row */
.summary-table .biaya-kirim-row td {
    border-top: 1px solid #e7e7f2;
    padding-top: 12px;
}

.biaya-kirim-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.biaya-kirim-toggle-group {
    display: inline-flex;
    border: 1px solid #c3c6d6;
    border-radius: 4px;
    overflow: hidden;
}

.biaya-kirim-toggle-group .toggle-opt {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    background: #ffffff;
    color: #434654;
    cursor: pointer;
    transition: all 0.15s ease;
}

.biaya-kirim-toggle-group .toggle-opt.active {
    background: #0052CC;
    color: #ffffff;
}

.biaya-kirim-toggle-group .toggle-opt:not(.active):hover {
    background: #ededf8;
}

.shipping-input {
    width: 120px;
    padding: 4px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    text-align: right;
    font-feature-settings: "tnum" 1;
}

.shipping-input:focus {
    outline: none;
    border-color: #0052CC;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.15);
}

/* Harga Per Unit */
.summary-table .harga-per-unit td {
    border-top: 2px solid #191b23;
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
    color: #0052CC;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-track {
    width: 36px;
    height: 20px;
    background-color: #c3c6d6;
    border-radius: 10px;
    position: relative;
    transition: background-color 0.2s ease;
}

.toggle-track::after {
    content: '';
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-track {
    background-color: #0052CC;
}

.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(16px);
}

/* ===== CONFIRM DIALOG ===== */
.confirm-dialog {
    text-align: center;
    padding: 20px 0;
}

.confirm-dialog .confirm-icon {
    font-size: 48px;
    color: #ba1a1a;
    margin-bottom: 12px;
}

.confirm-dialog h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.confirm-dialog p {
    color: #434654;
    margin: 0 0 20px 0;
}

/* ===== TOAST / NOTIFICATION ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    box-shadow: 0px 4px 12px rgba(9, 30, 66, 0.15);
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.toast-success {
    background-color: #059669;
}

.toast-error {
    background-color: #ba1a1a;
}

.toast-warning {
    background-color: #d97706;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #737685;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: #434654;
    margin: 0 0 8px 0;
}

.empty-state p {
    margin: 0;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 82, 204, 0.2);
    border-top-color: #0052CC;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== UTILITY ===== */
.text-muted {
    color: #737685;
}

.text-danger {
    color: #ba1a1a;
}

.text-success {
    color: #059669;
}

.text-primary {
    color: #0052CC;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.w-full { width: 100%; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 60px;
    }
    .sidebar .nav-item span,
    .sidebar .nav-section-title,
    .sidebar .sidebar-logo h1,
    .sidebar .sidebar-logo span,
    .sidebar .nav-badge,
    .sidebar-footer {
        display: none;
    }
    .sidebar-logo {
        padding: 16px 0;
        text-align: center;
    }
    .sidebar .nav-item {
        justify-content: center;
        padding: 12px 0;
        margin: 2px 4px;
    }
    .main-content {
        margin-left: 60px;
        padding: 20px;
    }
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr;
    }
}

/* Loading overlay untuk form submit */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.7);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

.loading-overlay.show {
    display: flex;
}

.loading-overlay span {
    font-size: 14px;
    font-weight: 600;
    color: #0052CC;
}

/* Remove spinner from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ===== BIAYA KIRIM ===== */
.biaya-kirim-row {
    border-top: 1px solid #e7e7f2;
}
.biaya-kirim-row td {
    padding: 8px 12px;
    font-size: 14px;
}
.biaya-kirim-row td:last-child {
    text-align: right;
    font-weight: 600;
    font-feature-settings: "tnum" 1;
}
.biaya-kirim-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.biaya-kirim-controls .shipping-input {
    width: 120px;
    padding: 4px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border: 1px solid #DFE1E6;
    border-radius: 3px;
    text-align: right;
    outline: none;
}
.biaya-kirim-controls .shipping-input:focus {
    border-color: #0052CC;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.12);
}
.biaya-kirim-toggle-group {
    display: flex;
    gap: 4px;
}
.biaya-kirim-toggle-group .toggle-opt {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #c3c6d6;
    background: #ffffff;
    color: #434654;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.biaya-kirim-toggle-group .toggle-opt.active {
    background: #0052CC;
    color: #ffffff;
    border-color: #0052CC;
}
.biaya-kirim-toggle-group .toggle-opt:hover:not(.active) {
    background: #f4f5f7;
}
.harga-per-unit {
    border-top: 2px solid #191b23;
}
.harga-per-unit td {
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 700;
}
.harga-per-unit td:last-child {
    text-align: right;
    font-feature-settings: "tnum" 1;
    color: #0052CC;
}

/* ===== CHART ===== */
.chart-container {
    background-color: #ffffff;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 24px;
}
.chart-container .chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.chart-container .chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #191b23;
}
.chart-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e1e2ec;
    margin-bottom: 16px;
}
.chart-tab {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #434654;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}
.chart-tab:hover {
    color: #191b23;
}
.chart-tab.active {
    color: #0052CC;
    border-bottom-color: #0052CC;
}
.chart-wrapper {
    position: relative;
    height: 300px;
}
.chart-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.chart-filter-bar select {
    min-width: 140px;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f4f5f7 0%, #e1e2ec 100%);
    padding: 20px;
}
.login-card {
    background: #ffffff;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
    padding: 40px 32px;
    box-shadow: 0px 4px 16px rgba(9, 30, 66, 0.1);
}
.login-card .login-logo {
    text-align: center;
    margin-bottom: 8px;
}
.login-card .login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: #091E42;
    margin: 0;
    letter-spacing: -0.03em;
}
.login-card .login-logo span {
    display: block;
    font-size: 13px;
    color: #737685;
    margin-top: 4px;
    letter-spacing: 0.03em;
}
.login-card .login-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #191b23;
    margin: 24px 0 20px;
}
.login-card .login-error {
    display: none;
    background: rgba(186, 26, 26, 0.08);
    color: #ba1a1a;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    text-align: center;
}
.login-card .login-error.show {
    display: block;
}
.login-card .login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #737685;
}
.login-card .login-footer a {
    color: #0052CC;
    text-decoration: none;
    font-weight: 600;
}
.login-card .login-footer a:hover {
    text-decoration: underline;
}

/* ===== ROLE BADGE ===== */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.role-admin { color: #1d4ed8; background: rgba(59, 130, 246, 0.10); }
.role-manager { color: #047857; background: rgba(5, 150, 105, 0.10); }
.role-clevel { color: #b45309; background: rgba(245, 158, 11, 0.10); }
.role-kepala-produksi { color: #7c3aed; background: rgba(124, 58, 237, 0.10); }
.role-finance { color: #991b1b; background: rgba(186, 26, 26, 0.10); }

.status-aktif {
    color: #047857;
    font-weight: 600;
}
.status-nonaktif {
    color: #991b1b;
    font-weight: 600;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #737685;
    margin-bottom: 16px;
}
.breadcrumb a {
    color: #0052CC;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb .separator {
    color: #c3c6d6;
}
.breadcrumb .current {
    color: #191b23;
    font-weight: 600;
}

/* ===== DETAIL PENAWARAN ===== */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.detail-info-item label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #737685;
    margin-bottom: 4px;
}
.detail-info-item .value {
    font-size: 14px;
    font-weight: 600;
    color: #191b23;
}

/* ===== LAPORAN ===== */
.laporan-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.laporan-summary-card {
    background: #ffffff;
    border: 1px solid #DFE1E6;
    border-radius: 4px;
    padding: 16px 20px;
}
.laporan-summary-card .lsc-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #737685;
    margin-bottom: 4px;
}
.laporan-summary-card .lsc-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #191b23;
    line-height: 1.1;
}
.laporan-summary-card.lsc-total { border-left: 3px solid #0052CC; }
.laporan-summary-card.lsc-deal { border-left: 3px solid #059669; }
.laporan-summary-card.lsc-nilai { border-left: 3px solid #3b82f6; }

/* ===== QTY TOGGLE ===== */
.qty-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qty-toggle-label {
    font-size: 12px;
    font-weight: 600;
    color: #434654;
    user-select: none;
}
