/* Mingdao HAP style set (light only)
 * Loaded as an additional stylesheet on top of ui-kit.css.
 * tokens are also applied at runtime by ThemeEngine/StyleSet; the :root block
 * below is the no-JS fallback and keeps the page usable if the manifest fails.
 */
:root {
  --blue: #2196f3;
  --blue-d: #1565c0;
  --blue-l: #e3f2fd;
  --bg: #f5f5f9;
  --card: #ffffff;
  --line: #e0e0e0;
  --txt: #333333;
  --sub: #757575;
  --green: #4caf50;
  --red: #f44336;
  --amber: #ff9800;
  --ok: #4caf50;
  --shadow: 0 1px 3px rgba(0, 0, 0, .16);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, .13), 0 2px 6px rgba(0, 0, 0, .1);
  --shadow-xl: 0 4px 20px rgba(0, 0, 0, .2), 0 2px 6px rgba(0, 0, 0, .15);
  --radius: 3px;
  --radius-lg: 12px;
  --radius-card: 3px;
  --radius-tile: 12px;
  --side-w: 240px;
  --ease: all .2s;
  --font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
  --font-size: 13px;
  --font-size-sm: 13px;
  --font-size-xs: 12px;
  --control-h: 36px;
  --control-h-sm: 30px;
  --row-h: 48px;
  --border-strong: #cccccc;
  --border-soft: #f0f0f0;
  --text-tertiary: #9e9e9e;
  --text-disabled: #bdbdbd;
  --wk-topbar-h: 50px;
  --wk-rail-w: 68px;
  --wk-rail-w-expanded: 180px;
  --wk-sidebar-w: 240px;
  --wk-sidebar-w-collapsed: 56px;
  --wk-content-header-h: 38px;
  --wk-toolbar-h: 37px;
  --wk-detail-w: 500px;
  --wk-detail-header-h: 52px;
  --wk-detail-form-min: 450px;
  --wk-detail-side-w: 500px;
  --wk-surface: #ffffff;
  --wk-surface-subtle: #fafafa;
  --wk-surface-hover: #f5f5f5;
  --wk-border: #dddddd;
  --wk-border-soft: #f0f0f0;
  --wk-nav-bg: #ffffff;
  --wk-nav-fg: #333333;
  --wk-nav-active: rgba(33, 150, 243, .12);
  --wk-nav-accent: #2196f3;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size);
  color: var(--txt);
}

/* Buttons: flat, bold, 3px radius (pd-openweb ming-ui Button) */
.btn {
  height: 32px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: var(--font-size);
  font-weight: 700;
  box-shadow: none;
  transition: color .2s, border-color .2s, background-color .2s;
}
.btn:hover { box-shadow: none; }
.btn.sm { height: 28px; padding: 0 12px; font-size: var(--font-size-xs); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
}
.btn.ghost:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn.success { background: var(--green); color: #fff; }
.btn.success:hover { background: #3d8b40; }
.btn[disabled] { background: #bdbdbd; color: #fff; }

/* Inputs: 36px, 3px radius, no focus glow */
input, select, textarea {
  height: var(--control-h);
  padding: 0 12px;
  border: 1px solid #cccccc;
  border-radius: var(--radius);
  font-size: var(--font-size);
  background: #fff;
  color: var(--txt);
}
textarea { height: auto; padding: 8px 12px; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #bbbbbb; }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: none;
}
label { color: var(--sub); font-size: var(--font-size-xs); font-weight: 500; }

/* Tables: 48px rows, no uppercase headers, light hover */
th {
  font-size: var(--font-size);
  font-weight: 600;
  color: var(--txt);
  background: #fff;
  text-transform: none;
  letter-spacing: 0;
}
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
tbody tr:hover td { background: var(--wk-surface-hover); }

/* Surfaces */
.panel, .stat {
  border-radius: var(--radius-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}
.stat:hover { box-shadow: 0 1px 3px rgba(0, 0, 0, .16); transform: none; }
.stat .v { color: var(--blue); font-size: 22px; }
.tag { border-radius: var(--radius); padding: 2px 8px; font-size: var(--font-size-xs); font-weight: 500; }
.topbar { height: 50px; box-shadow: 0 1px 2px rgba(0, 0, 0, .24); }
.modal { border-radius: var(--radius); }
.modal h2 { font-size: 17px; font-weight: 600; }
.modal-mask { background: rgba(0, 0, 0, .7); }
.modal .foot { gap: 16px; }
.seg { border-radius: var(--radius); }
.seg span.on { background: var(--blue); }

/* Workspace icons */
.wk-rail-item > [class^="icon-"] { font-size: 20px; line-height: 1; }
.wk-sidebar-list li > [class^="icon-"] { font-size: 18px; color: #9e9e9e; }
.wk-sidebar-list li.active > [class^="icon-"] { color: var(--blue); }
.wk-icon-btn > [class^="icon-"] { font-size: 16px; }
.wk-logo { border-radius: 8px; }
.wk-detail-card { border-radius: 4px; }
.wk-detail-side { background: var(--wk-surface-subtle); }
.wk-tab.active::after { background: var(--blue); }
