:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --card: #1a1a1a;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --muted: #888888;
  --primary: #dc2626;
  --primary-strong: #b91c1c;
  --accent: #ef4444;
  --accent-purple: #991b1b;
  --accent-cyan: #f87171;
  --success: #22c55e;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.container {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.logo .dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.logo strong {
  color: #fef2f2;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

/* Folder Navigation Styles */
.nav-folder {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-folder-toggle {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: rgba(26, 26, 26, 0.5);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
}

.nav-folder-header {
  width: 100%;
  text-align: left;
  padding: 5px 8px;
  background: rgba(26, 26, 26, 0.5);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
}

.nav-folder-header:hover {
  background: rgba(220, 38, 38, 0.15);
}

.nav-folder.admin-folder .nav-folder-header {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.nav-folder.admin-folder .nav-folder-header:hover {
  background: rgba(251, 191, 36, 0.2);
}

.nav-folder-toggle:hover {
  background: rgba(220, 38, 38, 0.15);
}

.nav-folder-toggle.active {
  background: rgba(220, 38, 38, 0.2);
  border-color: var(--primary);
  color: #fef2f2;
}

.folder-arrow {
  font-size: 0.7rem;
}

.nav-folder-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
  margin-top: 4px;
}

.nav-link.sub {
  padding: 4px 6px;
  font-size: 0.68rem;
  background: rgba(17, 17, 17, 0.4);
  border-left: 2px solid var(--border);
}

.nav-link.sub:hover {
  border-left-color: var(--primary);
  padding-left: 14px;
}

.nav-link.sub.active {
  border-left-color: var(--accent-cyan);
  background: rgba(220, 38, 38, 0.2);
}

.nav-link.nav-child {
  padding: 6px 10px;
  font-size: 0.82rem;
  background: rgba(17, 17, 17, 0.4);
  border-left: 2px solid var(--border);
}

.nav-link.nav-child:hover {
  border-left-color: var(--primary);
  padding-left: 14px;
}

.nav-link.nav-child.active {
  border-left-color: var(--accent-cyan);
  background: rgba(220, 38, 38, 0.2);
}

.nav-link,
.nav-link:visited {
  width: 100%;
  text-align: left;
  padding: 5px 8px;
  background: rgba(26, 26, 26, 0.5);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.nav-link:hover {
  background: rgba(220, 38, 38, 0.15);
}

.nav-link.active {
  background: rgba(220, 38, 38, 0.25);
  border-color: var(--primary);
  color: #fef2f2;
  font-weight: 600;
}

.nav-link.danger {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.nav-link.danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

.logout {
  margin-top: auto;
}

.main {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-card,
.panel-card {
  background: #1a1a1a;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.auth-card:hover,
.panel-card:hover {
  border-color: var(--primary);
}

.auth-card {
  width: min(440px, 100%);
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}

.auth-card h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  background: rgba(17, 17, 17, 0.7);
  color: var(--text);
  border-radius: 12px;
  font-size: 0.98rem;
  outline: none;
  font-family: inherit;
}

input::placeholder {
  color: var(--muted);
}

input:focus {
  border-color: var(--primary);
  background: rgba(26, 26, 26, 0.95);
}

input[type="file"] {
  background: rgba(17, 17, 17, 0.7);
  color: var(--text);
  cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  margin-right: 12px;
  cursor: pointer;
  font-weight: 600;
}

textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  background: rgba(17, 17, 17, 0.7);
  color: var(--text);
  border-radius: 12px;
  font-size: 0.98rem;
  outline: none;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}

textarea::placeholder {
  color: var(--muted);
}

textarea:focus {
  border-color: var(--primary);
  background: rgba(26, 26, 26, 0.95);
}

button {
  width: 100%;
  padding: 14px 20px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

button:hover {
  opacity: 0.9;
}

.ghost {
  width: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.error {
  color: #f87171;
  margin: 12px 0;
}

.link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: #2a1a1a;
  color: #fef2f2;
  border: 1px solid var(--border);
}

.panel-header h1 {
  margin: 4px 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-header .muted {
  margin: 0;
  color: rgba(224, 242, 254, 0.75);
  font-size: 0.92rem;
}

/* DateTime Widget */
.datetime-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  background: #0a0a0a;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.datetime-time {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  line-height: 1;
}

.datetime-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.9;
}

.datetime-day {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  width: min(1100px, 100%);
}

.panel-card {
  padding: 16px;
  border: 1px solid var(--border);
  background: #1a1a1a;
}

.panel-card h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fecaca;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.panel-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

/* Uyelik Yonetimi Stilleri */
.member-form {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}

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

select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  background: rgba(17, 17, 17, 0.7);
  color: var(--text);
  border-radius: 12px;
  font-size: 0.98rem;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

select:focus {
  border-color: var(--primary);
  background: rgba(26, 26, 26, 0.95);
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 13px 16px;
  background: rgba(26, 26, 26, 0.4);
  border: 1.5px solid var(--border);
  border-radius: 12px;
}

.checkbox-label:hover {
  background: rgba(26, 26, 26, 0.6);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--muted);
  border-radius: 6px;
  position: relative;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.submit-btn {
  background: var(--success);
  font-size: 1.05rem;
}

/* Uye Listesi */
.members-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.member-item:hover {
  background: rgba(26, 26, 26, 0.7);
}

.member-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 200px;
}

.member-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.15);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.member-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-details strong {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
}

.member-role {
  font-size: 0.85rem;
  color: var(--muted);
}

.member-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-success {
  background: rgba(52, 211, 153, 0.2);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.badge-muted {
  background: rgba(136, 150, 171, 0.15);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge-admin {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.badge-analiz {
  background: rgba(220, 38, 38, 0.2);
  color: var(--primary);
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.badge-danger {
  background: rgba(248, 113, 113, 0.2);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

/* Mola Sistemi Stilleri */
.break-card {
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.break-card:hover {
  border-color: var(--primary);
}

.break-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.break-number {
  font-size: 2rem;
  line-height: 1;
}

.break-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 600;
}

.break-timer {
  background: rgba(17, 17, 17, 0.9);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.timer-display {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.break-status {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
}

.status-badge {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(136, 150, 171, 0.15);
  color: var(--muted);
  border: 1px solid var(--border);
}

.status-active {
  background: rgba(52, 211, 153, 0.2);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.4);
}

.status-warning {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent);
  border-color: rgba(251, 191, 36, 0.4);
}

.status-late {
  background: rgba(248, 113, 113, 0.2);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.4);
}

.break-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--success);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.break-btn:hover {
  opacity: 0.9;
}

/* Mola Gecmisi */
.break-history {
  display: grid;
  gap: 12px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.history-item:hover {
  background: rgba(26, 26, 26, 0.7);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-number {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.history-time {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: 'Courier New', monospace;
}

.history-duration {
  display: flex;
  align-items: center;
}

/* Table Form Grid */
.table-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.table-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.table-form-grid input,
.table-form-grid select {
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
}

.table-form-grid input:focus,
.table-form-grid select:focus {
  outline: none;
  border-color: var(--primary);
}

.table-form-grid input[readonly] {
  background: var(--card);
  color: var(--muted);
  cursor: not-allowed;
}

/* Data Tables */
.data-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead {
  background: var(--card);
  border-bottom: 2px solid var(--border);
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
  background: rgba(220, 38, 38, 0.05);
}

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

.data-table td {
  padding: 12px 16px;
  color: var(--text);
}

/* Additional Badge Styles */
.badge-spor {
  background: #22c55e;
  color: white;
}

.badge-casino {
  background: #d97706;
  color: white;
}

.badge-canli-casino {
  background: #8b5cf6;
  color: white;
}

.badge-sanal {
  background: #dc2626;
  color: white;
}

.badge-genel,
.badge-tum-alanlar {
  background: #dc2626;
  color: white;
}

.badge-status-karda {
  background: #22c55e;
  color: white;
}

.badge-status-zararda {
  background: #ef4444;
  color: white;
}

.badge-status-basabas {
  background: #64748b;
  color: white;
}

.badge-group-vip {
  background: #f59e0b;
  color: white;
  font-weight: 600;
}

.badge-group-gold {
  background: #fbbf24;
  color: #78350f;
  font-weight: 600;
}

.badge-group-silver {
  background: #94a3b8;
  color: #1e293b;
  font-weight: 600;
}

.badge-group-bronze {
  background: #fb923c;
  color: white;
  font-weight: 600;
}

.badge-group-standart {
  background: #475569;
  color: white;
}

/* Popup Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: #1a1a1a;
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  border-radius: 20px 20px 0 0;
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.modal-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-message {
  margin: 0 0 28px;
  color: var(--success);
  font-size: 1.05rem;
  line-height: 1.5;
}

.modal-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

.modal-btn:hover {
  opacity: 0.9;
}

/* Notification Styles */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.notification-item:hover {
  background: rgba(26, 26, 26, 0.7);
}

.notification-item.late {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.05);
}

.notification-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notification-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.notification-message {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.notification-time {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  opacity: 0.7;
}

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

  .sidebar {
    height: auto;
    position: static;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ghost {
    width: 100%;
  }

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

  .member-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .member-badges {
    width: 100%;
  }
}

/* Delete Member Button */
.delete-member-btn {
  background: #dc2626;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: white;
  margin-left: 8px;
}

.delete-member-btn:hover {
  opacity: 0.9;
}

/* Modal/Popup Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal .modal-content {
  background: #1a1a1a;
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  position: relative;
}

.modal .modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  border-radius: 20px 20px 0 0;
}

.modal .modal-content h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Modal Buttons */
.modal-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.modal-btn-cancel {
  background: #4b5563;
  color: white;
}

.modal-btn-cancel:hover {
  opacity: 0.9;
}

.modal-btn-confirm {
  background: #dc2626;
  color: white;
}

.modal-btn-confirm:hover {
  opacity: 0.9;
}

.muted {
  color: var(--muted);
}
