/* ITSM Console — ServiceNow-style theme */
:root {
  --sn-sidebar: #383754;
  --sn-sidebar-hover: rgba(255, 255, 255, .07);
  --sn-accent: #40c8e1;
  --sn-bg: #eef1f5;
  --sn-border: #e0e4e8;
  --sn-text: #2c3e50;
  --sn-topbar: #ffffff;
}

body {
  background: var(--sn-bg);
  font-family: "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--sn-text);
}

/* ---- shell ---- */
.sn-shell { display: flex; min-height: 100vh; }
.sn-sidebar {
  width: 232px; background: var(--sn-sidebar); color: #cdd8e0;
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 100;
}
.sn-logo {
  padding: 18px 20px; font-size: 16px; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08); letter-spacing: .3px;
}
.sn-logo i { color: var(--sn-accent); margin-right: 6px; }
.sn-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.sn-nav-sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 18px; }
.sn-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 20px;
  color: #cdd8e0; text-decoration: none; font-size: 14px;
  border-left: 3px solid transparent; transition: background .12s;
}
.sn-nav-item i { width: 18px; text-align: center; }
.sn-nav-item:hover { background: var(--sn-sidebar-hover); color: #fff; }
.sn-nav-item.active { background: rgba(64, 200, 225, .16); color: #fff; border-left-color: var(--sn-accent); }
.sn-badge {
  margin-left: auto; background: rgba(255,255,255,.14); border-radius: 10px;
  padding: 1px 8px; font-size: 11px; font-weight: 600;
}
.sn-nav-item.active .sn-badge { background: var(--sn-accent); }
.sn-sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 8px 0; }

.sn-main { margin-left: 232px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.sn-topbar {
  background: var(--sn-topbar); border-bottom: 1px solid var(--sn-border);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 90;
}
.sn-page-title { font-size: 18px; font-weight: 600; }
.sn-content { padding: 24px; flex: 1; }
.sn-icon-btn {
  background: transparent; border: none; color: var(--sn-text); padding: 6px 10px;
  border-radius: 6px; font-size: 15px;
}
.sn-icon-btn:hover { background: #f0f2f5; }
.sn-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--sn-accent); color: #fff; font-weight: 700; font-size: 13px;
}
.sn-avatar-sm { width: 26px; height: 26px; font-size: 12px; flex-shrink: 0; }

/* ---- cards & stats ---- */
.sn-card { border: 1px solid var(--sn-border); border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.sn-card-header { background: #fafbfc; border-bottom: 1px solid var(--sn-border); font-weight: 600; font-size: 14px; }
.sn-card-title { font-weight: 600; font-size: 14px; color: var(--sn-text); }
.sn-stat {
  background: #fff; border: 1px solid var(--sn-border); border-radius: 10px;
  padding: 20px 16px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.sn-stat-num { font-size: 30px; font-weight: 700; line-height: 1.1; margin-top: 10px; }
.sn-stat-label { color: #7f8c8d; font-size: 13px; margin-top: 4px; }
.sn-stat-icon-circle {
  width: 42px; height: 42px; border-radius: 10px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 19px; color: #fff;
}
.bg-blue { background: #40c8e1; }
.bg-red { background: #e74c3c; }
.bg-orange { background: #f39c12; }
.bg-cyan { background: #2f8fc9; }
.bg-green { background: #27ae60; }
.bg-purple { background: #9b59b6; }
.bg-gray { background: #95a5a6; }

/* ---- tables ---- */
.sn-table { font-size: 14px; }
.sn-table thead th {
  background: #fafbfc; font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: #7f8c8d; border-bottom: 1px solid var(--sn-border); white-space: nowrap;
}
.sn-table tbody tr:hover { background: #f7fafc; }

/* ---- pills & tags ---- */
.sn-pill {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.sn-pill-lg { padding: 4px 14px; font-size: 13px; border-radius: 14px; }
.sn-tag {
  display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px;
  background: #eef2f6; color: #4a5a6a; border: 1px solid #dde4ea;
}
.sn-link { color: var(--sn-accent); text-decoration: none; }
.sn-link:hover { text-decoration: underline; }

/* ---- buttons ---- */
.sn-btn-primary {
  background: var(--sn-accent); border: 1px solid var(--sn-accent); color: #fff;
}
.sn-btn-primary:hover { background: #2879ad; border-color: #2879ad; color: #fff; }
.sn-btn-outline { background: #fff; border: 1px solid #c8d0d8; color: var(--sn-text); }
.sn-btn-outline:hover { background: #f0f2f5; }

/* ---- activity stream ---- */
.sn-comment { display: flex; gap: 10px; margin-bottom: 16px; }
.sn-comment-body {
  background: #f7f9fb; border: 1px solid var(--sn-border); border-radius: 6px;
  padding: 8px 12px; flex: 1; font-size: 14px;
}
.sn-description { font-size: 14px; line-height: 1.7; white-space: pre-line; }

/* ---- login ---- */
.sn-login-body {
  background: linear-gradient(135deg, #1f2b38 0%, #2f3f52 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.sn-login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.sn-login-card { background: #fff; border-radius: 10px; padding: 36px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.sn-login-logo { font-size: 22px; font-weight: 700; text-align: center; color: var(--sn-text); margin-bottom: 4px; }
.sn-login-logo i { color: var(--sn-accent); margin-right: 6px; }

/* ---- pagination ---- */
.page-link { color: var(--sn-accent); }
.page-item.active .page-link { background: var(--sn-accent); border-color: var(--sn-accent); }
