:root { color-scheme: light; --blue:#2855d9; --blue-dark:#173891; --navy:#172447; --text:#18243a; --muted:#6f7d92; --line:#e1e7f0; --bg:#f4f7fb; --green:#168653; --orange:#b76a0c; --red:#c33b46; font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
.hidden { display:none !important; }
.eyebrow { display:block; margin-bottom:10px; color:rgba(255,255,255,.68); font-size:12px; font-weight:800; letter-spacing:.16em; }
.eyebrow.blue { color:var(--blue); }
.brand { display:flex; align-items:center; gap:14px; }
.brand > span { display:flex; align-items:center; justify-content:center; width:54px; height:54px; border-radius:16px; background:#fff; color:var(--blue); font-size:18px; font-weight:900; box-shadow:0 12px 30px rgba(8,24,74,.16); }
.brand strong,.brand small { display:block; }
.brand strong { font-size:19px; }
.brand small { margin-top:4px; color:rgba(255,255,255,.62); font-size:12px; }
.brand.compact > span { width:44px; height:44px; border-radius:13px; background:var(--blue); color:#fff; box-shadow:none; }
.brand.compact strong { color:var(--navy); font-size:16px; }
.brand.compact small { color:var(--muted); }

.login-screen { min-height:100vh; display:grid; grid-template-columns:minmax(420px,1.05fr) minmax(420px,.95fr); }
.login-visual { position:relative; isolation:isolate; display:flex; flex-direction:column; padding:58px clamp(48px,7vw,110px); overflow:hidden; background:radial-gradient(circle at 80% 16%,rgba(100,144,255,.5),transparent 29%),linear-gradient(145deg,#102662,#2855d9 64%,#3d6cf0); color:#fff; }
.login-visual::before { content:""; position:absolute; z-index:-1; inset:0; opacity:.3; background-image:linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px); background-size:52px 52px; mask-image:linear-gradient(to bottom,transparent,#000 20%,#000 82%,transparent); }
.login-visual::after { content:""; position:absolute; z-index:-1; right:-160px; bottom:-210px; width:490px; height:490px; border:1px solid rgba(255,255,255,.13); border-radius:50%; box-shadow:0 0 0 72px rgba(255,255,255,.025),0 0 0 145px rgba(255,255,255,.018); }
.login-copy { margin:auto 0; max-width:650px; }
.login-copy h1 { margin:0; font-size:clamp(42px,5vw,70px); line-height:1.12; letter-spacing:-.04em; }
.login-copy p { max-width:570px; margin:26px 0 0; color:rgba(255,255,255,.76); font-size:17px; line-height:1.85; }
.feature-list { display:flex; flex-wrap:wrap; gap:10px; }
.feature-list span { padding:9px 13px; border:1px solid rgba(255,255,255,.2); border-radius:999px; background:rgba(255,255,255,.08); color:rgba(255,255,255,.82); font-size:12px; }
.login-panel { display:flex; align-items:center; justify-content:center; padding:46px; background:#f7f9fc; }
.login-card { width:min(430px,100%); padding:42px; border:1px solid var(--line); border-radius:26px; background:#fff; box-shadow:0 26px 70px rgba(33,51,86,.12); }
.secure-badge { display:inline-flex; align-items:center; gap:6px; float:right; padding:7px 10px; border-radius:999px; background:#edf8f3; color:#187650; font-size:11px; font-weight:800; }
.secure-badge span,.login-security-note span { font-weight:900; }
.login-card h2 { margin:0; font-size:34px; }
.login-card > p { margin:10px 0 30px; color:var(--muted); line-height:1.6; }
label { display:block; color:#44526a; font-size:13px; font-weight:650; }
input,select,textarea { width:100%; margin-top:8px; padding:12px 14px; border:1px solid #cbd5e4; border-radius:11px; outline:none; background:#fff; color:var(--text); transition:.18s; }
input:focus,select:focus,textarea:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(40,85,217,.12); }
.login-card label + label { margin-top:18px; }
.button { min-height:44px; padding:0 20px; border:1px solid transparent; border-radius:11px; font-weight:750; }
.button.primary { background:var(--blue); color:#fff; box-shadow:0 8px 20px rgba(40,85,217,.2); }
.button.primary:hover { background:#2149c0; }
.button.secondary { border-color:#cdd6e5; background:#fff; color:#42516a; }
.button:disabled { cursor:not-allowed; opacity:.55; }
.login-card .button { width:100%; margin-top:26px; }
.form-error { min-height:20px; margin-top:14px; color:var(--red); font-size:13px; line-height:1.5; }
.login-security-note { display:flex; align-items:flex-start; justify-content:center; gap:7px; margin-top:3px; color:#8995a7; font-size:11px; line-height:1.55; text-align:center; }
.login-security-note span { color:var(--green); }

.portal { min-height:100vh; }
.topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; height:72px; padding:0 32px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.94); backdrop-filter:blur(16px); }
.topbar-actions { display:flex; align-items:center; gap:16px; font-size:14px; }
.text-button,.link-button { padding:0; border:0; background:transparent; color:var(--blue); font-weight:700; }
.portal-layout { display:grid; grid-template-columns:250px minmax(0,1fr); min-height:calc(100vh - 72px); }
.sidebar { position:sticky; top:72px; align-self:start; height:calc(100vh - 72px); padding:28px 20px; overflow-y:auto; border-right:1px solid var(--line); background:#fff; }
.project-picker-label { margin-bottom:7px; color:#8894a5; font-size:11px; letter-spacing:.08em; }
.project-select { margin:0; font-weight:700; }
.sidebar nav { display:grid; gap:8px; margin-top:28px; }
.nav-button { padding:13px 14px; border:0; border-radius:12px; background:transparent; color:#44516a; text-align:left; }
.nav-button span,.nav-button small { display:block; }
.nav-button span { font-weight:750; }
.nav-button small { margin-top:4px; color:#929daf; font-size:11px; }
.nav-button:hover,.nav-button.active { background:#edf2ff; color:var(--blue); }
.nav-button.active small { color:#6780ce; }
.sidebar-help { margin-top:24px; padding:16px; border-radius:14px; background:#f3f6fb; }
.sidebar-help strong { font-size:13px; }
.sidebar-help p { margin:7px 0 0; color:var(--muted); font-size:11px; line-height:1.6; }
.content { min-width:0; padding:34px clamp(24px,4vw,58px) 70px; }
.view-section { max-width:1500px; margin:0 auto; }
.page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:24px; }
.page-heading h1 { margin:0; font-size:31px; letter-spacing:-.02em; }
.page-heading p { margin:8px 0 0; color:var(--muted); }
.compact-button { min-width:118px; }
.heading-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
.stats-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.stat-card { padding:22px; border:1px solid var(--line); border-radius:17px; background:#fff; box-shadow:0 5px 18px rgba(31,48,84,.04); }
.stat-card span { display:block; color:var(--muted); font-size:12px; }
.stat-card strong { display:inline-block; margin-top:10px; font-size:29px; }
.stat-card small { margin-left:5px; color:#8a96a7; }
.content-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(310px,.75fr); gap:18px; margin-bottom:18px; }
.activity-preview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.panel { margin-bottom:18px; padding:22px; border:1px solid var(--line); border-radius:17px; background:#fff; box-shadow:0 5px 18px rgba(31,48,84,.04); }
.content-grid .panel { margin-bottom:0; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:18px; }
.panel-heading h2 { margin:0; font-size:17px; }
.panel-heading p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.table-wrap { width:100%; overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th { padding:11px 12px; border-bottom:1px solid var(--line); background:#f7f9fc; color:#718096; font-size:11px; text-align:left; white-space:nowrap; }
td { padding:13px 12px; border-bottom:1px solid #edf0f5; vertical-align:middle; }
tbody tr:last-child td { border-bottom:0; }
tfoot td { padding:14px 12px; border-top:2px solid #d9e1ee; background:#f4f7fb; }
.number { text-align:right; font-variant-numeric:tabular-nums; }
.empty { padding:34px 12px; color:#929daf; text-align:center; }
.status { display:inline-flex; padding:5px 9px; border-radius:999px; background:#eef2f7; color:#627087; font-size:11px; font-weight:750; white-space:nowrap; }
.status.pending { background:#fff2d9; color:#9b640d; }
.status.approved,.status.partial { background:#e9f0ff; color:#3458bd; }
.status.done { background:#e7f7ee; color:#17784b; }
.status.rejected,.status.cancelled { background:#fdebed; color:#b6414c; }
.order-card { padding:13px 0; border-bottom:1px solid #edf0f5; }
.order-card:last-child { border:0; }
.order-card-top { display:flex; justify-content:space-between; gap:10px; }
.order-card strong { font-size:13px; }
.order-card p { margin:7px 0 0; color:var(--muted); font-size:12px; }
.activity-summary { max-height:560px; border:1px solid #edf0f5; border-radius:12px; }
.activity-summary thead { position:sticky; top:0; z-index:2; }
.summary-table td:first-child { min-width:130px; }
.summary-table td:nth-child(2) { min-width:100px; color:var(--blue); }
.metric-cell strong,.metric-cell small { display:block; white-space:nowrap; }
.metric-cell small { margin-top:4px; color:#8a96a7; font-size:10px; }
.current-metric strong { color:var(--blue-dark); }
.activity-kind { padding:4px 8px; border-radius:999px; font-size:10px; font-weight:800; }
.activity-kind.rental { background:#e9f0ff; color:#3458bd; }
.activity-kind.return { background:#e7f7ee; color:#17784b; }
.detail-button { display:grid; min-width:108px; padding:8px 12px; border:1px solid #c7d3f3; border-radius:10px; background:#f5f7ff; color:var(--blue); text-align:left; transition:.18s; }
.detail-button:hover { border-color:#92a8e8; background:#eaf0ff; transform:translateY(-1px); box-shadow:0 5px 14px rgba(40,85,217,.1); }
.detail-button span { font-size:12px; font-weight:800; }
.detail-button small { margin-top:2px; color:#7889bd; font-size:10px; }
.detail-button.return { border-color:#badfce; background:#f2fbf6; color:var(--green); }
.detail-button.return:hover { border-color:#83c6a6; background:#e7f7ee; box-shadow:0 5px 14px rgba(22,134,83,.1); }
.detail-button.return small { color:#6e9f88; }
#rentals-table table { min-width:1120px; }
#returns-table table { min-width:1240px; }

.form-panel { padding:24px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.form-grid label.full { grid-column:1/-1; }
.material-summary { position:sticky; top:88px; z-index:10; display:grid; grid-template-columns:repeat(3,1fr); width:min(640px,100%); margin:0 auto 18px; padding:16px; border-radius:16px; background:var(--navy); color:#fff; box-shadow:0 10px 30px rgba(23,36,71,.18); }
.material-summary > div { text-align:center; }
.material-summary > div + div { border-left:1px solid rgba(255,255,255,.14); }
.material-summary span { display:block; color:rgba(255,255,255,.65); font-size:11px; }
.material-summary strong { display:inline-block; margin-top:5px; font-size:23px; }
.material-summary small { margin-left:4px; color:rgba(255,255,255,.6); }
.material-heading { align-items:flex-end; }
.search-input { width:min(330px,100%); margin:0; }
.materials-table .material-name { min-width:170px; }
.materials-table .material-name strong,.materials-table .material-name span { display:block; }
.materials-table .material-name span { margin-top:4px; color:var(--blue); font-size:11px; }
.stock-available { color:var(--green); font-weight:700; }
.stock-empty { color:#929aa6; font-weight:750; }
.out-row { background:#f7f8fa; color:#8e97a4; }
.quantity-cell { min-width:176px; }
.quantity-control { display:flex; align-items:center; gap:8px; }
.quantity-control button { flex:0 0 34px; height:34px; padding:0; border:1px solid #cbd5e4; border-radius:8px; background:#fff; color:var(--blue); font-weight:800; }
.quantity-control input { width:86px; height:34px; margin:0; padding:5px 8px; text-align:center; }
.locked-input { display:flex; align-items:center; justify-content:center; width:154px; height:34px; border:1px solid #d9dee6; border-radius:8px; background:#e9ecf0; color:#8a94a2; font-size:12px; font-weight:750; }
.form-actions { display:flex; justify-content:flex-end; gap:12px; }
.action-buttons { display:flex; flex-wrap:wrap; gap:6px; }
.mini-button { padding:6px 9px; border:1px solid #ccd6e5; border-radius:8px; background:#fff; color:#43516a; font-size:11px; font-weight:700; }
.mini-button.primary { border-color:#b9c8f4; background:#eef2ff; color:var(--blue); }
.mini-button.danger { border-color:#f0c8cc; color:var(--red); }

.shipment-card { overflow:hidden; }
.shipment-heading { align-items:flex-start; }
.shipment-kicker { display:block; margin-bottom:5px; color:var(--blue); font-size:10px; font-weight:800; letter-spacing:.12em; }
.shipment-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.shipment-summary > div { display:flex; align-items:baseline; gap:7px; padding:13px 15px; border:1px solid #dfe6f2; border-radius:12px; background:#f8faff; }
.shipment-summary strong { color:#17233c; font-size:20px; }
.shipment-summary span { color:var(--muted); font-size:11px; }
.shipment-table { min-width:780px; }
.shipment-model { display:block; margin-top:4px; color:var(--muted); }
.shipment-sources { max-width:220px; }
.shipment-sources strong,.shipment-sources small { display:block; }
.shipment-sources small { margin-top:4px; overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.shipment-quantity { min-width:150px; }
.shipment-quantity input { display:inline-block; width:92px; margin:0; padding:8px 10px; text-align:right; }
.shipment-quantity small { display:block; margin-top:5px; color:var(--muted); font-size:10px; }
.shipment-actions { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:18px -22px -22px; padding:16px 22px; border-top:1px solid var(--line); background:#f8faff; color:var(--muted); font-size:12px; }
.shipment-actions > span strong { color:var(--blue); font-size:16px; }
.shipment-actions > div { display:flex; gap:10px; }
.shipment-actions .button { min-height:40px; }

.modal-open { overflow:hidden; }
.modal-backdrop { position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center; padding:30px; background:rgba(13,22,43,.58); backdrop-filter:blur(5px); }
.modal-card { width:min(1060px,100%); max-height:90vh; padding:26px; overflow:auto; border:1px solid rgba(255,255,255,.7); border-radius:22px; background:#fff; box-shadow:0 32px 90px rgba(8,18,40,.34); }
.modal-heading { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:18px; }
.modal-heading h2 { margin:0; }
.modal-close { width:36px; height:36px; border:0; border-radius:10px; background:#eef1f5; color:#59677c; font-size:25px; line-height:1; }
.detail-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:18px; }
.detail-grid div { padding:13px; border-radius:11px; background:#f6f8fb; }
.detail-grid span,.detail-grid strong { display:block; }
.detail-grid span { color:var(--muted); font-size:11px; }
.detail-grid strong { margin-top:5px; font-size:13px; }
.activity-detail-card { display:grid; grid-template-columns:minmax(210px,.75fr) minmax(380px,1.25fr); gap:20px; margin-bottom:18px; padding:22px; overflow:hidden; border:1px solid #dce4f7; border-radius:17px; background:linear-gradient(135deg,#f7f9ff,#eef3ff); }
.activity-detail-card.return { border-color:#d7ecdf; background:linear-gradient(135deg,#f7fcf9,#edf9f2); }
.activity-detail-primary { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; }
.activity-detail-primary p { margin:15px 0 5px; color:var(--muted); font-size:11px; }
.activity-detail-primary > strong { font-size:21px; }
.activity-detail-primary > small { margin-top:7px; color:#8793a5; font-size:10px; }
.activity-detail-totals { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); align-items:stretch; gap:10px; }
.detail-total { display:flex; flex-direction:column; justify-content:center; min-height:92px; padding:16px; border:1px solid rgba(196,208,236,.8); border-radius:13px; background:rgba(255,255,255,.82); }
.activity-detail-card.return .detail-total { border-color:rgba(187,222,204,.85); }
.detail-total span { color:var(--muted); font-size:10px; }
.detail-total strong { margin-top:8px; color:var(--navy); font-size:18px; white-space:nowrap; }
.detail-total.warning strong { color:var(--red); }
.activity-meta { grid-template-columns:repeat(3,minmax(0,1fr)); }
.detail-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:25px 0 12px; }
.detail-section-heading h3 { margin:0; font-size:17px; }
.detail-section-heading p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.detail-section-heading > span { color:var(--blue); font-size:13px; font-weight:800; }
.activity-detail-table { max-height:390px; border:1px solid var(--line); border-radius:13px; }
.activity-detail-table table { min-width:720px; }
.activity-detail-table thead { position:sticky; top:0; z-index:1; }
.activity-detail-table td { padding-top:14px; padding-bottom:14px; }
.material-code-chip { display:inline-flex; padding:5px 8px; border-radius:7px; background:#eef2ff; color:var(--blue); font-size:11px; font-weight:750; }
.damage-value { color:var(--red); font-weight:800; }
.detail-remark { margin-top:16px; padding:15px 17px; border-left:3px solid var(--blue); border-radius:0 11px 11px 0; background:#f6f8fc; }
.detail-remark span { color:var(--muted); font-size:10px; }
.detail-remark p { margin:5px 0 0; line-height:1.65; }
.toast { position:fixed; right:28px; bottom:28px; z-index:80; max-width:380px; padding:13px 17px; border-radius:11px; background:#172447; color:#fff; box-shadow:0 14px 36px rgba(15,27,57,.25); font-size:13px; }

@media (max-width:1050px) {
  .stats-grid { grid-template-columns:repeat(3,1fr); }
  .content-grid { grid-template-columns:1fr; }
  .content-grid .panel { margin-bottom:18px; }
}
@media (max-width:820px) {
  .login-screen { grid-template-columns:1fr; }
  .login-visual { min-height:340px; padding:34px 28px; }
  .login-copy { margin:48px 0; }
  .login-copy h1 { font-size:40px; }
  .login-panel { padding:28px 18px 50px; }
  .portal-layout { display:block; }
  .sidebar { position:static; width:auto; height:auto; padding:16px; border-right:0; border-bottom:1px solid var(--line); }
  .sidebar nav { display:flex; margin-top:14px; overflow:auto; }
  .nav-button { flex:1 0 120px; text-align:center; }
  .sidebar-help { display:none; }
  .content { padding:24px 16px 60px; }
  .topbar { height:64px; padding:0 16px; }
  .topbar .brand small { display:none; }
  .page-heading { align-items:flex-start; }
  .heading-actions { justify-content:flex-start; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid label.full { grid-column:auto; }
  .detail-grid { grid-template-columns:repeat(2,1fr); }
  .activity-detail-card { grid-template-columns:1fr; }
  .shipment-actions { align-items:stretch; flex-direction:column; }
  .shipment-actions > div { justify-content:flex-end; }
}
@media (max-width:540px) {
  .login-visual { min-height:300px; }
  .login-copy p,.feature-list { display:none; }
  .login-card { padding:28px 22px; }
  .stats-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .stat-card { padding:17px; }
  .page-heading h1 { font-size:25px; }
  .compact-button { min-width:auto; padding:0 13px; }
  .material-summary { top:76px; }
  .material-summary strong { font-size:19px; }
  .material-heading { display:block; }
  .search-input { margin-top:14px; }
  .form-actions { display:grid; grid-template-columns:1fr 1fr; }
  .form-actions .button { padding:0 10px; }
  .modal-backdrop { padding:12px; }
  .modal-card { padding:20px 16px; border-radius:17px; }
  .detail-grid { grid-template-columns:1fr 1fr; }
  .activity-detail-totals { grid-template-columns:1fr 1fr; }
  .activity-detail-totals .warning { grid-column:1/-1; min-height:68px; }
  .shipment-actions > div { display:grid; grid-template-columns:1fr 1fr; }
  .shipment-summary { grid-template-columns:1fr; gap:8px; }
  .shipment-summary > div { justify-content:space-between; padding:10px 13px; }
}

.icp-footer {
    margin-top: 6px;
    text-align: center;
    font-size: 11px;
}
.icp-footer a {
    color: #718096;
    text-decoration: none;
}
.icp-footer a:hover {
    color: #3159d9;
    text-decoration: underline;
}
