/* ============================================================
   style.css — Custom Branding PT. Mitra Semesta Indonesia
   ============================================================ */

:root {
    --msi-primary       : #7B1010;
    --msi-primary-dark  : #5C0C0C;
    --msi-primary-light : rgba(123,16,16,0.08);
    --msi-accent        : #1D4ED8;
    --msi-accent-hover  : #1E40AF;
    --msi-white         : #FFFFFF;
    --msi-bg-page       : #F3F4F6;
    --msi-text          : #111827;
    --msi-text-muted    : #6B7280;
    --msi-border        : #E5E7EB;
    --msi-sidebar-w     : 220px;
    --msi-navbar-h      : 64px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--msi-text);
    background: var(--msi-bg-page);
    margin: 0; padding: 0;
}

/* SIDEBAR */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--msi-sidebar-w);
    height: 100vh;
    background: var(--msi-primary);
    z-index: 1046;
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-brand {
    padding: 18px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}
.sidebar-brand-inner {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Biarkan ukuran logo mengikuti tinggi brand via aspect ratio */
}

.brand-company-logo {
    display: block;
    height: 100%;
    width: auto;
    max-height: 44px; /* amankan agar tidak terlalu besar */
    object-fit: contain;
}
.sidebar-brand-name { color: #FFFFFF; font-size: 12px; font-weight: 600; line-height: 1.3; }
.sidebar-brand-name span { display: block; font-size: 10px; font-weight: 400; opacity: 0.7; margin-top: 1px; }
.sidebar-nav { padding: 10px 0; flex: 1; }
.sidebar-section-label {
    font-size: 10px; font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase; letter-spacing: 0.8px;
    padding: 12px 16px 4px;
}
.sidebar-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 16px;
    color: rgba(255,255,255,0.85);
    text-decoration: none; font-size: 13px; font-weight: 500;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-item:hover { background: rgba(255,255,255,0.08); color: #FFFFFF; text-decoration: none; }
.sidebar-item.active { background: rgba(255,255,255,0.15); color: #FFFFFF; border-left-color: #FFFFFF; font-weight: 600; }
.sidebar-item i { font-size: 16px; flex-shrink: 0; width: 18px; text-align: center; }
.sidebar-badge {
    margin-left: auto; background: #DC2626; color: #fff;
    font-size: 10px; font-weight: 700; padding: 1px 6px;
    border-radius: 10px; min-width: 18px; text-align: center;
}
.sidebar-divider { border-top: 1px solid rgba(255,255,255,0.1); margin: 6px 0; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.12); padding: 12px 16px; flex-shrink: 0; }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-avatar {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.2); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #fff; flex-shrink: 0;
}
.sidebar-user-name { color: #FFFFFF; font-size: 12px; font-weight: 600; white-space: wrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,0.55); font-size: 10px; text-transform: capitalize; }

/* NAVBAR */
.navbar-top {
    position: fixed; top: 0; left: var(--msi-sidebar-w); right: 0;
    height: var(--msi-navbar-h);
    background: #FFFFFF; border-bottom: 1px solid var(--msi-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; z-index: 999;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.navbar-page-title { font-size: 18px; font-weight: 600; color: var(--msi-text); margin: 0; }
.navbar-left { display: flex; align-items: center; gap: 12px; }
.btn-sidebar-toggle {
    width: 38px; height: 38px;
    background: #F3F4F6; border: none; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--msi-text); cursor: pointer;
    transition: background 0.15s;
}
.btn-sidebar-toggle:hover { background: var(--msi-border); }
.navbar-right { display: flex; align-items: center; gap: 8px; }
.btn-notif {
    position: relative; width: 38px; height: 38px;
    background: #F3F4F6; border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--msi-text-muted); cursor: pointer;
    transition: background 0.15s; text-decoration: none;
}
.btn-notif:hover { background: var(--msi-border); color: var(--msi-primary); }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: #DC2626; color: #fff; font-size: 9px; font-weight: 700;
    padding: 1px 4px; border-radius: 8px; min-width: 16px; text-align: center; line-height: 1.4;
}
.navbar-user-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; background: #F9FAFB;
    border: 1px solid var(--msi-border); border-radius: 8px;
    cursor: pointer; text-decoration: none; color: var(--msi-text);
    transition: background 0.15s;
}
.navbar-user-btn:hover { background: var(--msi-border); color: var(--msi-text); }
.navbar-user-avatar {
    width: 28px; height: 28px; background: var(--msi-primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.navbar-user-name { font-size: 13px; font-weight: 500; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* MAIN CONTENT */
.main-content { margin-left: var(--msi-sidebar-w); padding-top: var(--msi-navbar-h); min-height: 100vh; }
.content-wrapper { padding: 24px; }

/* BREADCRUMB */
.breadcrumb { background: none; padding: 0; margin-bottom: 16px; font-size: 13px; }
.breadcrumb-item a { color: var(--msi-accent); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--msi-text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--msi-text-muted); }

/* CARDS */
.card { border: 1px solid var(--msi-border); border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card-header {
    background: #FFFFFF; border-bottom: 1px solid var(--msi-border);
    padding: 14px 20px; border-radius: 10px 10px 0 0 !important;
    font-weight: 600; font-size: 14px;
    display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 20px; }

/* STAT CARDS */
.stat-card {
    background: #FFFFFF; border: 1px solid var(--msi-border); border-radius: 10px;
    padding: 20px; display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.stat-card-label { font-size: 12px; color: var(--msi-text-muted); font-weight: 500; margin-bottom: 4px; }
.stat-card-value { font-size: 28px; font-weight: 700; color: var(--msi-text); line-height: 1; }
.stat-card-sub { font-size: 11px; color: var(--msi-text-muted); margin-top: 4px; }
.stat-card-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stat-icon-red    { background: #FEE2E2; color: #991B1B; }
.stat-icon-blue   { background: #DBEAFE; color: #1E40AF; }
.stat-icon-green  { background: #DCFCE7; color: #14532D; }
.stat-icon-orange { background: #FFEDD5; color: #9A3412; }
.stat-icon-purple { background: #EDE9FE; color: #5B21B6; }

/* TABEL */
.table { font-size: 13px; margin-bottom: 0; }
.table thead th {
    background: #F9FAFB; font-weight: 600; font-size: 12px;
    color: var(--msi-text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid var(--msi-border); padding: 10px 14px; white-space: nowrap;
}
.table tbody td { padding: 11px 14px; vertical-align: middle; border-bottom: 1px solid #F3F4F6; }
.table tbody tr:hover { background: #FAFAFA; }
.table tbody tr:last-child td { border-bottom: none; }

/* STATUS BADGE */
.badge-status {
    display: inline-flex; align-items: center;
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-pending        { background:#FEF3C7; color:#92400E; }
.badge-need_revision  { background:#FFEDD5; color:#9A3412; }
.badge-on_hold        { background:#F3F4F6; color:#374151; }
.badge-approved       { background:#DBEAFE; color:#1E40AF; }
.badge-in_production  { background:#EDE9FE; color:#5B21B6; }
.badge-qc_check       { background:#FEF9C3; color:#713F12; }
.badge-ready_to_ship  { background:#CFFAFE; color:#155E75; }
.badge-in_transit     { background:#E0E7FF; color:#3730A3; }
.badge-delivered      { background:#D1FAE5; color:#065F46; }
.badge-return_process { background:#FEE2E2; color:#991B1B; }
.badge-completed      { background:#DCFCE7; color:#14532D; }
.badge-dibatalkan     { background:#E5E7EB; color:#6B7280; }
.badge-draft          { background:#F3F4F6; color:#374151; }
.badge-dikirim        { background:#E0E7FF; color:#3730A3; }
.badge-diajukan       { background:#FFEDD5; color:#9A3412; }
.badge-diproses       { background:#DBEAFE; color:#1E40AF; }
.badge-selesai        { background:#DCFCE7; color:#14532D; }

/* TOMBOL */
.btn { font-size: 13px; font-weight: 500; border-radius: 7px; padding: 7px 14px; transition: all 0.15s; }
.btn-primary { background: var(--msi-accent) !important; border-color: var(--msi-accent) !important; color: #fff !important; }
.btn-primary:hover { background: var(--msi-accent-hover) !important; border-color: var(--msi-accent-hover) !important; }
.btn-msi { background: var(--msi-primary); border-color: var(--msi-primary); color: #fff; }
.btn-msi:hover { background: var(--msi-primary-dark); border-color: var(--msi-primary-dark); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }

/* FORM */
.form-control, .form-select {
    border: 1.5px solid #D1D5DB; border-radius: 7px;
    padding: 8px 12px; font-size: 13px; color: var(--msi-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--msi-primary);
    box-shadow: 0 0 0 3px rgba(123,16,16,0.12); outline: none;
}
.form-control[readonly] { background: #F9FAFB; color: var(--msi-text-muted); }
.form-label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.required-star { color: #DC2626; }
.input-group-text { border: 1.5px solid #D1D5DB; background: #F9FAFB; font-size: 13px; color: var(--msi-text-muted); }
.input-group:focus-within .form-control,
.input-group:focus-within .input-group-text { border-color: var(--msi-primary); }

/* ALERT */
.alert { border: none; border-radius: 8px; font-size: 13px; padding: 10px 14px; }
.alert-success { background: #DCFCE7; color: #14532D; }
.alert-danger  { background: #FEE2E2; color: #991B1B; }
.alert-warning { background: #FEF3C7; color: #92400E; }
.alert-info    { background: #DBEAFE; color: #1E40AF; }

/* PROGRESS */
.progress { height: 8px; border-radius: 4px; background: #E5E7EB; }
.progress-bar { background: var(--msi-accent); border-radius: 4px; transition: width 0.4s; }

/* PAGINATION */
.pagination { gap: 3px; }
.page-link { border-radius: 6px !important; border: 1px solid var(--msi-border); color: var(--msi-accent); font-size: 13px; padding: 5px 11px; }
.page-link:hover { background: var(--msi-primary-light); color: var(--msi-primary); }
.page-item.active .page-link { background: var(--msi-primary); border-color: var(--msi-primary); color: #fff; }

/* MODAL */
.modal-confirm .modal-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 12px; }
.modal-icon-danger  { background: #FEE2E2; color: #DC2626; }
.modal-icon-warning { background: #FEF3C7; color: #D97706; }
.modal-icon-info    { background: #DBEAFE; color: #1D4ED8; }
.modal-icon-success { background: #DCFCE7; color: #16A34A; }
.modal-confirm.modal-content { border-radius: 10px; border: none; }

/* TOMBOL KONFIRMASI MODAL */
.btn-confirm-danger  { background: #DC2626; border-color: #DC2626; color: #fff; }
.btn-confirm-danger:hover  { background: #B91C1C; border-color: #B91C1C; color: #fff; }
.btn-confirm-success { background: #16A34A; border-color: #16A34A; color: #fff; }
.btn-confirm-success:hover { background: #15803D; border-color: #15803D; color: #fff; }
.btn-confirm-info    { background: #1D4ED8; border-color: #1D4ED8; color: #fff; }
.btn-confirm-info:hover    { background: #1E40AF; border-color: #1E40AF; color: #fff; }

/* DROPDOWN */
.dropdown-menu { border: 1px solid var(--msi-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); font-size: 13px; padding: 4px; }
.dropdown-item { border-radius: 6px; padding: 7px 12px; color: var(--msi-text); }
.dropdown-item:hover { background: #F3F4F6; }
.dropdown-item.text-danger:hover { background: #FEE2E2; }

/* NOTIFIKASI */
.notif-dropdown { width: 320px; padding: 0; max-height: 400px; overflow-y: auto; }
.notif-header { padding: 12px 16px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--msi-border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; }
.notif-item { padding: 10px 16px; border-bottom: 1px solid #F9FAFB; cursor: pointer; display: block; text-decoration: none; color: var(--msi-text); transition: background 0.1s; }
.notif-item:hover { background: #F9FAFB; }
.notif-item.unread { background: #FFFBEB; }
.notif-item-title { font-size: 12px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-pesan { font-size: 11px; color: var(--msi-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-time { font-size: 10px; color: #9CA3AF; margin-top: 3px; }
.notif-footer { padding: 8px 16px; text-align: center; border-top: 1px solid var(--msi-border); font-size: 12px; }

/* NOTIFIKASI — TAB UNDERLINE */
.notif-tab-nav { border-bottom: 1.5px solid var(--msi-border); display: flex; gap: 0; margin-bottom: 1rem; }
.notif-tab-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; font-size: 14px; text-decoration: none; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; color: var(--msi-text-muted); transition: color 0.15s; white-space: nowrap; }
.notif-tab-link:hover { color: var(--msi-primary); text-decoration: none; }
.notif-tab-link.active { border-bottom-color: var(--msi-primary); color: var(--msi-primary); font-weight: 500; }
.notif-tab-badge { background: var(--msi-primary); color: #fff; font-size: 11px; line-height: 1; border-radius: 999px; padding: 2px 7px; }

/* NOTIFIKASI — INBOX PAGE ROWS */
.notif-inbox-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; cursor: pointer; color: var(--msi-text); border-bottom: 0.5px solid var(--msi-border); transition: background 0.15s; }
.notif-inbox-row:last-child { border-bottom: none; }
.notif-inbox-row:hover { background: #F9FAFB; }
.notif-inbox-row.notif-unread { background: #EFF6FF; border-left: 3px solid var(--msi-primary); }
.notif-inbox-row.notif-unread:hover { background: #DBEAFE; }
.notif-icon-circle { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }

/* UPLOAD AREA */
.upload-area { border: 2px dashed #D1D5DB; border-radius: 8px; padding: 28px 20px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: #FAFAFA; }
.upload-area:hover { border-color: var(--msi-primary); background: var(--msi-primary-light); }
.upload-area i { font-size: 32px; color: #9CA3AF; margin-bottom: 8px; }
.upload-area p { font-size: 13px; color: var(--msi-text-muted); margin: 0; }
.upload-link { color: var(--msi-accent); font-weight: 600; }

/* UTILITY */
.text-msi { color: var(--msi-primary) !important; }
.fw-600 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.cursor-pointer { cursor: pointer; }
.link-po { color: var(--msi-accent); font-weight: 600; text-decoration: none; }
.link-po:hover { text-decoration: underline; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--msi-text-muted); }
.empty-state i { font-size: 40px; margin-bottom: 10px; opacity: 0.4; }
.empty-state p { font-size: 13px; margin: 0; }
.alert-item-baru { background: #FFFBEB; border: 1px solid #FCD34D; border-left: 4px solid #F59E0B; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #92400E; display: flex; align-items: center; gap: 10px; }
.table-items-scroll {
    border: 1px solid var(--msi-border);
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}
.table-items {
    border: none;
    border-radius: 0;
    overflow: visible;
    width: 100%;
    min-width: 860px;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.table-items thead th {
    background: #F9FAFB;
    font-size: 11px;
    padding: 8px 10px;
    white-space: nowrap;
    overflow: visible;
    vertical-align: middle;
}
.table-items tbody td {
    padding: 8px 10px;
    overflow: visible;
    vertical-align: middle;
}
.table-items th.th-no,
.table-items td.td-no { width: 36px; min-width: 36px; padding-left: 8px; padding-right: 6px; }
.table-items th.th-nama,
.table-items td.td-nama { min-width: 200px; }
.table-items th.th-kode,
.table-items td.td-kode { min-width: 150px; }
.table-items th.th-qty,
.table-items td.td-qty { width: 80px; min-width: 80px; }
.table-items th.th-satuan,
.table-items td.td-satuan { width: 88px; min-width: 88px; }
.table-items th.th-harga,
.table-items td.td-harga { min-width: 158px; width: 158px; }
.table-items th.th-total,
.table-items td.td-total { min-width: 148px; width: 148px; }
.table-items th.th-aksi,
.table-items td.td-aksi { width: 44px; min-width: 44px; padding-left: 6px; padding-right: 8px; text-align: center; }
.table-items .form-control,
.table-items .form-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 7px;
}
.table-items .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}
.table-items .input-group .input-group-text {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 5px 7px;
    line-height: 1.4;
    border-radius: 7px 0 0 7px;
}
.table-items .input-group .form-control.inp-harga {
    flex: 1 1 auto;
    min-width: 0;
    width: 1%;
    border-radius: 0 7px 7px 0;
}
.table-items .total-baris {
    width: 100%;
    box-sizing: border-box;
}
.table-items col.col-no    { width: 36px; }
.table-items col.col-nama  { min-width: 200px; }
.table-items col.col-kode  { width: 150px; }
.table-items col.col-qty   { width: 80px; }
.table-items col.col-satuan { width: 88px; }
.table-items col.col-harga { width: 158px; }
.table-items col.col-total { width: 148px; }
.table-items col.col-aksi  { width: 44px; }
.table-items .form-control:focus,
.table-items .form-select:focus,
.table-items .input-group:focus-within {
    position: relative;
    z-index: 2;
}

@media (max-width: 767.98px) {
    .navbar-top { left: 0; padding: 0 12px; }
    .main-content { margin-left: 0; }
    .content-wrapper { padding: 16px; }
    #sidebar.offcanvas-md { width: 260px; }

    /* ── Navbar title: truncate saat judul terlalu panjang ── */
    .navbar-left {
        min-width: 0;       /* izinkan flex child menyusut */
        flex: 1 1 auto;
        overflow: hidden;
    }
    .navbar-page-title {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* ── Navbar kanan: kecilkan nama user, pertahankan teks ── */
    .navbar-user-name {
        font-size: 11px;
        max-width: 70px;    /* lebih ketat dari 120px di desktop */
    }
    .navbar-user-btn {
        padding: 5px 8px;
        gap: 5px;
    }

    /* ── Konten dinamis: cegah overflow horizontal ── */
    .card-body { overflow-wrap: break-word; word-break: break-word; }

    /* ── Tombol aksi: wrap ke baris baru jika tidak cukup ── */
    .btn-group-mobile-wrap { flex-wrap: wrap !important; }
}

@media (min-width: 768px) {
    /* Bootstrap .offcanvas-md (>=768px) sets width/height/background/border/transform
       with !important, which beats our ID-selector override on specificity alone.
       Match it with !important to restore the static 220px fixed sidebar. */
    #sidebar.offcanvas-md {
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: var(--msi-sidebar-w) !important;
        height: 100vh !important;
        visibility: visible !important;
        transform: none !important;
        background: var(--msi-primary) !important;
        border: 0 !important;
        z-index: 1046;
    }
    .main-content { margin-left: var(--msi-sidebar-w); }
}

/* ================================================================
   === LOGIN PAGE REDESIGN ===
   Scoped ke body.login-page — tidak mempengaruhi halaman lain.
   ================================================================ */

/* Body override */
body.login-page {
    background: linear-gradient(135deg, var(--msi-primary) 0%, var(--msi-primary-dark) 100%);
    min-height: 100dvh;
    min-height: 100vh; /* fallback */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Card split ──────────────────────────────────────────────── */
.lp-card {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 1050px;
    min-height: 560px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.45);
}

/* ── Panel Kiri (foto) ───────────────────────────────────────── */
.lp-left {
    flex: 0 0 57%;
    position: relative;
    display: flex;
    flex-direction: column;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.lp-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(60, 8, 8, 0.72);
}

.lp-left-inner {
    position: relative;
    z-index: 1;
    padding: 48px 44px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.lp-quote {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    line-height: 1.5;
    color: #ffffff;
    max-width: 340px;
    margin: 0;
}

.lp-welcome h1 {
    font-size: 52px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.05;
    margin: 0 0 14px;
    letter-spacing: -0.5px;
}

.lp-welcome p {
    font-size: 12.5px;
    color: rgba(255,255,255,0.72);
    line-height: 1.8;
    max-width: 320px;
    margin: 0;
}

/* ── Panel Kanan (form) ──────────────────────────────────────── */
.lp-right {
    flex: 0 0 43%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

/* Header: brand + label Login */
.lp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-bottom: 1px solid var(--msi-border);
}

.lp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-pallet-icon {
    display: flex;
    flex-direction: column-reverse;
    gap: 0px;
    color: var(--msi-primary);
    flex-shrink: 0;
}

.lp-brand-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--msi-text);
    line-height: 1.35;
}

.lp-brand-name span {
    display: block;
    font-weight: 700;
    color: var(--msi-primary);
    font-size: 13px;
}

.lp-header-tag {
    font-size: 13px;
    font-weight: 600;
    color: var(--msi-primary);
}

/* Body form */
.lp-body {
    flex: 1;
    padding: 28px 48px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lp-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 22px;
}

/* Flash alerts */
.lp-alert {
    width: 100%;
    border-radius: 8px;
    font-size: 13px;
    padding: 10px 14px;
    border: none;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lp-alert-danger  { background: #FEE2E2; color: #991B1B; }
.lp-alert-warning { background: #FEF3C7; color: #92400E; }
.lp-alert-success { background: #DCFCE7; color: #14532D; }
.lp-alert-info    { background: #DBEAFE; color: #1E40AF; }

/* Form */
.lp-form { width: 100%; }

.lp-field { margin-bottom: 16px; }

.lp-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--msi-text);
    margin-bottom: 7px;
}
.lp-label i { font-size: 14px; color: var(--msi-text-muted); }

.lp-input {
    border: 1.5px solid var(--msi-border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--msi-text);
    width: 100%;
    min-height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    outline: none;
    display: block;
}
.lp-input:focus {
    border-color: var(--msi-primary);
    box-shadow: 0 0 0 3px var(--msi-primary-light);
}
.lp-input::placeholder { color: var(--msi-text-muted); }

/* Suppress browser-native password reveal button (Chrome/Edge/IE) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button { visibility: hidden; pointer-events: none; }

/* Password wrapper + eye button */
.lp-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.lp-pw-wrap .lp-input { padding-right: 52px; }

.lp-eye-btn {
    position: absolute;
    right: 2px;
    width: 43px;
    height: 43px;
    border-radius: 0 10px 10px 0;
    border: 0px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--msi-text-muted);
    font-size: 14px;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
.lp-eye-btn:hover { border-color: var(--msi-primary); color: var(--msi-primary); }

/* Submit button */
.lp-submit {
    width: 100%;
    background: var(--msi-primary);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
    min-height: 48px;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.lp-submit:hover   { background: var(--msi-primary-dark); }
.lp-submit:active  { transform: scale(0.98); }
.lp-submit:disabled { background: #9B9B9B; cursor: not-allowed; }

/* Lupa password */
.lp-forgot {
    display: block;
    text-align: right;
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--msi-primary);
    text-decoration: none;
    font-weight: 500;
}
.lp-forgot:hover { text-decoration: underline; color: var(--msi-primary-dark); }

/* Teks instruksi (halaman forgot password) */
.lp-instruction {
    font-size: 13px;
    font-weight: 600;
    color: var(--msi-primary);
    text-align: center;
    line-height: 1.65;
    margin-bottom: 20px;
    width: 100%;
}

/* Link kembali ke login */
.lp-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--msi-primary);
    text-decoration: none;
    font-weight: 500;
}
.lp-back-link:hover { text-decoration: underline; color: var(--msi-primary-dark); }

/* ── Mobile (<768px) ─────────────────────────────────────────── */
@media (max-width: 767px) {
    body.login-page {
        padding: 16px;
        align-items: center;
        justify-content: center;
        min-height: 100dvh;
        min-height: 100vh; /* fallback */
    }
    .lp-card {
        flex-direction: column;
        max-width: 420px;
        width: 100%;
        margin: 0 auto;
        border-radius: 16px;
        min-height: auto;
    }
    .lp-left  { display: none; }
    .lp-right { border-radius: 16px; }
    .lp-body  { padding: 24px 28px 32px; }
}

/* === END LOGIN PAGE REDESIGN === */
