/* M.A Adami unified UI v30 */
:root{--primary:#2563eb;--primary-hover:#1d4ed8;--primary-soft:#edf4ff;--navy:#0a223e;--bg:#f4f7fb;--surface:#fff;--border:#dce4ee;--field-border:#aebccc;--text:#10233f;--text-secondary:#40516a;--text-muted:#718096;--success:#087f5b;--warning:#b96708;--danger:#d63b46;--shadow-sm:0 1px 2px rgba(15,31,54,.04),0 7px 20px rgba(15,31,54,.045);--shadow:0 16px 38px rgba(15,31,54,.1);--r-lg:16px;--r-md:11px}
[data-theme="dark"]{color-scheme:dark;--bg:#071321;--surface:#0e2034;--border:#29415b;--field-border:#3a5570;--text:#edf5ff;--text-secondary:#c2d1e2;--text-muted:#8fa5bc;--primary-soft:#132f55;--shadow-sm:0 1px 2px rgba(0,0,0,.28),0 8px 24px rgba(0,0,0,.18);--shadow:0 18px 42px rgba(0,0,0,.32)}
*{box-sizing:border-box}body{background:var(--bg);color:var(--text);letter-spacing:-.006em}button,a,input,select,textarea{transition:.16s ease}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(37,99,235,.2);outline-offset:2px}
.sidebar{width:252px;background:linear-gradient(180deg,#0a223e,#081c33);border-right:1px solid rgba(255,255,255,.06)}.brand{min-height:82px;padding:18px;gap:12px}.brand-logo{width:46px;height:36px;object-fit:contain;border-radius:3px;box-shadow:0 3px 12px rgba(0,0,0,.18)}.brand-text strong,.brand>div>strong{font-size:.9rem}.brand-text small,.brand>div>small{color:rgba(255,255,255,.44);font-size:.65rem;margin-top:2px}
.sidebar nav{padding:20px 12px}.nav-label{display:block;padding:0 12px 9px;color:rgba(255,255,255,.32);font-size:.61rem;font-weight:700;text-transform:uppercase;letter-spacing:.13em}.sidebar nav button{position:relative;min-height:44px;margin:2px 0;padding:10px 12px;border-radius:10px;color:rgba(235,242,251,.68);font-size:.82rem;font-weight:600;gap:11px}.sidebar nav button svg{display:block;width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}.sidebar nav button:hover{background:rgba(255,255,255,.07);color:#fff;transform:translateX(2px)}.sidebar nav button.active{background:linear-gradient(135deg,#3170f2,#245ed7);color:#fff;box-shadow:0 7px 18px rgba(23,80,201,.28)}.sidebar nav button.active:before{content:"";position:absolute;left:-12px;width:3px;height:20px;background:#9bbdff;border-radius:0 3px 3px 0}.nav-text{font:inherit;color:inherit;white-space:nowrap}
.sidebar-footer{min-height:74px;padding:13px 15px;border-top-color:rgba(255,255,255,.08)}.sidebar-footer>div{flex:1;min-width:0}.sidebar-footer strong,.sidebar-footer small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar{width:38px;height:38px;background:linear-gradient(145deg,#3478ff,#2058d5);box-shadow:0 4px 12px rgba(24,81,205,.28);background-position:center;background-size:cover}.avatar.has-photo{color:transparent;background-color:#dbe6f5;border:2px solid rgba(255,255,255,.45)}.profile-chevron{width:16px;height:16px;stroke:rgba(255,255,255,.4);fill:none;stroke-width:2;flex:none}
.topbar,.settings-topbar,.detail-top{height:68px;min-height:68px;padding-inline:clamp(18px,2.5vw,36px);border-bottom:1px solid #e6ecf3;box-shadow:0 1px 0 rgba(15,31,54,.025)}.content{padding:clamp(24px,3vw,40px);max-width:1600px;width:100%;margin:auto}.settings-content{max-width:1160px;padding:38px clamp(24px,4vw,64px) 56px}.detail-content{max-width:1540px;padding:28px clamp(20px,2.5vw,40px) 48px}.page-heading h1,.page-title h1{letter-spacing:-.04em}.page-title h1{font-size:1.75rem}
.card,.kpi,.table-card,.settings-card,.detail-card{border:1px solid #e1e8f0;border-radius:16px;box-shadow:var(--shadow-sm);background:var(--surface)}.kpi-grid{gap:18px}.kpi{min-height:116px;border-radius:16px}.kpi:hover{transform:translateY(-3px);box-shadow:var(--shadow)}.dashboard-grid{gap:22px}.task-row{padding:14px 20px}.task-row>div:not(.task-info){display:flex;align-items:baseline;gap:6px;min-width:0;flex:1}.task-row>div:not(.task-info) strong,.task-row>div:not(.task-info) small{display:block;white-space:nowrap}.task-row>div:not(.task-info) small:before{content:"·";margin-right:6px;color:#98a5b5}
.filter-row{gap:8px}.filter-row button,.filter-chip{min-height:38px;padding:8px 14px!important;border:1px solid var(--border)!important;border-radius:10px!important;background:#fff!important;color:var(--text-secondary)!important;font-weight:600}.filter-row button.active{background:var(--primary-soft)!important;border-color:#9bbcf5!important;color:#1d55bd!important}.table-card{overflow:hidden}.vehicle-table .tr{min-height:64px;border-bottom-color:#edf1f5}.vehicle-table .tr:not(.head):hover{background:#f7faff;box-shadow:inset 3px 0 var(--primary)}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea,.detail-field input,.detail-field select,.detail-field textarea,.viewing-form input,.viewing-form select,.viewing-form textarea,.field input,.field select,.field textarea,.form-grid input,.form-grid select,.form-grid textarea{display:block;width:100%;background:#f5f7fa!important;border:1.5px solid var(--field-border)!important;color:var(--text)!important;border-radius:10px!important;box-shadow:inset 0 1px 2px rgba(15,31,54,.04)!important;font:inherit}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select{min-height:46px;padding:0 12px!important}textarea{min-height:104px;padding:12px!important;line-height:1.5;resize:vertical}input:hover,select:hover,textarea:hover{background:#fff!important;border-color:#7f93aa!important}input:focus,select:focus,textarea:focus{background:#fff!important;border-color:var(--primary)!important;box-shadow:0 0 0 4px rgba(37,99,235,.14)!important;outline:0!important}input::placeholder,textarea::placeholder{color:#738398!important;opacity:1}.field label,.detail-field label,.viewing-form label,.form-grid label{color:#34445b!important;font-weight:700!important}.preparation textarea{min-height:130px!important}
.settings-card-header{padding:20px 24px}.settings-card-body{padding:26px}.settings-card-icon{width:42px;height:42px;border-radius:12px}.invite-row{display:grid!important;grid-template-columns:minmax(240px,1.2fr) minmax(180px,.8fr) auto;gap:12px}.user-item{padding:14px 2px}.form-actions .primary{height:42px}
.profile-photo-row{display:flex;align-items:center;gap:20px;padding:2px 0 24px;margin-bottom:24px;border-bottom:1px solid var(--border)}.profile-photo-preview{width:86px;height:86px;display:grid;place-items:center;flex:none;border-radius:50%;background:linear-gradient(145deg,#3478ff,#2058d5);background-position:center;background-size:cover;color:#fff;font-size:1.35rem;font-weight:800;box-shadow:0 8px 20px rgba(24,81,205,.2)}.profile-photo-preview.has-photo{color:transparent}.profile-photo-copy{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.profile-photo-copy strong{font-size:.95rem}.profile-photo-copy small{color:var(--text-muted)}.profile-photo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:5px}.visually-hidden-file{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}.profile-photo-actions .btn{cursor:pointer}
.form-help{margin:14px 0 0;color:var(--text-muted);font-size:.78rem;line-height:1.5}.connected-badge,.disconnected-badge{white-space:nowrap}
.detail-layout{gap:22px}.detail-grid{gap:20px}.vehicle-hero{border-radius:16px}.section{padding:22px}.detail-field{align-items:start}.detail-field label{padding-top:12px}.viewing-form{gap:16px!important}.viewing-form label{gap:7px!important}.viewing-form textarea{min-height:110px!important}.document-row{padding-block:11px;border-bottom:1px solid #edf1f5}
.overlay{background:rgba(6,20,37,.48);backdrop-filter:blur(4px)}.panel,.wizard{box-shadow:-20px 0 60px rgba(8,28,51,.2)}
@media(max-width:1180px){.sidebar{width:84px}.sidebar .brand{justify-content:center;padding-inline:10px}.sidebar .brand>div,.nav-label,.nav-text,.sidebar-footer>div,.profile-chevron{display:none}.sidebar nav button{justify-content:center;padding:11px}.sidebar nav button svg{width:20px;height:20px}.sidebar-footer{justify-content:center}.detail-shell{grid-template-columns:84px minmax(0,1fr)!important}.dashboard-grid{grid-template-columns:1fr}}
@media(max-width:900px){.sidebar{width:252px}.sidebar .brand{justify-content:flex-start;padding-inline:18px}.sidebar .brand>div,.nav-label,.nav-text,.sidebar-footer>div,.profile-chevron{display:block}.sidebar nav button{justify-content:flex-start}.content{padding:22px 18px 84px}.kpi-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.kpi-grid{grid-template-columns:1fr}.settings-content{padding:22px 14px 40px}.settings-card-body,.settings-card-header{padding:18px}.invite-row{grid-template-columns:1fr}.detail-grid{display:block}.detail-field{grid-template-columns:1fr}.vehicle-table .tr{grid-template-columns:minmax(0,1fr) auto!important}.vehicle-table .tr>span:not(.vehicle-name):not(:last-child),.vehicle-table .head{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
[data-theme="dark"] .topbar,[data-theme="dark"] .settings-topbar,[data-theme="dark"] .detail-top{background:var(--surface);border-bottom-color:var(--border)}
[data-theme="dark"] .card,[data-theme="dark"] .kpi,[data-theme="dark"] .table-card,[data-theme="dark"] .settings-card,[data-theme="dark"] .detail-card,[data-theme="dark"] .panel,[data-theme="dark"] .wizard,[data-theme="dark"] .table-tools,[data-theme="dark"] .vehicle-table .head{background:var(--surface);border-color:var(--border);color:var(--text)}
[data-theme="dark"] .vehicle-table .tr{border-bottom-color:var(--border);color:var(--text-secondary)}[data-theme="dark"] .vehicle-table .tr:not(.head):hover{background:#132942}
[data-theme="dark"] .filter-row button,[data-theme="dark"] .filter-chip,[data-theme="dark"] .icon-button,[data-theme="dark"] .location{background:var(--surface)!important;border-color:var(--border)!important;color:var(--text-secondary)!important}
[data-theme="dark"] .filter-row button.active{background:var(--primary-soft)!important;border-color:#3569a7!important;color:#9fc5ff!important}
[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=file]),[data-theme="dark"] select,[data-theme="dark"] textarea{background:#0a192a!important;border-color:var(--field-border)!important;color:var(--text)!important}
[data-theme="dark"] input:hover,[data-theme="dark"] select:hover,[data-theme="dark"] textarea:hover,[data-theme="dark"] input:focus,[data-theme="dark"] select:focus,[data-theme="dark"] textarea:focus{background:#10263d!important}
[data-theme="dark"] .field label,[data-theme="dark"] .detail-field label,[data-theme="dark"] .viewing-form label,[data-theme="dark"] .form-grid label{color:var(--text-secondary)!important}
[data-theme="dark"] .document-row,[data-theme="dark"] .profile-photo-row{border-color:var(--border)}
.location select{min-height:auto!important;width:auto!important;padding:0 20px 0 0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:inherit!important;cursor:pointer}.location select:focus{box-shadow:none!important}.location>svg{flex:none}
.language-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:38px;padding:0 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text-secondary);font:inherit;font-size:.74rem;font-weight:800;letter-spacing:.06em;cursor:pointer}.language-toggle:hover{border-color:var(--primary);color:var(--primary)}[data-theme="dark"] .language-toggle{background:var(--surface);border-color:var(--border);color:var(--text-secondary)}
.topbar .search input,.search input,.mobile-search input{min-height:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:9px 0!important}.topbar .search input:hover,.topbar .search input:focus,.search input:hover,.search input:focus,.mobile-search input:hover,.mobile-search input:focus{border:0!important;background:transparent!important;box-shadow:none!important}.topbar .search:focus-within,.search:focus-within{border-color:var(--primary)!important;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
