/* ==========================================================================
   NetCheck CSS - Modern Premium Dark Mode Design
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #161f30;
  --bg-card: rgba(22, 31, 48, 0.65);
  --bg-input: #1f2d44;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  
  /* Text */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* Colors */
  --color-up: #10b981;
  --color-down: #ef4444;
  --color-unknown: #f59e0b;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-accent-rgb: 59, 130, 246;
  --color-up-rgb: 16, 185, 129;
  --color-down-rgb: 239, 68, 68;

  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Styling details */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
  --border-radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-input);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Layout Framework */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, border-right 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  background: linear-gradient(135deg, var(--color-accent) 0%, #6366f1 100%);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: white;
  box-shadow: 0 0 15px rgba(var(--color-accent-rgb), 0.3);
}

.brand-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
}

.nav-item a:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active a {
  color: white;
  background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-left: 3px solid var(--color-accent);
  padding-left: 15px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

.tv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 15px;
  transition: var(--transition);
}

.tv-btn:hover {
  background: #f59e0b;
  color: var(--bg-primary);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  padding: 40px;
  max-width: 1600px;
  width: calc(100% - 280px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Cards & Grid Layout */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.total::before { background-color: var(--color-accent); }
.stat-card.up::before { background-color: var(--color-up); }
.stat-card.down::before { background-color: var(--color-down); }
.stat-card.unknown::before { background-color: var(--color-unknown); }

.stat-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

/* Target Grid & Table styling */
.section-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 28px;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
}

/* Target Status Panel in Grid */
.target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.target-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.target-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--color-accent-rgb), 0.4);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.target-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.target-info {
  max-width: 70%;
}

.target-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.target-host {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-badge.up {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-up);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.down {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--color-down);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.unknown {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--color-unknown);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.up::before { background-color: var(--color-up); }
.status-badge.down::before { background-color: var(--color-down); }
.status-badge.unknown::before { background-color: var(--color-unknown); }

.target-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.metric-box {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}

.metric-value.latency {
  color: #3b82f6;
}

.target-card-footer {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: auto;
}

.ping-source-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  background-color: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Button & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 0 15px rgba(var(--color-accent-rgb), 0.3);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background-color: var(--color-down);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
}

/* Forms & Modals */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: white;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.25);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Tables styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.custom-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Responsive Table Mobile View */
@media (max-width: 768px) {
  .custom-table thead {
    display: none;
  }
  
  .custom-table tbody, .custom-table tr, .custom-table td {
    display: block;
    width: 100%;
  }

  .custom-table tbody tr {
    margin-bottom: 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 8px;
  }
  
  .custom-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 12px 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  }
  
  .custom-table td:last-child {
    border-bottom: none;
  }
  
  .custom-table td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    margin-right: 16px;
  }

  .custom-table td:not([data-label]) {
    justify-content: center;
    text-align: center;
  }
}

/* Modal layout */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 500px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-premium);
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Styled scrollbar for modal content */
.modal-content::-webkit-scrollbar {
  width: 6px;
}
.modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: white;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

/* Target detail custom metrics */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(var(--color-up-rgb), 0.2); }
  50% { box-shadow: 0 0 20px rgba(var(--color-up-rgb), 0.5); }
}

.pulse-up {
  animation: pulseGlow 2s infinite;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

html.mobile-sidebar-open .sidebar-overlay {
  display: block;
  opacity: 1;
}

/* Media Query for Tablets and Mobile */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    height: 100vh;
    z-index: 1000;
    box-shadow: 20px 0 30px rgba(0, 0, 0, 0.5);
  }
  
  html.mobile-sidebar-open .sidebar {
    left: 0;
  }

  .main-content {
    width: 100%;
    max-width: 100%;
    padding: 24px 16px;
  }
  
  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }
  
  .content-header > div:first-child {
    align-items: flex-start !important;
  }
  
  .btn-toggle {
    margin-top: 4px;
  }
  
  .content-header > div:last-child {
    width: 100%;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-label {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .stat-value {
    font-size: 24px;
  }
  
  .target-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .target-card {
    padding: 16px;
    gap: 12px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .section-card {
    padding: 20px 16px;
  }

  .modal-content {
    padding: 24px 20px;
  }
}

/* Specific styling for smaller phones */
@media (max-width: 480px) {
  .page-title {
    font-size: 22px;
  }
  .stat-value {
    font-size: 28px;
  }
  .target-metrics {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   User Profile & Logout Sidebar Styling
   ========================================================================== */
.active-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent) 0%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 10px;
  color: var(--text-muted);
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  width: 100%;
  transition: var(--transition);
}

.logout-btn:hover {
  background: #ef4444;
  color: white;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.footer-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.footer-actions > a,
.footer-actions > button {
  flex: 1;
  width: auto;
}

.change-password-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.change-password-btn:hover {
  background: rgba(var(--color-accent-rgb), 0.15);
  color: var(--color-accent);
  border-color: rgba(var(--color-accent-rgb), 0.3);
}

/* ==========================================================================
   Login Page Custom Styling
   ========================================================================== */
.login-body {
  background: radial-gradient(circle at top right, #111827, #0b0f19);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  perspective: 1000px;
}

.login-card {
  background: rgba(22, 31, 48, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 40px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
              0 0 40px rgba(59, 130, 246, 0.05);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.login-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0%, #6366f1 50%, #d946ef 100%);
}

.login-card:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6), 
              0 0 50px rgba(59, 130, 246, 0.15);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  background: linear-gradient(135deg, var(--color-accent) 0%, #6366f1 100%);
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 20px rgba(var(--color-accent-rgb), 0.4);
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: white;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  animation: alertFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes alertFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.input-container {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: var(--transition);
}

.login-input {
  padding-left: 42px !important;
}

.login-input:focus + .input-icon {
  color: var(--color-accent);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #4f46e5 100%);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(var(--color-accent-rgb), 0.25);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--color-accent-hover) 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--color-accent-rgb), 0.35);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   User Management Roles Badges
   ========================================================================== */
.badge-role {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-role.admin {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-role.viewer {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Sidebar Collapse and Toggle Button Custom Styling
   ========================================================================== */
.btn-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: scale(1.05);
}

.btn-toggle:active {
  transform: scale(0.95);
}

@media (min-width: 1025px) {
  html.sidebar-collapsed .sidebar {
    width: 80px;
    padding: 24px 10px;
    align-items: center;
    overflow: hidden;
  }

  html.sidebar-collapsed .main-content {
    width: calc(100% - 80px);
    max-width: calc(100% - 80px);
  }

  /* Hide text elements in collapsed sidebar */
  html.sidebar-collapsed .brand-text,
  html.sidebar-collapsed .tv-btn span,
  html.sidebar-collapsed .sidebar-nav .nav-item a span,
  html.sidebar-collapsed .sidebar-footer .user-details,
  html.sidebar-collapsed .sidebar-footer .logout-btn span,
  html.sidebar-collapsed .sidebar-footer .change-password-btn span,
  html.sidebar-collapsed .sidebar-footer p span,
  html.sidebar-collapsed .sidebar-footer p:nth-child(2) {
    display: none !important;
  }

  /* Layout centering for collapsed state */
  html.sidebar-collapsed .brand {
    margin-bottom: 30px;
    justify-content: center;
    gap: 0;
  }

  html.sidebar-collapsed .tv-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    margin-bottom: 24px;
    gap: 0;
  }

  html.sidebar-collapsed .sidebar-nav {
    align-items: center;
    width: 100%;
  }

  html.sidebar-collapsed .sidebar-nav .nav-item {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  html.sidebar-collapsed .nav-item a {
    padding: 14px 0;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    gap: 0;
  }

  html.sidebar-collapsed .nav-item a i {
    font-size: 18px;
    margin: 0;
  }

  html.sidebar-collapsed .nav-item.active a {
    border-left: none !important;
    padding-left: 0 !important;
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.25) 0%, rgba(99, 102, 241, 0.1) 100%) !important;
  }

  html.sidebar-collapsed .sidebar-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding-top: 15px;
  }

  html.sidebar-collapsed .footer-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  html.sidebar-collapsed .active-user-info {
    background: transparent;
    border-color: transparent;
    padding: 0;
    margin-bottom: 0;
    justify-content: center;
    gap: 0;
  }

  html.sidebar-collapsed .logout-btn,
  html.sidebar-collapsed .change-password-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
  }
}
