/* Presentation layer. Business state, routing, requests and permissions are unchanged. */
:root {
  --bg:#f3f5f9; --card:#fff; --card-solid:#fff; --border:#e2e8f0;
  --accent:#173f75; --accent-light:#eaf0f9; --blue:#24599a;
  --text:#14243b; --text2:#64748b; --green:#168465; --red:#c93a45;
  --orange:#b75c19; --yellow:#987018; --purple:#7552a2;
  --cyan:#087b91; --pink:#ad3b70; --violet:#7552a2;
  --header-bg:#fff; --shadow:0 2px 8px rgba(26,43,70,.035);
  --shadow-lg:0 16px 48px rgba(26,43,70,.12);
}
html,body {font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei","PingFang SC",sans-serif; -webkit-font-smoothing:antialiased;}
body {background:var(--bg)!important;color:var(--text)!important;}
button,input,select,textarea {font-family:inherit;}
button,[onclick],a,input,select,textarea {-webkit-tap-highlight-color:rgba(23,63,117,.1);}
button,a,input,select,textarea,[role="button"] {touch-action:manipulation;}
:focus-visible {outline:3px solid #457ec6!important;outline-offset:3px;}
button,input,select,textarea,a,[role="button"] {transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;}
button:disabled {cursor:not-allowed;opacity:.55;}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea {border-radius:9px!important;border-color:#dce3ed!important; background:#fff!important;color:var(--text)!important;}
input::placeholder,textarea::placeholder {color:#8b98aa!important;}
input:focus,select:focus,textarea:focus {border-color:#457ec6!important;box-shadow:0 0 0 3px #eaf0f9!important;}
input[type="checkbox"],input[type="radio"] {accent-color:var(--accent);}
.card,.kpi-card,.stat-card,.setting-category {background:#fff!important;box-shadow:var(--shadow)!important;}
.btn-primary,.sys-btn-primary {background:var(--accent)!important;color:#fff!important;}
.btn-success,.sys-btn-success {background:var(--green)!important;color:#fff!important;}
.btn-danger,.sys-btn-danger {background:var(--red)!important;color:#fff!important;}
.btn-warning {background:var(--orange)!important;color:#fff!important;}
.btn-ghost {background:#fff!important;color:var(--text)!important;border:1px solid #dce3ed!important;}
@media(hover:hover) {
  button:hover:not(:disabled),.login-btn:hover {filter:brightness(.97);}
  .card[onclick]:hover,.kpi-card[onclick]:hover,.stat-card[onclick]:hover,.setting-category:hover {border-color:#a3b8d6!important;box-shadow:0 5px 18px rgba(23,63,117,.075)!important;}
}
button:active:not(:disabled),.login-btn:active {transform:translateY(1px);}
/* Preserve red/amber/green meaning while correcting light-theme contrast. */
[style*="color:#FFD600"],[style*="color:#FFC107"] {color:#956708!important;}
[style*="color:#00E676"] {color:#168465!important;}
[style*="color:#58a6ff"],[style*="color:#4FC3F7"] {color:#24599a!important;}
[style*="color:#CE93D8"] {color:#7552a2!important;}
[style*="color:#F44336"] {color:#c93a45!important;}
[style*="color:#FF6D00"] {color:#b75c19!important;}
.overdue {color:var(--red)!important;}
.urgency-red {border-color:#e6b9bf!important;color:var(--red)!important;}
.urgency-orange {border-color:#eccdb1!important;color:var(--orange)!important;}
.urgency-yellow {border-color:#e3d5a6!important;color:var(--yellow)!important;}
.ui-eyebrow {font-size:10px;font-weight:700;letter-spacing:2px;color:#6b819e;}
.ui-app-brand {display:flex;align-items:center;gap:10px;flex-shrink:0;background:#fff;}
.ui-app-brand img {width:67px;height:46px;object-fit:contain;}
.ui-app-brand strong {display:block;font-size:18px;letter-spacing:.4px;color:#173455;}
.ui-app-brand span {display:block;font-size:10px;letter-spacing:1.4px;color:#7a889b;margin-top:3px;}
.ui-sidebar-brand img {object-fit:contain;}
/* Keep the real sync indicator legible, including errors; never create a fake status. */
#cloudSyncBadge {font-family:inherit!important;border-radius:7px!important;max-width:calc(100vw - 24px);}
::-webkit-scrollbar {width:7px;height:7px;}
::-webkit-scrollbar-thumb {background:#c4cddd;border-radius:8px;border:2px solid transparent;background-clip:padding-box;}
::-webkit-scrollbar-track {background:transparent;}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {scroll-behavior:auto!important;animation:none!important;transition:none!important;}
}
