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

:root {
  /* Core Colors */
  --bg-base: #06060c;
  --bg-surface: rgba(18, 18, 28, 0.65);
  --bg-surface-hover: rgba(28, 28, 42, 0.75);
  
  /* Accents (Premium Amber / Purple) */
  --accent-gold: #e2b714;
  --accent-gold-glow: rgba(226, 183, 20, 0.35);
  --accent-purple: #863ff9;
  --accent-purple-glow: rgba(134, 63, 249, 0.3);
  --accent-danger: #ff2a5f;
  --accent-success: #1ae27d;
  
  /* Text Colors */
  --text-main: #f8f9fc;
  --text-muted: #8b8e9d;
  
  /* Borders & Shadows */
  --glass-border: rgba(255, 255, 255, 0.04);
  --glass-border-strong: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5), 0 5px 15px -5px rgba(0,0,0,0.3);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(134, 63, 249, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(226, 183, 20, 0.05), transparent 25%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Background Glow Effects */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}
.glow-orb.purple {
  width: 400px;
  height: 400px;
  background: var(--accent-purple);
  top: -100px;
  left: -100px;
  opacity: 0.15;
  animation: pulse 8s infinite alternate;
}
.glow-orb.gold {
  width: 300px;
  height: 300px;
  background: var(--accent-gold);
  bottom: 0;
  right: -50px;
  opacity: 0.1;
  animation: pulse 12s infinite alternate-reverse;
}

@keyframes pulse {
  0% { transform: scale(1) translate(0, 0); opacity: 0.1; }
  100% { transform: scale(1.2) translate(20px, -20px); opacity: 0.2; }
}

/* Glass Panel Component */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255,255,255,0.08); /* highlight edge */
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  padding: 30px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  pointer-events: none;
}

/* Modern Inputs */
.h-input-group {
  margin-bottom: 20px;
  position: relative;
}

h-label, .h-input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.h-control {
  width: 100%;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border-strong);
  border-radius: 14px;
  color: var(--text-main);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
}

.h-control:focus {
  border-color: var(--accent-gold);
  background: rgba(226, 183, 20, 0.03);
  box-shadow: 0 0 0 4px var(--accent-gold-glow);
}

.h-control::placeholder {
  color: rgba(255, 255, 255, 0.5); /* Okunabilirliği 0.2'den 0.5'e çıkarıldı */
}

/* Custom Select */
select.h-control {
  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='%23e2b714' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px;
  cursor: pointer;
}
select.h-control option {
  background: var(--bg-base);
  color: var(--text-main);
}

/* Premium Buttons */
.h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.h-btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #c49c0c 100%);
  color: #000;
  box-shadow: 0 8px 25px var(--accent-gold-glow);
}

.h-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(226, 183, 20, 0.5);
  background: linear-gradient(135deg, #f5cd2d 0%, #d4a90d 100%);
}

.h-btn-purple {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #6830cc 100%);
  color: #fff;
  box-shadow: 0 8px 25px var(--accent-purple-glow);
}

.h-btn-purple:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(134, 63, 249, 0.4);
}

.h-btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border-strong);
}

.h-btn-outline:hover {
  border-color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.h-btn-block {
  width: 100%;
}

/* Utility Animations */
.h-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.h-slide-up {
  animation: slideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Badge / Pills */
.h-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.h-badge-success { background: rgba(26, 226, 125, 0.15); color: var(--accent-success); border: 1px solid rgba(26, 226, 125, 0.3); }
.h-badge-warning { background: rgba(226, 183, 20, 0.15); color: var(--accent-gold); border: 1px solid rgba(226, 183, 20, 0.3); }
.h-badge-danger { background: rgba(255, 42, 95, 0.15); color: var(--accent-danger); border: 1px solid rgba(255, 42, 95, 0.3); }

/* --- LOGIN PAGE SPECIFIC --- */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 10;
}

.h-brand {
  text-align: center;
  margin-bottom: 40px;
}
.h-brand h1 {
  font-size: 2.8rem;
  color: #fff;
  background: linear-gradient(to right, #fff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.h-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 5px;
}

.role-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  background: rgba(0,0,0,0.3);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.role-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 0;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.role-btn:hover {
  color: var(--text-main);
}

.role-btn.active {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
}

/* --- DASHBOARD LAYOUT --- */
.h-dashboard {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

.h-sidebar {
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
  z-index: 20;
}

.h-sidebar-brand {
  margin-bottom: 40px;
  padding: 0 10px;
}
.h-sidebar-brand h2 {
  font-size: 1.8rem;
  background: linear-gradient(to right, #fff, var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.h-nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 20px;
  border-radius: 14px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

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

.h-nav-item.active {
  background: linear-gradient(90deg, rgba(226, 183, 20, 0.1) 0%, transparent 100%);
  color: var(--accent-gold);
  border-left: 3px solid var(--accent-gold);
}
.h-nav-item.active.purple-theme {
  background: linear-gradient(90deg, rgba(134, 63, 249, 0.1) 0%, transparent 100%);
  color: var(--accent-purple);
  border-left: 3px solid var(--accent-purple);
}

.h-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  padding: 30px 40px;
}

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

.h-header-title h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}
.h-header-title p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.h-user-menu {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(0,0,0,0.3);
  padding: 8px 20px 8px 8px;
  border-radius: 30px;
  border: 1px solid var(--glass-border);
}

.h-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.h-user-info {
  display: flex;
  flex-direction: column;
}
.h-user-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.h-user-role {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* Dashboard Cards */
.h-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.h-stat-card {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.h-stat-card::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.02), transparent);
}

.h-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
}

.h-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.icon-gold { background: rgba(226, 183, 20, 0.1); color: var(--accent-gold); }
.icon-purple { background: rgba(134, 63, 249, 0.1); color: var(--accent-purple); }
.icon-success { background: rgba(26, 226, 125, 0.1); color: var(--accent-success); }

.h-stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: -1px;
}

/* Tables */
.h-table-container {
  overflow-x: auto;
}
h-table, .h-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
}

.h-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--glass-border-strong);
}

.h-table td {
  padding: 18px 20px;
  background: rgba(255,255,255,0.01);
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.95rem;
  transition: var(--transition);
}

.h-table tr:hover td {
  background: rgba(255,255,255,0.03);
}

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

.h-action-btn {
  background: rgba(255,255,255,0.05);
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.h-action-btn:hover {
  background: var(--accent-purple);
  color: #fff;
}
.h-action-btn.success:hover {
  background: var(--accent-success);
  color: #000;
}
.h-action-btn.danger:hover {
  background: var(--accent-danger);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 992px) {
  /* Dashboard general layout */
  .h-dashboard {
    flex-direction: column;
    min-height: auto;
  }
  
  /* Top Navigation / Sidebar becomes a horizontal wrap list */
  .h-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 15px;
    z-index: 50;
  }
  
  .h-sidebar-brand {
    margin-bottom: 20px;
    text-align: center;
  }
  
  .h-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .h-nav-item {
    flex: 1 1 calc(50% - 10px);
    justify-content: flex-start; /* Orta değil sola dayalı */
    padding: 12px 15px;
    font-size: 0.85rem;
    border-radius: 10px;
    border-left: none !important;
    border-bottom: 3px solid transparent;
  }
  
  /* Reset auto margin for Profil Ayarlari */
  .h-nav-item[style*="margin-top:auto"], 
  .h-nav-item[style*="margin-top: auto"] {
    margin-top: 0 !important;
  }

  .h-nav-item.active {
    border-bottom-color: var(--accent-gold);
    background: rgba(226, 183, 20, 0.1) !important;
  }
  
  .h-nav-item.active.purple-theme {
    border-bottom-color: var(--accent-purple);
    background: rgba(134, 63, 249, 0.1) !important;
  }

  /* Main Area Adjustments */
  .h-main {
    padding: 20px 15px;
  }
  
  .h-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .h-user-menu {
    width: 100%;
    justify-content: center;
  }
  
  /* Cards & Grids */
  .h-stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .glass-panel {
    padding: 20px;
    border-radius: 15px;
  }

  /* Matrix Layouts */
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Table container scroll fix */
  .h-table-container {
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }
  
  .h-table th, .h-table td {
    padding: 12px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  /* Smaller screens */
  .h-brand h1 {
    font-size: 2.2rem;
  }
  
  .role-selector {
    flex-direction: column;
  }
  
  .h-nav-item {
    flex: 1 1 100%;
  }

  .h-stat-value {
    font-size: 1.8rem;
  }
}
