/* =========================================
   OFFDEDI PREMIUM PANEL CSS
   Modern, Rich, and Dynamic Dashboard Style
   ========================================= */

:root {
  /* Panel Layout */
  --sidebar-width: 280px;
  --header-height: 80px;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 12px;

  /* Modern Colors & Effects */
  --panel-bg: #030307;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(13, 13, 22, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --primary-glow-subtle: rgba(34, 211, 238, 0.15);

  /* Status Colors (Rich) */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  /* Animations */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== BASE STYLES ========== */
.panel-page {
  background: var(--panel-bg);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
  min-height: 100vh;
  color: var(--text-main);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow-x: hidden;
}

/* ========== LOGIN / AUTH SCREEN ========== */
#authScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

#authScreen::before {
  content: '';
  position: absolute;
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
  top: -400px;
  right: -400px;
  z-index: 0;
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== SIDEBAR NAVIGATION ========== */
.sidebar {
  position: fixed;
  left: 20px;
  top: 20px;
  bottom: 20px;
  width: var(--sidebar-width);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.sidebar-nav {
  margin-top: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  transform: translateX(5px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--primary);
}

.nav-item.active i {
  filter: drop-shadow(0 0 8px var(--primary));
}

/* User Profile in Sidebar */
.user-profile {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
}

.user-name {
  font-weight: 700;
  color: var(--text-light);
  margin: 0;
  font-size: 1rem;
}

.user-role {
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ========== MAIN CONTENT AREA ========== */
.main-wrap {
  margin-left: calc(var(--sidebar-width) + 40px);
  padding: 30px 40px 40px 0;
  min-height: 100vh;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: var(--panel-bg);
  z-index: 900;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.page-title {
  margin: 0;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.action-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Sunucu modalı: donanım modu (şablon / sihirbaz / tüm alanlar) */
#srvSpecToolbar .action-btn {
  width: auto;
  height: auto;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

#srvSpecToolbar .action-btn.btn-spec-active {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25);
}

.notification-wrap {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--color-danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--panel-bg);
}

/* ========== DASHBOARD CARDS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 28px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
  opacity: 1;
}

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

.stat-label {
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-icon-wrap.primary {
  background: rgba(34, 211, 238, 0.1);
  color: var(--primary);
}

.stat-icon-wrap.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.stat-icon-wrap.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.stat-icon-wrap.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 12px 0 6px 0;
  letter-spacing: -1px;
  color: var(--text-light);
}

.stat-subtext {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* ========== DATA TABLES ========== */
.table-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-top: 24px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 20px 24px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--card-border);
}

.data-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

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

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-light);
}

/* ========== BADGES & TAGS ========== */
.badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
}

.badge-active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-suspended {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ========== BUTTONS ========== */
/* Activity Card */
.activity-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 32px;
}

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

.card-title {
  font-weight: 800;
  margin: 0;
  color: var(--text-light);
  font-size: 1.25rem;
}

/* Button variants */
.btn-sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  padding: 14px 28px;
  border-radius: var(--border-radius-md);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(34, 211, 238, 0.2);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(34, 211, 238, 0.3);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-primary.success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.btn-primary.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.btn-primary.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
}

.btn-primary.info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.profile-container {
  max-width: 600px;
  margin: 0 auto;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

/* ========== FORMS ========== */
.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
  display: block;
}

.form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 14px 18px;
  color: var(--text-light);
  width: 100%;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

/* ========== PROFILE SECTION ========== */
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 40px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-glow-subtle), rgba(99, 102, 241, 0.2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary);
  border: 2px solid var(--glass-border);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.user-name-large {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-light);
  letter-spacing: -0.5px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .sidebar {
    left: -320px;
  }

  .sidebar.show {
    left: 20px;
  }

  .main-wrap {
    margin-left: 0 !important;
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .auth-card {
    padding: 32px 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}

/* ========== UTILITIES ========== */
.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Notifications Dropdown */
.notifications-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  width: 320px;
  max-height: 480px;
  overflow-y: auto;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: slideInDown 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--card-border);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-title {
  font-weight: 700;
  color: var(--text-light);
  margin: 0 0 6px 0;
  font-size: 0.95rem;
}

.notification-msg {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

.notification-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 10px;
  opacity: 0.6;
}

/* Alerts / Toasts */
.alert {
  position: fixed;
  top: 30px;
  right: 30px;
  padding: 18px 24px;
  border-radius: var(--border-radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  min-width: 320px;
  animation: alertIn 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes alertIn {
  from {
    opacity: 0;
    transform: translateX(50px);
    opacity: 0;
  }

  to {
    opacity: 1;
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes alertOut {
  from {
    opacity: 1;
    transform: translateX(0);
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateX(50px);
    opacity: 0;
  }
}

.alert-success {
  border-left: 5px solid var(--color-success);
}

.alert-error {
  border-left: 5px solid var(--color-danger);
}

.alert-warning {
  border-left: 5px solid var(--color-warning);
}

.alert-info {
  border-left: 5px solid var(--color-info);
}

.alert i {
  font-size: 1.5rem;
}

.alert-success i {
  color: var(--color-success);
}

.alert-error i {
  color: var(--color-danger);
}

.alert-warning i {
  color: var(--color-warning);
}

.alert-info i {
  color: var(--color-info);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
  animation: scaleUp 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}