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

*, *::before, *::after {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input, textarea, select, pre, code, .input-copy-wrapper, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

:root {
  --bg-dark: #070709;
  --panel-bg: rgba(13, 13, 17, 0.72);
  --sidebar-bg: rgba(9, 9, 13, 0.88);
  --border-color: rgba(128, 90, 213, 0.16);
  --border-hover: rgba(128, 90, 213, 0.42);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  --primary-glow: linear-gradient(135deg, #8a5cf6 0%, #4f46e5 100%);
  --primary-color: #805ad5;
  --primary-hover: #9f7aea;
  
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}

img {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  pointer-events: none !important;
}

::selection {
  background: rgba(138, 92, 246, 0.4);
  color: #ffffff;
}

/* Custom Cyber Dark Glass Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(7, 7, 9, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(138, 92, 246, 0.35);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 92, 246, 0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 15% 10%, rgba(128, 90, 213, 0.08) 0%, transparent 45%),
                    radial-gradient(circle at 85% 85%, rgba(79, 70, 229, 0.07) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Cyber Dark Glassmorphism card */
.glass-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55), 0 0 24px rgba(128, 90, 213, 0.12);
}

/* Glowing text */
.glow-text {
  color: #fff;
}

/* Authentication Page layout */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  padding: 35px 30px;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-header {
  text-align: center;
  margin-bottom: 25px;
}

.auth-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 5px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: rgba(7, 7, 10, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: #8a5cf6;
  box-shadow: 0 0 0 3px rgba(138, 92, 246, 0.18);
}

/* Change autofill colors to match dark theme */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #09090b inset !important;
  -webkit-text-fill-color: var(--text-main) !important;
  transition: background-color 5000s ease-in-out 0s;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888d96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 35px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #8a5cf6 0%, #4f46e5 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(138, 92, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9f7aea 0%, #6366f1 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(138, 92, 246, 0.45);
}

.btn-secondary {
  background: rgba(20, 20, 28, 0.85);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(128, 90, 213, 0.14);
  border-color: var(--border-hover);
}

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

.btn-danger:hover {
  background: #dc2626;
}

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

.btn-warning:hover {
  background: #b45309;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.btn-full {
  width: 100%;
}

/* Dashboard Layout Grid */
.dashboard-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* LEFT SIDEBAR */
.sidebar {
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding-left: 8px;
}

.logo-text {
  font-size: 1.35rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: #fff;
}

.app-selector-container {
  margin-bottom: 24px;
  padding: 0 4px;
}

.selector-control {
  background: #15161c !important;
  border-color: var(--border-color) !important;
  font-weight: 500;
  font-size: 0.82rem;
}

.sidebar-menu {
  list-style: none;
  flex: 1;
}

.sidebar-menu li {
  margin-bottom: 3px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.sidebar-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
  padding-left: 18px;
}

.sidebar-menu li.active a {
  background: rgba(126, 12, 232, 0.08);
  color: #961eff;
  border-left-color: #961eff;
  padding-left: 18px;
}

.user-profile {
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.profile-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-logo {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.user-profile .name {
  font-weight: 600;
  font-size: 0.82rem;
  color: #fff;
}

.user-profile .role {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* MAIN MAIN CONTENT AREA */
.main-content {
  padding: 30px 40px;
  overflow-y: auto;
  background: var(--bg-dark);
}

/* TOP NAV BAR */
.top-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.top-search-input {
  background: #111217;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  width: 250px;
  outline: none;
}

.top-search-input:focus {
  border-color: var(--primary-color);
}

.top-user-avatar-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111217;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.nav-avatar {
  height: 24px;
  width: 24px;
  border-radius: 50%;
}

.nav-user-text {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
}

/* BREADCRUMB */
.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.crumb-home {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

.crumb-current {
  color: #fff;
}

.crumb-separator {
  font-size: 0.7rem;
}

.view-header-title-container {
  margin-bottom: 25px;
}

.view-header-title-container h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
}

.view-header-title-container p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.stat-card .label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 1.85rem;
  font-weight: 700;
  margin-top: 4px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
}

/* SECTION GRIDS & LISTS */
.dashboard-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.dashboard-section.active {
  display: block;
}

.section-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .section-grid {
    grid-template-columns: 1fr;
  }
}

/* Credentials Copy inputs style */
.input-copy-wrapper {
  display: flex;
  position: relative;
}

.readonly-input {
  background: #09090b !important;
  color: var(--text-muted) !important;
  padding: 12px 44px 12px 14px !important;
  border-color: var(--border-color) !important;
  font-size: 0.88rem !important;
  height: auto !important;
}

.cred-field-box {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.cred-field-box label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
  font-weight: 600;
}

.copy-btn-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.copy-btn-icon:hover {
  color: #fff;
}

.toggle-snippet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Switch slider helper */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #27272a;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

.slider.round {
  border-radius: 20px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Notice Info boxes */
.notice-info-box-blue {
  background: rgba(126, 12, 232, 0.08);
  border: 1px solid rgba(126, 12, 232, 0.2);
  border-radius: 8px;
  padding: 15px;
  color: #93c5fd;
}

.notice-info-box-orange {
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 8px;
  padding: 15px;
  color: #fcd34d;
}

/* Apps dynamic v-stack */
.apps-list-v-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.app-listing-card-keyauth {
  background: #15161c;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.app-listing-card-keyauth .card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-listing-card-keyauth .app-name-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.app-listing-card-keyauth .info-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.app-listing-card-keyauth .stat-box {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
}

.app-listing-card-keyauth .stat-box .box-lbl {
  color: var(--text-muted);
}

.app-listing-card-keyauth .stat-box .box-val {
  color: #fff;
  font-weight: 600;
  margin-top: 3px;
}

.app-listing-card-keyauth .actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Action button coloring */
.btn-select-selected { background: #0e9f6e; color: #fff; }
.btn-select-unselected { background: #27272a; color: #fff; }
.btn-rename { background: #7e3af2; color: #fff; }
.btn-edit-desc { background: #0694a2; color: #fff; }
.btn-pause { background: #d03801; color: #fff; }
.btn-delete-card { background: #e02424; color: #fff; }

.btn-select-selected:hover, .btn-select-unselected:hover,
.btn-rename:hover, .btn-edit-desc:hover,
.btn-pause:hover, .btn-delete-card:hover {
  filter: brightness(1.1);
  transform: translateY(-0.5px);
}

/* User Card Grid Layout */
.users-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 1200px) {
  .users-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .users-grid-container {
    grid-template-columns: 1fr;
  }
}

.user-card-keyauth {
  background: #15161c;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  position: relative;
  transition: border-color 0.2s ease;
}

.user-card-keyauth:hover {
  border-color: var(--border-hover);
}

.user-card-keyauth .card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.user-card-keyauth .user-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-card-keyauth .card-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 0.78rem;
}

.user-card-keyauth .detail-row {
  display: flex;
  justify-content: space-between;
}

.user-card-keyauth .detail-lbl {
  color: var(--text-muted);
}

.user-card-keyauth .detail-val {
  color: #e5e7eb;
  font-weight: 500;
  font-family: monospace;
}

/* Tables style */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #09090b;
  margin-top: 15px;
}

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

table th {
  padding: 12px 16px;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #111217;
}

table td {
  padding: 12px 16px;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.badge-danger { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.badge-warning { background: rgba(217, 119, 6, 0.12); color: #fcd34d; }
.badge-secondary { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.badge-purple { background: rgba(126, 58, 242, 0.15); color: #c084fc; }

/* Modals Overlay card */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: translateY(10px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.close-modal-btn:hover {
  color: #fff;
}

/* Event logs segmented tab button */
.logs-tabs-container {
  display: flex;
  background: #111217;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}

.log-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.log-tab-btn.active {
  background: #27272a;
  color: #fff;
}

/* Alert notifications popups */
.alert-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: 8px;
  color: #fff;
  z-index: 1100;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.alert-success { background: #064e3b; color: #34d399; border-color: rgba(16, 185, 129, 0.2); }
.alert-error { background: #7f1d1d; color: #fca5a5; border-color: rgba(239, 68, 68, 0.2); }

@keyframes slideIn {
  from { transform: translateX(120%); }
  to { transform: translateX(0); }
}

.user-action-buttons-bar {
  display: flex;
  gap: 6px;
  background: #111217;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.action-bar-btn {
  height: 32px;
  width: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  color: #fff;
  background: none;
  transition: all 0.2s ease;
}

.action-bar-btn:hover {
  filter: brightness(1.2);
  transform: translateY(-0.5px);
}

.btn-filter { background: rgba(30, 58, 138, 0.4); border-color: rgba(30, 58, 138, 0.6); }
.btn-layout { background: rgba(39, 39, 42, 0.4); border-color: rgba(63, 63, 70, 0.6); }
.btn-add-user { background: rgba(6, 78, 59, 0.4); border-color: rgba(6, 78, 59, 0.6); }
.btn-cooldown { background: rgba(30, 58, 138, 0.4); border-color: rgba(30, 58, 138, 0.6); }
.btn-history { background: rgba(120, 80, 20, 0.4); border-color: rgba(120, 80, 20, 0.6); }
.btn-export { background: rgba(88, 28, 135, 0.4); border-color: rgba(88, 28, 135, 0.6); }
.btn-import { background: rgba(124, 45, 18, 0.4); border-color: rgba(124, 45, 18, 0.6); }
.btn-hwid-reset { background: rgba(120, 80, 20, 0.4); border-color: rgba(120, 80, 20, 0.6); }
.btn-trash { background: rgba(153, 27, 27, 0.4); border-color: rgba(153, 27, 27, 0.6); }

.form-group-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.info-icon {
  color: #961eff;
  font-size: 1.1rem;
  cursor: help;
  padding-bottom: 8px;
}

.card-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: #0f1015;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  min-width: 110px;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  flex-direction: column;
  padding: 4px 0;
}

.card-dropdown-menu.active {
  display: flex;
}

.card-dropdown-menu a {
  padding: 8px 12px;
  color: #c8cbd0;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
  transition: all 0.15s ease;
}

.card-dropdown-menu a:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}

/* App Cards keyauth styling */
.app-listing-card-keyauth {
  background: #111217 !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
  border-radius: 8px !important;
  padding: 20px !important;
  margin-bottom: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
}

.app-listing-card-keyauth .card-title-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.app-listing-card-keyauth .app-name-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #fff !important;
}

.app-listing-card-keyauth .actions-row {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

/* Action button colors overrides */
.app-listing-card-keyauth .btn-select-unselected {
  background: #374151 !important;
  color: #fff !important;
  border: none !important;
}
.app-listing-card-keyauth .btn-select-unselected:hover {
  background: #4b5563 !important;
}

.app-listing-card-keyauth .btn-select-selected {
  background: #16a34a !important;
  color: #fff !important;
  border: none !important;
}
.app-listing-card-keyauth .btn-select-selected:hover {
  background: #15803d !important;
}

.app-listing-card-keyauth .btn-rename {
  background: #b05cff !important;
  color: #fff !important;
  border: none !important;
}
.app-listing-card-keyauth .btn-rename:hover {
  background: #6d28d9 !important;
}

.app-listing-card-keyauth .btn-edit-desc {
  background: #0891b2 !important;
  color: #fff !important;
  border: none !important;
}
.app-listing-card-keyauth .btn-edit-desc:hover {
  background: #0e7490 !important;
}

.app-listing-card-keyauth .btn-pause {
  background: #ea580c !important;
  color: #fff !important;
  border: none !important;
}
.app-listing-card-keyauth .btn-pause:hover {
  background: #d97706 !important;
}

.app-listing-card-keyauth .btn-delete-card {
  background: #dc2626 !important;
  color: #fff !important;
  border: none !important;
}
.app-listing-card-keyauth .btn-delete-card:hover {
  background: #b91c1c !important;
}

.notice-info-box-blue {
  background: rgba(126, 12, 232,0.06) !important;
  border-left: 4px solid #7e0ce8 !important;
  padding: 12px 16px !important;
  border-radius: 4px !important;
  color: #c7d2fe !important;
}
.notice-info-box-blue strong {
  color: #fff !important;
  font-size: 0.85rem !important;
  display: block !important;
  margin-bottom: 4px !important;
}

/* Profile Dropdown KeyAuth style */
.profile-dropdown-menu-keyauth {
  display: none;
  position: absolute;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  background: #0f1015 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 6px !important;
  min-width: 180px !important;
  z-index: 1000 !important;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6) !important;
  flex-direction: column !important;
  padding: 6px 0 !important;
}

.profile-dropdown-menu-keyauth.active {
  display: flex !important;
}

.profile-dropdown-header {
  padding: 8px 16px !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  margin-bottom: 4px !important;
  text-align: left !important;
}

.profile-dropdown-menu-keyauth a {
  padding: 10px 16px !important;
  color: #a1a1aa !important;
  text-decoration: none !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.15s ease !important;
  text-align: left !important;
}

.profile-dropdown-menu-keyauth a svg {
  color: #71717a !important;
  transition: color 0.15s ease !important;
  flex-shrink: 0 !important;
}

.profile-dropdown-menu-keyauth a:hover {
  background: rgba(255,255,255,0.03) !important;
  color: #fff !important;
}

.profile-dropdown-menu-keyauth a:hover svg {
  color: #fff !important;
}

.dropdown-divider {
  height: 1px !important;
  background: rgba(255,255,255,0.04) !important;
  margin: 6px 0 !important;
}

/* Edit User Tabs styling */
.edit-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted) !important;
  padding: 8px 12px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  text-align: center !important;
}

.edit-tab-btn.active {
  background: #374151 !important;
  color: #fff !important;
}

.edit-tab-content {
  display: none;
}

.edit-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* Responsive adjustment */
@media (max-width: 900px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .main-content {
    padding: 20px;
  }
}

/* ==========================================
   KEYAUTH-STYLE CREDENTIALS PANEL REDESIGN
   ========================================== */
.keyauth-cred-card {
  background: #111217 !important; /* Lighter dark theme card background matching KeyAuth */
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-radius: 8px !important;
  padding: 16px 18px !important;
  margin-bottom: 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  position: relative !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.keyauth-cred-card:hover {
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

.keyauth-cred-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: calc(100% - 32px) !important;
}

.keyauth-cred-label {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #8a8d98 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  display: block !important;
  margin-bottom: 2px !important;
}

.keyauth-cred-value {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  outline: none !important;
  box-shadow: none !important;
  width: 100% !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.keyauth-cred-value.readonly-val {
  user-select: all !important;
}

.keyauth-copy-btn {
  background: transparent !important;
  border: none !important;
  color: #8a8d98 !important;
  cursor: pointer !important;
  padding: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.2s ease !important;
  border-radius: 4px !important;
}

.keyauth-copy-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.keyauth-obfuscated {
  filter: blur(5px);
  transition: filter 0.25s ease-in-out !important;
  cursor: pointer !important;
}

.keyauth-obfuscated:hover,
.keyauth-obfuscated:focus {
  filter: blur(0) !important;
}

/* Horizontal scroll container for the application secret */
.keyauth-secret-scroll-container {
  overflow-x: auto !important;
  white-space: nowrap !important;
  width: 100% !important;
  padding-bottom: 4px !important;
  display: block !important;
}

.keyauth-secret-scroll-container::-webkit-scrollbar {
  height: 4px !important;
}

.keyauth-secret-scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02) !important;
  border-radius: 2px !important;
}

.keyauth-secret-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12) !important;
  border-radius: 2px !important;
}

.keyauth-secret-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* Keyauth Warn Button Style */
.keyauth-btn-warning {
  background: #b45309 !important; /* Amber 700 */
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 12px 18px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  width: 100% !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  transition: background 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.keyauth-btn-warning:hover {
  background: #92400e !important; /* Amber 800 */
}

/* Keyauth Primary Button Style */
.keyauth-btn-primary {
  background: #7e0ce8 !important; /* Matching primary color */
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 12px 18px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  width: 100% !important;
  margin-bottom: 10px !important;
  transition: background 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.keyauth-btn-primary:hover {
  background: #6b0bc8 !important;
}

/* Keyauth Blue Notice Box */
.keyauth-notice-box {
  background: #172554 !important; /* Slate Blue Dark */
  border-left: 4px solid #3b82f6 !important; /* Vibrant Blue */
  border-radius: 6px !important;
  padding: 16px !important;
  margin-top: 20px !important;
  display: flex !important;
  gap: 12px !important;
  color: #eff6ff !important;
  text-align: left !important;
}

.keyauth-notice-icon {
  color: #3b82f6 !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
  display: flex !important;
  align-items: center !important;
}

.keyauth-notice-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.keyauth-notice-title {
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  color: #ffffff !important;
}

.keyauth-notice-desc {
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
  color: #93c5fd !important;
}

.section-grid.no-app-selected {
  grid-template-columns: 1fr !important;
}

/* Responsive applications list header & card details on mobile */
@media (max-width: 600px) {
  .apps-header-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .apps-search-group {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .apps-search-group input,
  .apps-search-group select {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.app-listing-card-keyauth .info-stats-row {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 0.72rem !important;
  border-top: 1px solid rgba(255,255,255,0.02) !important;
  border-bottom: 1px solid rgba(255,255,255,0.02) !important;
  padding: 10px 0 !important;
  margin-bottom: 12px !important;
  gap: 8px !important;
}

@media (max-width: 480px) {
  .app-listing-card-keyauth .info-stats-row {
    font-size: 0.68rem !important;
    gap: 4px !important;
  }
}


/* =========================================================
   Cyber Dark Glass Custom Dropdown (Replaces Native Select)
   ========================================================= */
.nv-select-wrap {
  position: relative;
  width: 100%;
  user-select: none;
}

.nv-select-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.nv-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(13, 13, 18, 0.9);
  border: 1px solid rgba(128, 90, 213, 0.22);
  border-radius: 10px;
  color: #f3f4f6;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.nv-select-btn:hover {
  border-color: rgba(138, 92, 246, 0.5);
  background: rgba(20, 20, 28, 0.95);
}

.nv-select-wrap.open .nv-select-btn {
  border-color: #8a5cf6;
  box-shadow: 0 0 0 3px rgba(138, 92, 246, 0.18);
}

.nv-select-arrow {
  width: 15px;
  height: 15px;
  color: #9ca3af;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.nv-select-wrap.open .nv-select-arrow {
  transform: rotate(180deg);
  color: #a78bfa;
}

.nv-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(13, 13, 18, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(138, 92, 246, 0.28);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.72), 0 0 24px rgba(138, 92, 246, 0.14);
  max-height: 240px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.nv-select-wrap.open .nv-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nv-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #d1d5db;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nv-select-option:hover {
  background: rgba(138, 92, 246, 0.16);
  color: #ffffff;
}

.nv-select-option.selected {
  background: linear-gradient(135deg, rgba(138, 92, 246, 0.26), rgba(79, 70, 229, 0.22));
  color: #ffffff;
  font-weight: 600;
}

.nv-select-option.selected::after {
  content: '✓';
  font-size: 0.78rem;
  color: #a78bfa;
  font-weight: 700;
}
