/**
 * Techspire College - IT Operations Command Center
 * Unified Design System Tokens & Components
 * Replicates the exact UX of https://techspire.edu.np/dashboard/
 */

:root {
  color-scheme: light;
  --bg: #f1f2f1;
  --panel: #ffffff;
  --ink: #171719;
  --muted: #737373;
  --line: rgba(23, 23, 25, .09);
  --brand: #bd1f2d;
  --brand-dark: #971824;
  --brand-rgb: 189, 31, 45;
  --soft: #fff2f3;
  --admin-soft: #f7f7f6;
  --admin-head: #eef0f4;
  --shadow: 0 24px 70px rgba(16, 16, 18, .12);
  --shadow-soft: 0 18px 54px rgba(16, 16, 18, .075);
  --shadow-lift: 0 28px 76px rgba(16, 16, 18, .14);
  --glass: rgba(255, 255, 255, .74);
  --glass-strong: rgba(255, 255, 255, .88);
  --ring: 0 0 0 4px rgba(var(--brand-rgb), .1);
}

body.ts-body {
  min-height: 100vh;
  margin: 0;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.84), transparent 220px), linear-gradient(135deg, #fbfbfa, var(--bg));
  color: var(--ink);
  font-family: 'Inter var', Inter, system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

body.ts-body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  z-index: 0;
  background: radial-gradient(circle at 12% 18%, rgba(var(--brand-rgb), .055), transparent 24%),
              radial-gradient(circle at 86% 10%, rgba(var(--brand-rgb), .045), transparent 22%),
              radial-gradient(circle at 56% 86%, rgba(16, 16, 18, .04), transparent 30%);
  filter: blur(32px);
  opacity: .62;
  transform: translateZ(0);
}

body.ts-body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  z-index: 0;
  background-image: linear-gradient(rgba(23, 23, 25, .022) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(23, 23, 25, .02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .58), transparent 82%);
  opacity: .24;
}

/* TOPBAR CARD - As shown in the user's CMS image */
.ts-topbar {
  position: relative;
  overflow: hidden;
  padding: 30px 32px 28px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 26px;
  background: linear-gradient(135deg, #fffffffa, #ffffffe6), radial-gradient(circle at 100% 0%, rgba(var(--brand-rgb), .08), transparent 36%);
  backdrop-filter: blur(18px) saturate(1.22);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 860px) {
  .ts-topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.ts-topbar::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--brand), #ff6874, var(--brand-dark));
  content: "";
  border-radius: 26px 0 0 26px;
}

/* EYEBROW PREFIX */
.ts-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ts-eyebrow::before {
  width: 32px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

/* TITLES */
.ts-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.ts-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 5px;
}

/* BIG CLEAR PILL BUTTONS (Matching Image) */
.ts-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all .2s ease;
  cursor: pointer;
}

/* Red Button with Glowing Red Shadow (Publish / Save / Raise Ticket) */
.ts-btn-primary {
  background: var(--brand);
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(189, 31, 45, 0.35);
}
.ts-btn-primary:hover {
  transform: translateY(-2px);
  background: var(--brand-dark);
  box-shadow: 0 18px 36px rgba(189, 31, 45, 0.45);
  color: #ffffff !important;
}

/* Green Button (Add + with green glow) */
.ts-btn-green {
  background: #16a34a;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.35);
}
.ts-btn-green:hover {
  transform: translateY(-2px);
  background: #15803d;
  box-shadow: 0 18px 36px rgba(22, 163, 74, 0.45);
  color: #ffffff !important;
}

/* Secondary Button with Underline (View Site / Links) */
.ts-btn-secondary {
  border: 1px solid rgba(23, 23, 25, 0.12);
  background: #ffffff;
  color: var(--ink) !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
  box-shadow: 0 4px 12px rgba(16, 16, 18, 0.04);
}
.ts-btn-secondary:hover {
  background: #f7f7f7;
  transform: translateY(-2px);
}

/* White Button (Refresh / Secondary Tabs) */
.ts-btn-white {
  border: 1px solid rgba(23, 23, 25, 0.12);
  background: #ffffff;
  color: var(--ink) !important;
  box-shadow: 0 4px 12px rgba(16, 16, 18, 0.04);
}
.ts-btn-white:hover {
  background: #f7f7f7;
  transform: translateY(-2px);
  color: var(--ink) !important;
}

/* Logout Red Pill Button */
.ts-btn-logout {
  background: var(--brand);
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(189, 31, 45, 0.35);
}
.ts-btn-logout:hover {
  transform: translateY(-2px);
  background: var(--brand-dark);
  box-shadow: 0 16px 32px rgba(189, 31, 45, 0.45);
}

/* CONTENT CARD */
.ts-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  padding: 26px 28px;
  transition: all .25s ease;
}
.ts-card:hover {
  box-shadow: var(--shadow-lift);
}

/* FORM INPUTS */
.ts-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(23, 23, 25, .12);
  border-radius: 14px;
  padding: 0 16px;
  font-size: 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: all .2s ease;
}
.ts-input:focus {
  border-color: #bd1f2d99;
  box-shadow: 0 0 0 4px rgba(189, 31, 45, 0.12);
}

/* RED BLINKING LIGHT INDICATOR */
@keyframes redBeaconPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.75), 0 0 16px rgba(244, 63, 94, 0.85);
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    box-shadow: 0 0 0 10px rgba(225, 29, 72, 0), 0 0 24px rgba(244, 63, 94, 0.95);
    transform: scale(1.08);
  }
}
.blinking-red-light {
  animation: redBeaconPulse 1.1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.room-card-issue {
  border-color: #fca5a5 !important;
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 28%) !important;
  box-shadow: 0 18px 45px rgba(239, 68, 68, 0.14) !important;
}
