@import url('/kasra-theme.css');
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input{touch-action:manipulation}button,a{transition:background .16s,color .16s,border-color .16s}button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid transparent;border-radius:var(--radius-control);padding:8px 20px;background:var(--brand-primary);color:var(--surface);font-weight:500;font-size:14px}button:hover{background:var(--brand-dark)}button:disabled{opacity:.55;cursor:wait}button.secondary{background:var(--brand-soft);color:var(--brand-dark);border-color:var(--border)}button.quiet{background:transparent;color:var(--text-secondary)}button.quiet:hover{background:var(--surface-muted)}a{color:var(--brand-dark)}h1,h2,h3,p{margin:0}h1{font-size:24px;font-weight:600;line-height:1.6}h2{font-size:18px;font-weight:600}h3{font-size:16px;font-weight:600}small,.small{font-size:12px}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.muted{color:var(--text-secondary)}.skip{position:fixed;top:-80px;padding:12px;background:var(--surface);z-index:100}.skip:focus{top:8px;right:8px}.loading{padding:80px;text-align:center}
.brand{display:flex;align-items:center;gap:12px;font-size:16px;font-weight:700;color:var(--brand-dark);line-height:1.6}.brand img{object-fit:contain;width:56px;height:40px}.brand small{display:block;font-size:12px;font-weight:400;color:var(--text-secondary)}
.login{min-height:100vh;min-height:100dvh;padding:24px 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px}.login-identity{text-align:center}.login-identity .brand{flex-direction:column;gap:8px;font-size:26px;font-weight:800}.login-identity .brand img{width:100px;height:44px}.login-identity .brand small{font-size:13px}.login-identity>p{font-size:14px;color:var(--brand-dark);margin-top:12px}.login-form{width:100%;max-width:420px;padding:28px 32px;background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow-soft)}.login-form h1,.login-form h2{text-align:center;margin-bottom:8px}.login-form .muted{text-align:center;margin-bottom:20px}.login-form button[type=submit]{width:100%;margin-top:4px}.field{display:block;font-size:13px;font-weight:500;margin-top:16px}input[type=text],input[type=password],input[type=email]{width:100%;min-width:0;border:1px solid var(--input);border-radius:8px;padding:10px 12px;min-height:44px;color:var(--text-primary);background:var(--surface);margin-top:6px}input:focus{border-color:var(--brand-primary)}.password-wrap{position:relative}.password-wrap input{padding-inline-start:48px}.password-wrap button{position:absolute;left:2px;bottom:1px;width:42px;min-height:42px;padding:8px}.error{color:var(--danger);font-size:12px;min-height:20px;margin-top:8px}.hint{font-size:12px;color:var(--text-secondary);margin-top:12px}.secure-note{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--brand-dark);font-size:12px;margin-top:20px}.login-note{padding:12px 16px;background:var(--surface-muted);border-radius:8px;font-size:12px;color:var(--text-secondary);text-align:center;margin-top:16px}.login-footer{font-size:12px;color:var(--text-secondary)}.eyebrow{font-size:12px;color:var(--brand-dark);font-weight:500;margin-bottom:4px}
.topbar{height:76px;margin-inline-start:232px;display:flex;align-items:center;justify-content:space-between;gap:24px;background:var(--surface);border-bottom:1px solid var(--border);padding:12px 32px}.product-title{font-size:14px;font-weight:500}.account{display:flex;align-items:center;gap:12px}.avatar{display:grid;place-items:center;width:36px;height:36px;background:var(--brand-soft);color:var(--brand-dark);border-radius:50%;font-weight:600}.account-name{font-size:13px;font-weight:500;max-width:200px;overflow-wrap:anywhere}.account-name small{display:block;color:var(--text-secondary);font-weight:400}.account button{padding:8px 12px}.layout{min-height:calc(100dvh - 76px);margin-inline-start:232px}.sidebar{position:fixed;inset-block:0;inset-inline-start:0;width:232px;border-inline-end:1px solid var(--border);background:var(--surface);padding:24px 16px;display:flex;flex-direction:column;gap:32px}.sidebar .brand{font-size:15px;padding:0 4px 20px;border-bottom:1px solid var(--border)}.sidebar .brand img{width:48px}.sidebar nav{display:grid;gap:8px}.nav-item{display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 12px;color:var(--text-secondary);border-radius:8px;font-size:13px;text-decoration:none}.nav-item.active{background:var(--brand-soft);color:var(--brand-dark);font-weight:600}.nav-item:hover{background:var(--surface-muted)}.sidebar-note{margin-top:auto;border-top:1px solid var(--border);padding:16px 8px 0;font-size:12px;color:var(--text-secondary)}.content{width:100%;min-width:0;max-width:1440px;margin:0 auto;padding:32px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}.page-head p{color:var(--text-secondary);font-size:14px;margin-top:4px}.page-head .eyebrow{color:var(--brand-dark);font-size:12px}.page-head>.date{display:none}.date{color:var(--text-secondary);font-size:12px;white-space:nowrap;unicode-bidi:isolate}.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:32px}.summary{padding:16px 20px;border:1px solid var(--border);border-radius:12px;background:var(--surface);display:flex;align-items:center;justify-content:space-between;gap:12px}.summary span{color:var(--text-secondary);font-size:13px}.summary strong{font-size:24px;font-weight:600;color:var(--brand-dark)}.summary strong.summary-role{font-size:14px}.section-label{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;font-size:13px}.section-label strong{font-weight:600}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.module-card{padding:24px;background:var(--surface);border:1px solid var(--border);border-radius:12px}.module-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.module-icon{width:44px;height:44px;border-radius:10px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand-dark)}.module-icon svg{width:24px;height:24px}.module-card h2{font-size:16px}.module-card p{color:var(--text-secondary);font-size:13px;margin:8px 0 24px}.module-card a{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;border-top:1px solid var(--border);padding-top:12px;text-decoration:none;font-size:13px;font-weight:500}.module-card a:hover{color:var(--brand-primary)}.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:6px;font-size:12px;font-weight:500;white-space:nowrap;background:var(--brand-soft);color:var(--brand-dark)}.module-card .badge,.badge.success{background:var(--success-soft);color:var(--success)}.badge.warn,.module-card .badge.warn{background:var(--warning-soft);color:var(--warning)}.badge.inactive{background:var(--surface-muted);color:var(--text-secondary)}.notice{display:flex;align-items:flex-start;gap:12px;margin-top:24px;padding:16px 20px;border-radius:10px;background:var(--surface-muted);font-size:13px;color:var(--text-secondary)}.notice svg{color:var(--brand-dark);margin-top:2px}.empty{padding:40px 24px;text-align:center;background:var(--surface);border:1px dashed var(--input);border-radius:12px}.empty p{margin-top:8px;color:var(--text-secondary)}.panel{padding:24px;background:var(--surface);border:1px solid var(--border);border-radius:12px}.table-wrap{width:100%;max-width:100%;overflow:auto;border:1px solid var(--border);border-radius:12px;background:var(--surface)}table{width:100%;border-collapse:collapse;text-align:right;font-size:13px;white-space:nowrap}th{background:var(--surface-muted);color:var(--text-secondary);font-weight:500}td,th{padding:12px 16px;border-bottom:1px solid var(--border)}tr:last-child td{border:0}tbody tr:hover{background:var(--surface-muted)}.tags{display:flex;gap:4px;flex-wrap:wrap;max-width:360px}.user-name strong,.user-name small{display:block}.user-name strong{font-weight:500}.user-name small{color:var(--text-secondary)}.date-cell{font-size:12px;font-variant-numeric:tabular-nums;unicode-bidi:isolate}.search-row{margin-bottom:16px}.search-row input{max-width:360px;margin:0}.password-panel{max-width:480px}.password-panel button{margin-top:20px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.check{display:flex;align-items:center;gap:12px;min-height:44px;font-size:13px}.check input{width:18px;height:18px;accent-color:var(--brand-primary)}fieldset{border:1px solid var(--border);border-radius:10px;margin:24px 0 16px;padding:12px 16px}legend{font-size:13px;padding:0 8px}.grant{padding:4px 0}.grant input[type=email]{margin:4px 0 12px;font-size:13px}.grant .hint{margin:0 28px 8px}.actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.actions button{min-width:100px}dialog{border:1px solid var(--border);border-radius:16px;padding:24px;width:min(600px,calc(100% - 32px));max-height:90vh;max-height:90dvh;color:var(--text-primary);background:var(--surface);box-shadow:var(--shadow-dialog)}dialog::backdrop{background:#1F244055}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-head h2{font-size:18px}#toast{position:fixed;bottom:24px;left:24px;max-width:calc(100vw - 48px);padding:12px 20px;background:var(--text-primary);color:var(--surface);border-radius:10px;z-index:60;box-shadow:var(--shadow-soft);font-size:13px}#toast:empty{display:none}
@media(max-width:1100px){.topbar .date{display:none}.summary{flex-direction:column;align-items:flex-start;gap:8px}.content{padding:24px}.topbar{padding-inline:24px}}
@media(max-width:760px){.topbar{margin:0;height:auto;min-height:64px;padding:12px 16px;gap:12px}.topbar .product-title{font-size:12px}.account{gap:4px}.account-name{font-size:12px;max-width:124px}.avatar,.account-name small{display:none}.layout{margin:0;min-height:0}.sidebar{position:static;width:auto;padding:12px 16px;gap:12px;border-inline-end:0;border-bottom:1px solid var(--border)}.sidebar .brand{font-size:14px;padding:0;border:0}.sidebar .brand img{width:40px;height:28px}.sidebar .brand small{font-size:11px}.sidebar nav{display:flex;overflow:auto;gap:8px;padding-bottom:4px}.nav-item{white-space:nowrap;flex-shrink:0;padding:8px 12px;gap:8px;font-size:12px}.nav-item svg{width:18px}.sidebar-note{display:none}.content{padding:24px 16px}.page-head{gap:12px;align-items:flex-start}.page-head p{font-size:13px}.page-head h1{font-size:22px}.page-head button{padding:8px 12px;font-size:12px;white-space:nowrap}.summary-grid{gap:8px;margin-bottom:24px;grid-template-columns:1fr 1fr}.summary{padding:12px}.summary:last-child{grid-column:1/-1;flex-direction:row;align-items:center}.summary strong{font-size:22px}.cards{grid-template-columns:1fr;gap:16px}.module-card{padding:20px}.notice{padding:16px;font-size:12px}.form-grid{grid-template-columns:1fr}dialog{padding:20px}.login{gap:16px}.login-form{padding:24px}.login-identity .brand{font-size:24px}.login-identity .brand img{width:88px;height:40px}.login-footer{font-size:11px}}
@media(max-height:760px){.login{padding-block:16px;gap:12px}.login-identity .brand{font-size:22px;gap:4px}.login-identity .brand img{width:80px;height:36px}.login-identity>p{margin-top:8px}.login-form{padding-block:20px}.login-form .muted{margin-bottom:12px}.login-form .field{margin-top:12px}.secure-note{margin-top:12px}.login-note{margin-top:12px;padding:8px 12px}.login-footer{display:none}}

@media(max-width:760px){.sidebar nav{display:grid;grid-template-columns:1fr 1fr;overflow:visible}.nav-item{font-size:12px;padding:8px}.nav-item svg{width:16px}}

.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:20px}.tile{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:var(--surface);border:1px solid var(--border);border-radius:16px;text-decoration:none;font-size:17px;font-weight:600;color:var(--brand-dark)}.tile:hover{border-color:var(--brand-primary)}.tile .module-icon{width:72px;height:72px;border-radius:16px}.tile .module-icon svg{width:40px;height:40px}@media(max-width:760px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
.topbar .date{direction:rtl}
.brand>div{text-align:center}.sidebar .brand{flex-direction:column;align-items:center;gap:8px}.sidebar .brand img{width:auto;height:36px;transform:translateX(6px)}
@media(max-width:760px){.sidebar .brand{flex-direction:row}.sidebar .brand img{width:auto;height:22px}}
.tile .tile-note{margin-top:-10px;font-size:12px;font-weight:400;color:var(--text-secondary)}

/* Home redesign (2026-11-29): all five sections on one screen, no scrolling. */
.home{display:flex;flex-direction:column;gap:24px;min-height:calc(100dvh - 76px - 64px)}.home-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}.home-head h1{font-size:22px}.home-head .eyebrow{font-size:12px;color:var(--text-secondary)}
.tiles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;flex:1;align-content:start}.tiles[data-count="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}.tiles[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.tile{--accent:var(--brand-primary);aspect-ratio:auto;min-height:240px;position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:10px;padding:24px 20px 20px;border-radius:16px;border:1px solid var(--border);border-top:4px solid var(--accent);background:var(--surface);color:var(--text-primary);text-decoration:none;font-size:inherit;transition:transform .16s,box-shadow .16s,border-color .16s}
.tile:hover,.tile:focus-visible{transform:translateY(-3px);box-shadow:var(--shadow-soft);border-color:var(--accent)}.tile .module-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:14px;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent)}.tile .module-icon svg{width:30px;height:30px}
.tile-title{font-size:17px;font-weight:700;color:var(--text-primary);margin-top:6px}.tile-blurb{font-size:13px;color:var(--text-secondary);line-height:1.7}.tile .tile-note{margin:0;font-size:11px;color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent);padding:2px 8px;border-radius:999px}
.tile-go{margin-top:auto;display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--accent)}.tile-go svg{width:16px;height:16px}
.tile-erp{--accent:#1f5f8b}.tile-warehouse{--accent:#16766b}.tile-bank{--accent:#2f6f9f}.tile-orders{--accent:#a5681f}.tile-letters{--accent:#6a4fa0}
@media(max-width:1100px){.tiles,.tiles[data-count]{grid-template-columns:repeat(3,minmax(0,1fr))}.tile{min-height:200px}}
@media(max-width:760px){.home{min-height:0;gap:16px}.home-head h1{font-size:19px}.home-head .date{display:none}.tiles,.tiles[data-count]{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tile{min-height:0;padding:14px 12px;gap:6px;border-top-width:3px}.tile .module-icon{width:40px;height:40px;border-radius:10px}.tile .module-icon svg{width:22px;height:22px}.tile-title{font-size:15px;margin:0}.tile-blurb{font-size:11.5px;line-height:1.6}.tile-go{display:none}.tile-erp{grid-column:1/-1;flex-direction:row;flex-wrap:wrap;align-items:center}.tile-erp .tile-blurb{flex-basis:100%}}
.home-head .date{display:none}@media(max-width:1100px) and (min-width:761px){.home-head .date{display:inline}}
