:root {
  --sidebar-width: 284px;
  --brand-primary: #1b67ff;
  --brand-secondary: #20c0ff;
  --brand-deep: #0e1a3a;
  --surface: rgba(255,255,255,0.84);
  --surface-strong: rgba(255,255,255,0.94);
  --text-main: #1d2742;
  --text-muted: #7180a6;
  --border-soft: rgba(103, 124, 170, 0.16);
  --shadow-soft: 0 18px 50px rgba(15, 35, 95, 0.12);
  --shadow-card: 0 12px 32px rgba(17, 37, 84, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  color: var(--text-main);
  background:
    radial-gradient(circle at top right, rgba(32, 192, 255, 0.16), transparent 28%),
    radial-gradient(circle at left top, rgba(27, 103, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #f5f8ff 0%, #eef3fb 100%);
  min-height: 100vh;
}

a { text-decoration: none; }

.app-main {
  min-width: 0;
  background: transparent;
}

.sidebar {
  width: var(--sidebar-width) !important;
  background: linear-gradient(180deg, #081226 0%, #0b1f42 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 18px 0 48px rgba(3, 9, 28, 0.16);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(32,192,255,0.18), transparent 22%),
    radial-gradient(circle at 85% 35%, rgba(27,103,255,0.18), transparent 24%);
  pointer-events: none;
}

.sidebar-inner,
.offcanvas-body,
.offcanvas-header {
  position: relative;
  z-index: 1;
}

.sidebar-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 106px;
  padding: .6rem .8rem;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,250,255,.96));
  border-radius: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(16, 60, 146, .08), 0 10px 24px rgba(0,0,0,.14);
}

.sidebar-logo {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;
  object-fit: contain;
}

.sidebar-caption {
  color: rgba(255,255,255,0.68);
  font-size: .77rem;
  letter-spacing: .12em;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: rgba(255,255,255,0.86) !important;
  border-radius: 14px;
  padding: .86rem 1rem;
  font-weight: 600;
  transition: all .2s ease;
}

.sidebar .nav-link .nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus,
.sidebar .nav-link.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(27,103,255,.32), rgba(32,192,255,.18));
  transform: translateX(4px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 12px 20px rgba(0,0,0,.12);
}

.sidebar .nav-link.active .nav-icon,
.sidebar .nav-link:hover .nav-icon {
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
}

.topbar {
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid rgba(113, 128, 166, 0.12);
}

.topbar-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #16213f;
}

.topbar-subtitle {
  font-size: .83rem;
  color: var(--text-muted);
}

.page-shell {
  padding: 1.2rem;
}

.page-hero {
  background: linear-gradient(135deg, rgba(27,103,255,0.94), rgba(32,192,255,0.92));
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.55rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.page-hero::before { width: 260px; height: 260px; right: -90px; top: -120px; }
.page-hero::after { width: 180px; height: 180px; right: 60px; bottom: -110px; }

.page-hero h1,
.page-hero h2,
.page-hero h3 {
  position: relative;
  z-index: 1;
  margin-bottom: .4rem;
  font-weight: 800;
}
.page-hero p,
.page-hero .hero-meta,
.page-hero .hero-actions { position: relative; z-index: 1; }

.glass-card,
.stat-card,
.table-card,
.metric-panel,
.content-card {
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.stat-card {
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(17, 37, 84, 0.14);
}
.stat-card .card-body {
  padding: 1.25rem 1.3rem;
}

.stat-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  box-shadow: 0 12px 24px rgba(27, 103, 255, .24);
}

.stat-label { color: var(--text-muted); font-size: .83rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; color: #12203f; }
.stat-meta { color: var(--text-muted); font-size: .84rem; }

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .8rem;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
}

.table-card {
  overflow: hidden;
}
.table-card .card-header,
.content-card .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(103, 124, 170, 0.14);
  padding: 1rem 1.15rem;
}
.table-card .table,
.content-card .table {
  margin-bottom: 0;
}
.table-card .table thead th,
.content-card .table thead th {
  border-bottom-width: 1px;
  color: #5c6d97;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 800;
  padding-top: .95rem;
  padding-bottom: .95rem;
}
.table-card .table tbody td,
.content-card .table tbody td {
  padding-top: 1rem;
  padding-bottom: 1rem;
  vertical-align: middle;
}
.table-card .table tbody tr:hover,
.content-card .table tbody tr:hover {
  background: rgba(27, 103, 255, .03);
}

.metric-panel {
  padding: 1.15rem;
  height: 100%;
}
.metric-panel .metric-title {
  color: var(--text-muted);
  font-size: .82rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .04em;
}
.metric-panel .metric-number {
  font-size: 2rem;
  font-weight: 800;
  color: #12203f;
}
.metric-panel .metric-caption { color: var(--text-muted); }

.status-dot {
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(0,0,0,.03);
}
.status-online { background: #16a34a; }
.status-offline { background: #ef4444; }
.status-maintenance { background: #f59e0b; }
.status-disabled { background: #6b7280; }

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .76rem;
}
.badge-online { background: rgba(22, 163, 74, .12); color: #166534; }
.badge-offline { background: rgba(239, 68, 68, .10); color: #991b1b; }
.badge-maintenance { background: rgba(245, 158, 11, .16); color: #92400e; }
.badge-disabled { background: rgba(107, 114, 128, .12); color: #374151; }

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
}
.empty-state .empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 1rem;
  color: var(--brand-primary);
  background: rgba(27, 103, 255, .08);
}

.form-control,
.form-select,
textarea {
  border-radius: 14px !important;
  min-height: 48px;
  border-color: rgba(103, 124, 170, 0.2) !important;
  box-shadow: none !important;
}
textarea.form-control { min-height: 108px; }
.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: rgba(27,103,255,.36) !important;
  box-shadow: 0 0 0 .25rem rgba(27,103,255,.11) !important;
}

.btn {
  border-radius: 14px;
  font-weight: 700;
  padding: .78rem 1rem;
}
.btn-sm {
  border-radius: 12px;
  padding: .55rem .85rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border: none;
  box-shadow: 0 12px 24px rgba(27,103,255,.20);
}
.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #165cea, #16afe7);
  box-shadow: 0 14px 28px rgba(27,103,255,.24);
}
.btn-light-soft {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.24);
  color: #fff;
}
.btn-light-soft:hover { color: #fff; background: rgba(255,255,255,.25); }

.alert {
  border: none;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.alert-success { background: linear-gradient(135deg, rgba(22,163,74,.12), rgba(34,197,94,.18)); color: #14532d; }
.alert-danger { background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(248,113,113,.18)); color: #7f1d1d; }
.alert-info { background: linear-gradient(135deg, rgba(14,165,233,.10), rgba(6,182,212,.14)); color: #164e63; }

.modal-content {
  border: 1px solid rgba(103, 124, 170, 0.14);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(15, 35, 95, 0.22);
}
.modal-header,
.modal-footer {
  border-color: rgba(103, 124, 170, 0.14);
  padding: 1rem 1.2rem;
}
.modal-body { padding: 1.15rem 1.2rem; }
.modal-title { font-weight: 800; color: #12203f; }

.confirm-modal-hero {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(27,103,255,.12), rgba(32,192,255,.16));
  color: var(--brand-primary);
  font-size: 1.7rem;
}

.copy-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(15, 23, 42, .04);
  padding: .55rem .8rem;
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .84rem;
}

.list-status {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.reveal-delay-1 { animation-delay: .08s; }
.reveal-delay-2 { animation-delay: .16s; }
.reveal-delay-3 { animation-delay: .24s; }
.reveal-delay-4 { animation-delay: .32s; }
.reveal-delay-5 { animation-delay: .40s; }

.float-soft {
  animation: floatSoft 5.5s ease-in-out infinite;
}

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatSoft {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.login-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(27,103,255,.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(32,192,255,.20), transparent 24%),
    linear-gradient(135deg, #071126 0%, #0b1730 42%, #0a1f4b 100%);
}
.login-shell .login-card {
  background: rgba(255,255,255,.98);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  overflow: hidden;
}
.login-brand-panel {
  background: linear-gradient(180deg, rgba(27,103,255,.97), rgba(32,192,255,.92));
  color: #fff;
  position: relative;
}
.login-brand-panel::before,
.login-brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.login-brand-panel::before { width: 230px; height: 230px; top: -80px; right: -80px; }
.login-brand-panel::after { width: 190px; height: 190px; bottom: -80px; left: -70px; }
.login-feature {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}
.login-feature-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.18);
}

@media (min-width: 992px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    visibility: visible !important;
    transform: none !important;
  }
  .page-shell { padding: 1.5rem; }
}

@media (max-width: 991.98px) {
  .sidebar { width: min(88vw, 320px) !important; }
  .page-shell { padding: 1rem; }
  .sidebar-logo-wrap { max-width: 220px; }
  .page-hero { padding: 1.2rem; }
}
/* COMPACT PROFESSIONAL LOGIN CARD */

.professional-login-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.professional-login-card {
    width: 100%;
    max-width: 430px;
    padding: 28px 32px;
    border: 1px solid rgba(111, 135, 173, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 24px 65px rgba(26, 57, 106, 0.14);
    backdrop-filter: blur(20px);
    animation:
        professionalCardEnter 0.7s
        cubic-bezier(0.2, 0.75, 0.2, 1)
        both;
}

/* Smaller logo section */
.login-card-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 220px;
    min-height: 72px;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 16px;
    background: linear-gradient(
        180deg,
        #ffffff,
        #f6faff
    );
    border: 1px solid rgba(90, 123, 171, 0.12);
    box-shadow:
        0 10px 24px rgba(39, 74, 129, 0.09);
}

.login-card-logo {
    display: block;
    width: 100%;
    max-width: 190px;
    height: auto;
    object-fit: contain;
}

.login-admin-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #1967d7;
    background: #edf5ff;
    border: 1px solid #dcecff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.login-card-header h1 {
    margin: 0 0 5px;
    color: #15213a;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.login-card-header p {
    max-width: 320px;
    margin: 0 auto;
    color: #74829d;
    font-size: 13px;
    line-height: 1.45;
}

/* Compact form */
.professional-login-form {
    display: grid;
    gap: 14px;
}

.professional-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #293650;
    font-size: 12px;
    font-weight: 700;
}

.professional-input-wrapper input {
    width: 100%;
    height: 46px;
    padding: 0 46px;
    border: 1px solid #dce4ef;
    border-radius: 13px;
    outline: none;
    color: #17223b;
    background: #ffffff;
    font-size: 13px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.professional-input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 2;
    color: #8491aa;
    transform: translateY(-50%);
}

.professional-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: #8390a6;
    background: transparent;
    transform: translateY(-50%);
}

/* Shorter button */
.professional-login-button {
    width: 100%;
    height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 2px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #145ecb,
            #159edf
        );
    box-shadow:
        0 12px 25px rgba(22, 104, 209, 0.20);
    font-size: 13px;
    font-weight: 800;
}

/* Compact footer and security note */
.login-security-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    color: #8a96aa;
    font-size: 11px;
    text-align: center;
}

.login-card-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #edf1f6;
    color: #9aa4b7;
    font-size: 10px;
    text-align: center;
}

/* Smaller error alert */
.professional-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 13px;
    color: #922f3a;
    background: #fff2f3;
    border: 1px solid #ffd9dc;
}