/* Modern CyberSecurity Theme - style.css */
:root {
  /* Light Theme Defaults */
  --bg-color: #f4f7fa;
  --card-bg: #ffffff;
  --header-bg: #ffffff;
  --primary-color: #1a202c;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --border-color: #e2e8f0;
  --input-bg: #ffffff;
  --accent-color: #2563eb;
  --accent-light: rgba(37, 99, 235, 0.1);
  --accent-dark: #1d4ed8;
  --success-color: #16a34a;
  --danger-color: #dc2626;
  --warning-color: #d97706;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --header-bg: #1e293b;
  --primary-color: #f8fafc;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --input-bg: #334155;
  --accent-color: #60a5fa;
  --accent-light: rgba(96, 165, 250, 0.2);
  --accent-dark: #3b82f6;
}

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

body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
}

/* Layout */
.main-body {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* Topbar - Modern Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--header-bg);
  height: 70px;
  padding: 0 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 36px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--accent-color), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-item:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.nav-item i {
  font-size: 1.1rem;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-primary);
  margin-right: 1rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.card-header {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--text-primary);
  transition: var(--transition);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
}

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

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

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.table th {
  background: var(--accent-light);
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.table td {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border-left: 4px solid transparent;
}

.alert-success {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-color);
  border-left-color: var(--success-color);
}

.alert-error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger-color);
  border-left-color: var(--danger-color);
}

/* Auth Pages */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
  background: var(--bg-color);
}

.auth-card {
  width: 100%;
  max-width: 450px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
}

.auth-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  text-align: center;
}

.auth-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-color);
}

.badge-danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger-color);
}

.badge-info {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
  .topbar {
    padding: 0 1rem;
  }
  
  .nav-item {
    margin-right: 1rem;
    font-size: 0.9rem;
  }
  
  .auth-card {
    padding: 1.5rem;
  }
  
  .table {
    display: block;
    overflow-x: auto;
  }
}

/* Special Table Styles */
.fixed-table {
  table-layout: fixed;
}

.fixed-table th:nth-child(1),
.fixed-table td:nth-child(1) { width: 15%; }
.fixed-table th:nth-child(2),
.fixed-table td:nth-child(2) { width: 45%; }
.fixed-table th:nth-child(3),
.fixed-table td:nth-child(3) { width: 15%; }
.fixed-table th:nth-child(4),
.fixed-table td:nth-child(4) { width: 12.5%; }
.fixed-table th:nth-child(5),
.fixed-table td:nth-child(5) { width: 12.5%; }

.actions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* Form Improvements */
.new-user-form {
  background: var(--card-bg);
  padding: 1.5rem;
  margin: 1.5rem auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 800px;
}

.new-user-form form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.new-user-form .form-group {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

/* Transition Effects */
html {
  scroll-behavior: smooth;
}

* {
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

/* Tarih sütunu için */
.table td:first-child {
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Time-range select özelleştirmesi */
select#time-range {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232563eb'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* Ana sayfa özel stilleri */
.hero-section {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 4rem 0;
}

.hero-content {
  flex: 1;
}

.hero-image {
  flex: 1;
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.section-title {
  text-align: center;
  margin: 3rem 0 2rem;
  font-size: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
}
/* Auth Pages */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.auth-header p {
  color: var(--text-secondary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent-color);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.api-error {
    color: #dc3545;
    padding: 10px;
    background: #ffecec;
    border-radius: 4px;
}

.danger {
    color: #dc3545;
    font-weight: bold;
}

.safe {
    color: #28a745;
}

.detected-vendors ul {
    list-style: none;
    padding: 0;
}

.detected-vendors li {
    padding: 5px;
    margin: 3px 0;
    background: #fff5f5;
    border-left: 3px solid #dc3545;
}

.vt-report-link {
    display: block;
    margin-top: 15px;
    color: #0366d6;
}

/* ===== User Administration Specific Styles ===== */
.user-admin-container {
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.user-admin-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.create-user-card {
  background: var(--card-bg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.create-user-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.user-table-container {
  overflow-x: auto;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  color: var(--text-primary);
}

.user-table th {
  background: var(--accent-light);
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.user-table td {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.user-table input,
.user-table select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text-primary);
}

.status-badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 50rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-color);
}

.status-inactive {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger-color);
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.action-btn {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-deactivate {
  background: #fef3c7;
  color: #92400e;
}

.btn-activate {
  background: #dcfce7;
  color: #166534;
}

.btn-delete {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-reset {
  background: #dbeafe;
  color: #1e40af;
}

.save-all-btn {
  margin-bottom: 1rem;
  justify-content: flex-end;
  display: flex;
}

/* Dark mode specific overrides */
[data-theme="dark"] .user-table {
  background: var(--card-bg);
  color: var(--text-primary);
}

[data-theme="dark"] .user-table th {
  background: var(--accent-light);
  color: var(--primary-color);
}

[data-theme="dark"] .user-table td {
  background: var(--card-bg);
  color: var(--text-primary);
}

[data-theme="dark"] .user-table input,
[data-theme="dark"] .user-table select {
  background: var(--input-bg);
  color: var(--text-primary);
}

[data-theme="dark"] .create-user-card {
  background: var(--card-bg);
}

@media (max-width: 768px) {
  .create-user-form {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
}

.btn-clear-token {
    background-color: #ffc107;
    color: #212529;
    border: none;
    padding: 5px 10px;
    margin: 2px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-clear-token:hover {
    background-color: #e0a800;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

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

.toggle-label {
  margin-left: 10px;
  vertical-align: middle;
}