/* Service-specific page styles */

/* ---- Console Home ---- */
.home-hero {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px;
  background: linear-gradient(120deg, #101d33 0%, #1c3350 55%, #24405f 100%);
  border-radius: var(--radius-card); color: #fff; margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.home-hero::after {
  content: ""; position: absolute; right: -60px; top: -40px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(236,114,17,0.25), transparent 65%);
}
.home-hero .hh-text { flex: 1; min-width: 220px; position: relative; z-index: 1; }
.home-hero h1 { color: #fff; font-size: 22px; }
.home-hero p { color: #cdd7e1; margin: 6px 0 0; max-width: 560px; }
.home-hero .hh-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.home-hero .btn-ghost {
  background: transparent; border: 1px solid rgba(255,255,255,0.55); color: #fff;
  border-radius: 20px; min-height: 32px; padding: 4px 16px; cursor: pointer; font-size: 14px; font-family: inherit;
  display: inline-flex; align-items: center;
}
.home-hero .btn-ghost:hover { background: rgba(255,255,255,0.12); }
.widget {
  background: var(--bg-container); border: 1px solid var(--b-item);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; min-height: 200px;
}
.widget.wide { grid-column: span 2; }
.widget .w-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--b-divider);
}
.widget .w-head h3 { font-size: 14.5px; font-weight: 700; flex: 1; }
.widget .w-body { padding: 14px 16px; flex: 1; }
.widget .w-foot { padding: 8px 16px; border-top: 1px solid var(--b-divider); font-size: 13px; }
.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px; }
.recent-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; color: var(--t-body);
}
.recent-item:hover { background: var(--bg-hover); text-decoration: none; }
.recent-item .svc-ico { width: 20px; height: 20px; flex: none; display: grid; place-items: center; }
.ta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.ta-cell .ta-num { font-size: 20px; font-weight: 700; }
.ta-cell .ta-lbl { color: var(--t-secondary); font-size: 12.5px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.explore-card {
  border: 1px solid var(--b-item); border-radius: 8px; padding: 14px;
  cursor: pointer; background: #fff; font-family: inherit; text-align: left;
  transition: border-color 0.1s, box-shadow 0.1s;
}
.explore-card:hover { border-color: var(--b-focus); box-shadow: 0 2px 8px rgba(9,114,211,0.12); }
.explore-card .ec-tag { font-size: 11px; color: var(--aws-orange); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.explore-card .ec-title { font-weight: 600; margin: 6px 0 4px; font-size: 14px; }
.explore-card .ec-sub { color: var(--t-secondary); font-size: 12.5px; }

/* ---- EC2 ---- */
.state-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.state-badge .sb-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.state-badge .sb-dot svg { width: 9px; height: 9px; }
.st-running { color: var(--s-ok); } .st-running .sb-dot { background: var(--s-ok); }
.st-stopped { color: var(--s-error); } .st-stopped .sb-dot { background: var(--s-error); }
.st-pending, .st-stopping, .st-rebooting, .st-shutting-down { color: var(--s-warning); } .st-pending .sb-dot, .st-stopping .sb-dot, .st-rebooting .sb-dot { background: var(--s-warning); }
.st-terminated { color: var(--t-muted); } .st-terminated .sb-dot { background: var(--t-muted); }
.status-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.status-check.ok { color: var(--s-ok); }
.status-check.init { color: var(--s-warning); }
.monitor-bar { height: 6px; border-radius: 3px; background: #e9ebed; width: 90px; overflow: hidden; }
.monitor-bar > div { height: 100%; background: var(--s-ok); }

/* ---- S3 ---- */
.s3-upload-zone {
  border: 2px dashed #a9b1ba; border-radius: 10px; padding: 34px 20px;
  text-align: center; color: var(--t-secondary); background: #fafafa;
  transition: border-color 0.12s, background 0.12s;
}
.s3-upload-zone.drag { border-color: var(--b-focus); background: var(--bg-selected); }
.upload-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--b-divider); font-size: 13.5px; }
.upload-row .ur-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-row .ur-bar { width: 140px; height: 6px; background: #e9ebed; border-radius: 3px; overflow: hidden; flex: none; }
.upload-row .ur-bar > div { height: 100%; width: 0; background: var(--b-focus); transition: width 0.2s; }
.upload-row.done .ur-bar > div { background: var(--s-ok); width: 100%; }
.upload-row .ur-status { width: 22px; display: grid; place-items: center; flex: none; }
.obj-side-panel { padding: 0; }

/* ---- Lambda ---- */
.editor-wrap {
  border: 1px solid var(--b-item); border-radius: 8px; overflow: hidden;
  background: #0d1420; display: flex; flex-direction: column;
}
.editor-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: #131c2b; color: #c3cbd5; font-size: 12.5px;
  font-family: "SF Mono", Menlo, monospace; border-bottom: 1px solid #223046;
}
.editor-bar .eb-file { color: #f2f3f3; }
.editor-body { display: flex; overflow: auto; max-height: 460px; }
.editor-gutter {
  padding: 12px 10px; color: #4a5b70; text-align: right; user-select: none;
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6;
  background: #0d1420; border-right: 1px solid #1c293c;
}
.editor-code {
  padding: 12px 16px; color: #d5dbdd; white-space: pre; flex: 1;
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6;
  tab-size: 2;
}
.editor-code .k { color: #c792ea; } .editor-code .s { color: #c3e88d; }
.editor-code .n { color: #f78c6c; } .editor-code .c { color: #637777; font-style: italic; }
.editor-code .f { color: #82aaff; } .editor-code .b { color: #89ddff; }
.test-result { border: 1px solid var(--b-item); border-radius: 8px; overflow: hidden; margin-top: 16px; }
.test-result .tr-head { padding: 10px 16px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.test-result.success .tr-head { background: var(--s-ok-bg); color: var(--s-ok); }
.test-result.error .tr-head { background: var(--s-error-bg); color: var(--s-error); }
.test-result .tr-body { padding: 14px 16px; }
.test-result pre { margin: 0; white-space: pre-wrap; }
.log-line { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; line-height: 1.7; color: #16191f; white-space: pre-wrap; }
.log-line .lt { color: var(--t-muted); }
.log-line.report { border-top: 1px dashed var(--b-divider); padding-top: 6px; margin-top: 6px; }

/* ---- CloudWatch ---- */
.alarm-state-badge { font-weight: 600; }
.timeline-wrap { padding: 8px 0; }
.timeline { display: flex; height: 34px; border-radius: 6px; overflow: hidden; border: 1px solid var(--b-item); }
.timeline .tl-seg { position: relative; }
.timeline .tl-seg.ok { background: #037f0c; }
.timeline .tl-seg.alarm { background: #d91515; }
.timeline .tl-seg.insufficient { background: #6a6f75; }
.timeline .tl-seg .tl-tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: #16191f; color: #fff; font-size: 11.5px; padding: 3px 8px; border-radius: 4px;
  white-space: nowrap; opacity: 0; pointer-events: none; z-index: 5;
}
.timeline .tl-seg:hover .tl-tip { opacity: 1; }
.tl-axis { display: flex; justify-content: space-between; color: var(--t-muted); font-size: 11.5px; margin-top: 4px; }
.metric-picker-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.metric-picker-row:hover { background: var(--bg-hover); }
.range-seg { display: inline-flex; border: 1px solid var(--b-item); border-radius: 8px; overflow: hidden; }
.range-seg button {
  border: none; background: #fff; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; color: var(--t-secondary); border-right: 1px solid var(--b-item);
}
.range-seg button:last-child { border-right: none; }
.range-seg button.active { background: var(--bg-selected); color: var(--t-link-hover); font-weight: 600; }

/* ---- RDS ---- */
.engine-chip { display: inline-flex; align-items: center; gap: 7px; }

/* ---- IAM ---- */
.iam-sec-card { border: 1px solid var(--b-item); border-radius: 8px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
.iam-sec-card .isc-num { font-size: 24px; font-weight: 700; }
.iam-sec-card .isc-num.warn { color: var(--s-warning); }
.iam-sec-card .isc-num.err { color: var(--s-error); }
.iam-sec-card .isc-num.ok { color: var(--s-ok); }

/* detail page header block */
.detail-head-card { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; }
.detail-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-id { color: var(--t-secondary); font-size: 13px; }
.nav-region-note { font-size: 12px; color: var(--t-muted); padding: 2px 14px 8px; }
