:root, html[data-theme="light"] {
  --primary: #113b3e;
  --secondary: #163e41;
  --accent: #d9f2b8;
  --primary-fg: #fff;
  --body-bg: #f5f5f0;
  --body-fg: #273e42;
  --header-bg: #102d32;
  --header-color: #e3f0e9;
  --breadcrumbs-bg: #e9f0e9;
  --breadcrumbs-fg: #43655e;
  --link-fg: #167768;
  --link-hover-color: #0d5a50;
  --default-button-bg: #147b6d;
  --default-button-hover-bg: #0e665b;
  --button-bg: #147b6d;
  --button-hover-bg: #0e665b;
  --border-color: #e3e9e3;
  --hairline-color: #e8ede8;
  --selected-bg: #e8f4e8;
  --selected-row: #f1f8ed;
  color-scheme: light;
}
html { font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; }
body { background: var(--body-bg); font-family: inherit; }
#container { min-height: 100vh; }
#header { min-height: 82px; height: auto; padding: 0 36px; gap: 30px; box-shadow: 0 5px 24px #061f1d20; }
#branding { flex: none; }
#site-name { margin: 0; }
#site-name a { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.ez-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #d9f2b8; color: #173f36; font-size: 22px; font-weight: 900; letter-spacing: -.15em; padding-right: 4px; }
.ez-brand-copy { display: grid; gap: 1px; line-height: 1.1; }
.ez-brand-copy strong { font-size: 18px; font-weight: 800; letter-spacing: .05em; }
.ez-brand-copy small { color: #9ebeb5; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.ez-global-nav { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-right: auto; }
.ez-global-nav a { padding: 9px 12px; border-radius: 8px; color: #bed8cf; font-size: 12px; font-weight: 700; text-decoration: none; }
.ez-global-nav a:hover, .ez-global-nav a:focus-visible { background: #ffffff18; color: #fff; }
#user-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0; color: #a9c6bf; font-size: 11px; }
#user-tools a, #logout-form button { color: #dceae3; }
#user-tools strong { color: #fff; }
#logout-form button { font-size: 11px; }
.breadcrumbs { padding: 14px 38px; font-size: 12px; }
.main { background: var(--body-bg); }
#nav-sidebar { border-right: 1px solid #e2e9e2; background: #fafbf8; }
#nav-sidebar .module th, #nav-sidebar .module td { border-bottom-color: #e7ece7; }
#content { padding: 32px 38px 55px; }
#content h1 { color: #1d383a; font-size: 27px; font-weight: 800; letter-spacing: -.035em; }
#content h2 { color: #315052; }
.module, .inline-group, #changelist-filter, #changelist, fieldset, .submit-row { border-radius: 12px; }
.module, .inline-group, #changelist-filter, .submit-row { overflow: hidden; border: 1px solid #e4e9e3; background: #fff; box-shadow: 0 8px 22px #17383908; }
.module h2, .module caption, .inline-group h2 { padding: 13px 17px; background: #e7f1e9; color: #24554c; font-weight: 800; }
div.breadcrumbs a { color: #256c60; }
.button, input[type=submit], input[type=button], .submit-row input, a.button { border-radius: 8px; font-weight: 700; }
input, textarea, select { border-radius: 7px; }
input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #9de0c1; outline-offset: 2px; }
#changelist-search input[type=text] { border-radius: 8px; }
#changelist .results { border-radius: 10px; overflow: auto; }
#changelist table thead th { background: #f0f5ee; color: #42615c; }
#changelist table tbody tr:hover { background: #f7fbf5; }
.object-tools a { border-radius: 8px; }
.messagelist li { border-radius: 9px; }

body.ez-dashboard #content { max-width: 1510px; margin: 0 auto; padding-top: 30px; }
.ez-hero { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 24px; overflow: hidden; min-height: 202px; padding: 33px 39px; border-radius: 20px; background: radial-gradient(circle at 83% -12%, #407e70, #1b5551 39%, #12393c 72%, #102e34); color: #fff; }
.ez-hero::after { content: ""; position: absolute; width: 310px; height: 310px; right: -44px; top: -170px; border: 1px solid #ffffff30; border-radius: 50%; box-shadow: 0 0 0 42px #ffffff08, 0 0 0 85px #ffffff05; pointer-events: none; }
.ez-hero > * { position: relative; z-index: 1; }
.ez-kicker, .ez-side-label, .ez-section-heading span { color: #7db5a5; font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.ez-hero .ez-kicker { color: #b9dfcb; }
.ez-hero h1 { max-width: 780px; margin: 12px 0 8px; color: #fff !important; font-size: clamp(26px, 3vw, 39px) !important; line-height: 1.3; }
.ez-hero p { margin: 0; color: #c5ddd4; font-size: 13px; }
.ez-hero-action { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 42px; padding: 9px 17px; border-radius: 9px; background: #dcf4b9; color: #16483c !important; font-size: 12px; font-weight: 850; text-decoration: none; }
.ez-hero-action:hover { background: #ecffd4; }
.ez-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 17px 0 30px; }
.ez-stats a { position: relative; display: flex; flex-direction: column; min-height: 135px; padding: 21px 23px; border: 1px solid #e5eae4; border-radius: 15px; background: #fff; box-shadow: 0 9px 22px #12373909; text-decoration: none; transition: transform .18s, box-shadow .18s; }
.ez-stats a:hover { transform: translateY(-2px); box-shadow: 0 15px 25px #12373914; }
.ez-stats span { color: #68817d; font-size: 12px; font-weight: 750; }
.ez-stats strong { margin: 7px 0 3px; color: #195a53; font-size: 32px; line-height: 1; font-weight: 780; }
.ez-stats a:nth-child(3) strong { color: #b78142; }
.ez-stats a:nth-child(4) strong { color: #a85e58; }
.ez-stats small { margin-top: auto; color: #9aaa9f; font-size: 10px; }
.ez-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 25px; }
.ez-section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 13px; }
.ez-section-heading h2, .ez-side-panel h2 { margin: 5px 0 0; color: #234144 !important; font-size: 19px; font-weight: 800; }
.ez-section-heading p { margin: 0; color: #9aa9a4; font-size: 11px; }
.ez-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.ez-shortcuts a { position: relative; display: flex; flex-direction: column; min-height: 148px; padding: 19px; border: 1px solid #e5eae4; border-radius: 13px; background: #fff; text-decoration: none; }
.ez-shortcuts a:hover { border-color: #b9d9c7; background: #fbfefb; }
.ez-shortcuts b { color: #a0bbb0; font-size: 10px; }
.ez-shortcuts strong { margin: auto 0 6px; color: #274e4a; font-size: 15px; }
.ez-shortcuts small { color: #849692; font-size: 11px; line-height: 1.4; }
.ez-shortcuts em { position: absolute; top: 17px; right: 17px; color: #81a399; font-style: normal; }
.ez-model-heading { margin-top: 29px; }
.ez-model-list .module { margin-bottom: 12px; }
.ez-model-list .module table { width: 100%; }
.ez-model-list .module th, .ez-model-list .module td { padding: 11px 17px; }
.ez-side-panel { margin-bottom: 14px; padding: 21px; border: 1px solid #e5eae4; border-radius: 14px; background: #fff; }
.ez-side-panel h2 { margin-bottom: 16px; font-size: 16px; }
.ez-tenant-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #edf0eb; text-decoration: none; }
.ez-tenant-row strong, .ez-tenant-row small { display: block; }
.ez-tenant-row strong { color: #2c4e49; font-size: 12px; }
.ez-tenant-row small { margin-top: 2px; color: #91a09b; font-size: 10px; }
.ez-avatar { display: grid; place-items: center; width: 33px; height: 33px; flex: none; border-radius: 10px; background: #e7f3e8; color: #2b7561; font-size: 12px; font-weight: 800; }
.ez-row-arrow { margin-left: auto; color: #a4b8ae; }
.ez-empty, .ez-side-note p { color: #879a93; font-size: 12px; line-height: 1.7; }
.ez-side-note { border-color: #dce9d2; background: #f0f7e8; }
.ez-side-note h2 { color: #3a6756 !important; }
body.login { background: radial-gradient(circle at 100% 0, #def1e3, #f6f7f1 50%); }
body.login #container { border: 0; background: transparent; }
body.login #header { padding: 0 25px; }
body.login #content { max-width: 390px; margin: 8vh auto 0; padding: 32px; border: 1px solid #e5ebe5; border-radius: 17px; background: #fff; box-shadow: 0 22px 50px #143d3914; }
body.login #content h1 { font-size: 22px; }
body.login .form-row label { font-weight: 700; }
body.login .submit-row { padding: 0; border: 0; box-shadow: none; }
body.login .submit-row input { width: 100%; min-height: 42px; }
@media (max-width: 1050px) {
  #header { flex-wrap: wrap; padding: 16px 24px; gap: 12px; }
  .ez-global-nav { order: 3; width: 100%; }
  .ez-dashboard-grid { grid-template-columns: 1fr; }
  .ez-side-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
}
@media (max-width: 720px) {
  #header { padding: 14px 16px; }
  #content, body.ez-dashboard #content { padding: 18px 14px 35px; }
  .breadcrumbs { padding: 10px 16px; }
  .ez-global-nav { overflow-x: auto; flex-wrap: nowrap; }
  .ez-global-nav a { white-space: nowrap; }
  .ez-hero { flex-direction: column; align-items: flex-start; padding: 27px 23px; }
  .ez-hero h1 { font-size: 27px !important; }
  .ez-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .ez-stats a { min-height: 112px; padding: 15px; }
  .ez-shortcuts, .ez-side-column { grid-template-columns: 1fr; }
  .ez-shortcuts a { min-height: 105px; }
  .ez-section-heading p { display: none; }
  body.login #content { margin: 5vh 14px 0; }
}
@media (prefers-reduced-motion: reduce) { .ez-stats a { transition: none; } }
