/* StoneFlow theme - CV Alam Berkah Indonesia / Zeolite Factory */
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('../fonts/Poppins-Regular.woff') format('woff'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../fonts/Poppins-Medium.woff') format('woff'); }
@font-face { font-family: 'Poppins'; font-weight: 600 700; font-display: swap; src: url('../fonts/Poppins-Bold.woff') format('woff'); }

:root {
  --sf-green: #1f5c42;
  --sf-green-dark: #143d2c;
  --sf-green-deep: #0f2f22;
  --sf-stone: #5e8c6a;
  --sf-stone-light: #e3eee6;
  --sf-gold: #c8a45d;
  --sf-beige: #f3ecdc;
  --sf-bg: #f4f6f5;
  --sf-border: #e3e8e5;
  --sf-text: #1f2a25;
  --sf-muted: #6b7a72;
  --sidebar-w: 256px;
  --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --bs-body-font-size: .875rem;
  --bs-body-color: var(--sf-text);
  --bs-body-bg: var(--sf-bg);
  --bs-link-color: var(--sf-green);
  --bs-link-color-rgb: 31, 92, 66;
  --bs-link-hover-color: var(--sf-green-dark);
  --bs-border-color: var(--sf-border);
  --bs-secondary: #6c757d;
  --bs-secondary-rgb: 108, 117, 125;
}
html, body { font-family: var(--bs-body-font-family); }
body { background: var(--sf-bg); color: var(--sf-text); font-size: .875rem; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--sf-text); font-weight: 600; }
a { text-decoration: none; }
.text-muted { color: var(--sf-muted) !important; }
.btn { border-radius: 8px; font-weight: 500; font-size: .85rem; box-shadow: none !important; text-shadow: none !important; }
.btn-sm { font-size: .78rem; border-radius: 6px; }
.btn-secondary { --bs-btn-color: #33413a; --bs-btn-bg: #eef1ef; --bs-btn-border-color: #dfe5e1; --bs-btn-hover-color: #1f2a25; --bs-btn-hover-bg: #e2e8e4; --bs-btn-hover-border-color: #d3dbd6; --bs-btn-active-bg: #d7dfda; }
.btn-gold { --bs-btn-color: #3b2e10; --bs-btn-bg: var(--sf-gold); --bs-btn-border-color: var(--sf-gold); --bs-btn-hover-bg: #b8934c; --bs-btn-hover-border-color: #b8934c; --bs-btn-hover-color: #2b210b; }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--sf-border); }
.btn-outline-primary { --bs-btn-color: var(--sf-green); --bs-btn-border-color: #9dbdad; --bs-btn-hover-bg: var(--sf-green); --bs-btn-hover-border-color: var(--sf-green); }
.btn-whatsapp { --bs-btn-color: #fff; --bs-btn-bg: #1faa55; --bs-btn-border-color: #1faa55; --bs-btn-hover-bg: #178a44; --bs-btn-hover-color: #fff; }
.form-control, .form-select { border-radius: 8px; font-size: .86rem; border-color: #d6ddd9; }
.form-control:focus, .form-select:focus { border-color: #8fb9a4; box-shadow: 0 0 0 .2rem rgba(31, 92, 66, .15); }
.form-label { font-weight: 500; font-size: .8rem; color: #3f4d46; margin-bottom: .3rem; }
.form-label .req { color: #b83232; }
.form-text { font-size: .75rem; }
.input-group-text { background: #f2f5f3; border-color: #d6ddd9; font-size: .82rem; }
.card { border: 1px solid var(--sf-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 40, 30, .04); }
.card-header { background: #fff; border-bottom: 1px solid var(--sf-border); font-weight: 600; padding: .8rem 1rem; border-radius: 12px 12px 0 0 !important; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card-header .card-title { margin: 0; font-size: .95rem; font-weight: 600; }
.card-header .actions { margin-left: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
.table { --bs-table-bg: transparent; margin-bottom: 0; font-size: .83rem; }
.table > :not(caption) > * > * { padding: .55rem .65rem; border-color: #edf1ee; vertical-align: middle; }
.table thead th { background: #f6f8f7; color: #4e5d55; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; border-bottom: 1px solid var(--sf-border); }
.table thead th a { color: inherit; }
.table-hover tbody tr:hover > * { background: #f7faf8; }
.table-responsive { border-radius: 0 0 12px 12px; }
.badge { font-weight: 500; border-radius: 6px; padding: .35em .6em; }
.badge-soft { color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); border: 1px solid color-mix(in srgb, var(--c) 28%, #fff); white-space: nowrap; }
.dropdown-menu { border-radius: 10px; border-color: var(--sf-border); box-shadow: 0 8px 24px rgba(16, 40, 30, .12); font-size: .85rem; }
.dropdown-item.active, .dropdown-item:active { background: var(--sf-green); }
.nav-tabs .nav-link { color: var(--sf-muted); font-weight: 500; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--sf-green); border-bottom-color: var(--sf-green); background: transparent; }
.nav-tabs { border-bottom: 1px solid var(--sf-border); }
.alert { border-radius: 10px; font-size: .86rem; }
.pagination { --bs-pagination-color: var(--sf-green); --bs-pagination-active-bg: var(--sf-green); --bs-pagination-active-border-color: var(--sf-green); margin: 0; }
.progress { height: .6rem; border-radius: 10px; background: #e7ece9; }
.progress-bar { background: var(--sf-stone); }
.modal-content { border-radius: 14px; border: 0; }
.modal-header { border-bottom-color: var(--sf-border); }

/* Layout */
.sf-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: linear-gradient(180deg, var(--sf-green-dark), var(--sf-green-deep)); color: #d6e5dc; z-index: 1040; display: flex; flex-direction: column; transition: transform .25s ease; }
.sf-brand { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); min-height: 64px; }
.sf-brand img { max-height: 38px; max-width: 120px; border-radius: 6px; background: #fff; padding: 2px; }
.sf-brand .logo-ph { width: 38px; height: 38px; border-radius: 9px; background: var(--sf-gold); color: var(--sf-green-deep); display: grid; place-items: center; font-weight: 700; font-size: 1rem; }
.sf-brand .name { font-weight: 600; color: #fff; line-height: 1.1; font-size: 1rem; }
.sf-brand .sub { font-size: .68rem; color: #a9c4b5; }
.sf-nav { overflow-y: auto; padding: .6rem 0 1.5rem; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.sf-nav .grp { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: #86a897; padding: .9rem 1.2rem .35rem; font-weight: 600; }
.sf-nav a { display: flex; align-items: center; gap: .7rem; color: #d6e5dc; padding: .48rem 1.2rem; font-size: .84rem; border-left: 3px solid transparent; }
.sf-nav a i { width: 18px; text-align: center; font-size: .9rem; opacity: .85; }
.sf-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sf-nav a.active { background: rgba(200, 164, 93, .14); color: #fff; border-left-color: var(--sf-gold); }
.sf-nav a.active i { color: var(--sf-gold); opacity: 1; }
.sf-nav .count { margin-left: auto; background: var(--sf-gold); color: var(--sf-green-deep); font-size: .68rem; border-radius: 10px; padding: 0 .45rem; font-weight: 600; }
.sf-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.sf-topbar { position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--sf-border); height: 64px; display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; }
.sf-topbar .search { flex: 1; max-width: 520px; position: relative; }
.sf-topbar .search input { padding-left: 2.2rem; background: #f4f6f5; border-color: transparent; border-radius: 10px; }
.sf-topbar .search input:focus { background: #fff; }
.sf-topbar .search > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #8a9a91; }
.sf-topbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.sf-icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #4a5a52; background: transparent; border: 0; }
.sf-icon-btn:hover { background: #f1f4f2; color: var(--sf-green); }
.sf-icon-btn .dot { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: #c0392b; color: #fff; font-size: .65rem; display: grid; place-items: center; padding: 0 4px; font-weight: 600; }
.sf-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sf-stone); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .8rem; flex-shrink: 0; }
.sf-user { display: flex; align-items: center; gap: .55rem; padding: .25rem .5rem; border-radius: 10px; color: var(--sf-text); }
.sf-user:hover { background: #f1f4f2; }
.sf-user .meta { line-height: 1.15; }
.sf-user .meta small { color: var(--sf-muted); font-size: .7rem; }
.sf-content { padding: 1.25rem; flex: 1; }
.sf-footer { padding: .9rem 1.25rem; color: var(--sf-muted); font-size: .75rem; border-top: 1px solid var(--sf-border); background: #fff; }
.page-head { display: flex; align-items: flex-start; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.3rem; margin: 0; }
.page-head .sub { color: var(--sf-muted); font-size: .8rem; margin-top: .15rem; }
.page-head .actions { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: .75rem; margin-bottom: .2rem; }
.sf-backdrop { display: none; }
.notif-menu { width: 360px; max-width: 92vw; padding: 0; }
.notif-menu .notif-item { display: block; padding: .65rem .9rem; border-bottom: 1px solid #f0f3f1; color: var(--sf-text); white-space: normal; }
.notif-menu .notif-item.unread { background: #f5faf7; }
.notif-menu .notif-item small { color: var(--sf-muted); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--sf-border); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,40,30,.15); max-height: 420px; overflow: auto; display: none; z-index: 1050; }
.search-results a { display: block; padding: .55rem .85rem; color: var(--sf-text); border-bottom: 1px solid #f1f4f2; }
.search-results a:hover, .search-results a.active { background: #f4f8f6; }
.search-results .type { font-size: .68rem; color: var(--sf-muted); text-transform: uppercase; }

/* Components */
.stat-card { padding: 1rem; display: flex; gap: .85rem; align-items: center; height: 100%; }
.stat-card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; background: color-mix(in srgb, var(--c, #1f5c42) 13%, #fff); color: var(--c, #1f5c42); }
.stat-card .lbl { color: var(--sf-muted); font-size: .74rem; line-height: 1.2; }
.stat-card .val { font-size: 1.25rem; font-weight: 600; line-height: 1.25; word-break: break-word; }
.stat-card a.stretched-link:hover ~ * { color: inherit; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--sf-muted); }
.empty-state i { font-size: 2.2rem; color: #b9c9c0; margin-bottom: .6rem; display: block; }
.empty-state .title { font-weight: 600; color: #3f4d46; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem 1.25rem; }
.detail-grid .dl { font-size: .72rem; color: var(--sf-muted); text-transform: uppercase; letter-spacing: .02em; }
.detail-grid .dv { font-weight: 500; word-break: break-word; white-space: pre-line; }
.detail-grid .full { grid-column: 1 / -1; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: #e3e9e5; }
.timeline li { position: relative; padding: 0 0 1rem 2.1rem; }
.timeline li .tdot { position: absolute; left: 4px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--c, var(--sf-stone)); }
.timeline li .tt { font-weight: 600; font-size: .85rem; }
.timeline li .tm { font-size: .74rem; color: var(--sf-muted); }
.timeline li .tn { font-size: .8rem; background: #f6f8f7; border-radius: 8px; padding: .4rem .6rem; margin-top: .3rem; white-space: pre-line; }
.workflow-bar { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; }
.workflow-bar .step { flex: 1 0 auto; min-width: 92px; font-size: .66rem; text-align: center; padding: .45rem .3rem; border-radius: 6px; background: #eef2ef; color: #7b8a82; line-height: 1.2; }
.workflow-bar .step.done { background: var(--sf-stone-light); color: var(--sf-green); }
.workflow-bar .step.current { background: var(--sf-green); color: #fff; font-weight: 600; }
.dropzone { border: 2px dashed #c5d4cb; border-radius: 12px; padding: 1.2rem; text-align: center; color: var(--sf-muted); background: #fafcfb; cursor: pointer; transition: .15s; }
.dropzone.drag { border-color: var(--sf-green); background: #eef6f1; color: var(--sf-green); }
.dropzone i { font-size: 1.6rem; color: #9db5a7; }
.file-previews { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.file-previews .fp { width: 88px; font-size: .68rem; text-align: center; word-break: break-all; }
.file-previews .fp img, .file-previews .fp .fi { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; border: 1px solid var(--sf-border); display: grid; place-items: center; background: #f4f6f5; font-size: 1.4rem; color: #8aa597; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.att-card { border: 1px solid var(--sf-border); border-radius: 10px; overflow: hidden; background: #fff; font-size: .75rem; }
.att-card .thumb { height: 100px; background: #f2f5f3 center/cover no-repeat; display: grid; place-items: center; font-size: 2rem; color: #9db5a7; }
.att-card .meta { padding: .45rem .55rem; }
.att-card .meta .n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-slot { border: 1px dashed #cbd8d0; border-radius: 10px; padding: .6rem; background: #fbfcfb; height: 100%; }
.photo-slot.ok { border-style: solid; border-color: #9fc7ac; background: #f4faf6; }
.photo-slot .thumbs { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .4rem; }
.photo-slot .thumbs img { width: 56px; height: 44px; object-fit: cover; border-radius: 6px; }
.items-table input, .items-table select { min-width: 70px; font-size: .8rem; padding: .3rem .45rem; }
.items-table td { padding: .3rem !important; }
.items-table .col-del { width: 36px; }
.totals-box { max-width: 380px; margin-left: auto; }
.totals-box .row-t { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px dashed #e3e9e5; }
.totals-box .grand { font-weight: 700; font-size: 1.05rem; color: var(--sf-green); border-bottom: 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.filter-bar .fb-item { min-width: 150px; flex: 0 1 190px; }
.filter-bar .fb-search { flex: 1 1 220px; }
.filter-bar label { font-size: .7rem; color: var(--sf-muted); margin-bottom: .15rem; }
.kpi-mini { font-size: .72rem; color: var(--sf-muted); }
.cost-table input { text-align: right; }
.cost-table .grp-row td { background: #f3f7f5; font-weight: 600; color: var(--sf-green); font-size: .78rem; text-transform: uppercase; }
.gate-box { border-left: 4px solid var(--sf-gold); background: #fffaf0; border-radius: 8px; padding: .7rem .9rem; font-size: .82rem; }
.gate-box.ok { border-left-color: #3f8f5a; background: #f3faf5; }
.gate-box.no { border-left-color: #b83232; background: #fdf4f4; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--sf-border); border-left: 1px solid var(--sf-border); }
.calendar .cal-h { background: #f6f8f7; font-weight: 600; font-size: .72rem; padding: .4rem; text-align: center; border-right: 1px solid var(--sf-border); border-bottom: 1px solid var(--sf-border); }
.calendar .cal-d { min-height: 104px; border-right: 1px solid var(--sf-border); border-bottom: 1px solid var(--sf-border); padding: .3rem; font-size: .7rem; background: #fff; overflow: hidden; }
.calendar .cal-d.muted { background: #fafbfa; color: #b3bdb8; }
.calendar .cal-d.today { background: #f2f9f4; }
.calendar .cal-d .dn { font-weight: 600; margin-bottom: .2rem; }
.calendar .ev { display: block; border-radius: 4px; padding: 1px 4px; margin-bottom: 2px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .66rem; }
.ev-etd { background: #1f5c42; } .ev-eta { background: #2b6f8e; } .ev-cut { background: #c9851a; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--sf-green-dark), var(--sf-green-deep) 70%); color: #e5efe9; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: rgba(200, 164, 93, .12); }
.auth-side h2 { color: #fff; font-size: 1.9rem; }
.auth-form { display: grid; place-items: center; padding: 2rem; background: #fff; }
.auth-form .box { width: 100%; max-width: 380px; }
.chart-box { position: relative; min-height: 240px; }
.sfchart { width: 100%; font-family: inherit; }
.sfchart text { font-family: 'Poppins', system-ui, sans-serif; }
.sfchart-tip { position: absolute; pointer-events: none; background: rgba(20, 35, 28, .92); color: #fff; font-size: .72rem; padding: .35rem .55rem; border-radius: 6px; white-space: nowrap; z-index: 5; display: none; }
.sfchart-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .72rem; color: #4e5d55; margin-top: .4rem; justify-content: center; }
.sfchart-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.sfchart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.perm-table th, .perm-table td { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.select-search-wrap { position: relative; }
.date-wrap { position: relative; }
.date-wrap .date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #7d8f86; padding: .2rem .45rem; }
.date-wrap input.date-input { padding-right: 2rem; }
.date-wrap input[type=date].native-picker, .date-wrap input[type=datetime-local].native-picker { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; right: 0; bottom: 0; }
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }
.fw-600 { font-weight: 600; }
.small-xs { font-size: .72rem; }
.text-green { color: var(--sf-green) !important; }
.bg-beige { background: var(--sf-beige) !important; }
.border-dashed { border-style: dashed !important; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(244, 246, 245, .95); backdrop-filter: blur(4px); padding: .75rem 0; margin-top: 1rem; border-top: 1px solid var(--sf-border); z-index: 5; }

@media (max-width: 991.98px) {
  .sf-sidebar { transform: translateX(-100%); }
  body.sidebar-open .sf-sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.sidebar-open .sf-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 25, 18, .45); z-index: 1035; }
  .sf-main { margin-left: 0; }
  .sf-topbar { padding: 0 .75rem; }
  .sf-content { padding: .9rem; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 575.98px) {
  .page-head h1 { font-size: 1.1rem; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .sf-user .meta { display: none; }
  .stat-card .val { font-size: 1.05rem; }
  .card-header .actions { margin-left: 0; }
  .table-mobile-cards thead { display: none; }
  .table-mobile-cards tbody tr { display: block; border-bottom: 1px solid var(--sf-border); padding: .35rem 0; }
  .table-mobile-cards tbody td { display: flex; justify-content: space-between; gap: .75rem; border: 0 !important; padding: .25rem .8rem !important; text-align: right; }
  .table-mobile-cards tbody td::before { content: attr(data-label); font-weight: 500; color: var(--sf-muted); text-align: left; font-size: .72rem; }
  .table-mobile-cards tbody td.td-actions { justify-content: flex-end; }
  .table-mobile-cards tbody td.td-actions::before { content: none; }
}
@media print {
  .sf-sidebar, .sf-topbar, .sf-footer, .no-print, .page-head .actions, .btn, .pagination, .filter-bar { display: none !important; }
  .sf-main { margin: 0; }
  .sf-content { padding: 0; }
  body { background: #fff; font-size: 11px; }
  .card { border: 0; box-shadow: none; }
  .table thead th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; }
  @page { size: A4; margin: 12mm; @bottom-right { content: "Hal. " counter(page) " / " counter(pages); font-size: 9px; } }
}
