﻿/* --- GELİŞMİŞ YETKİ YÖNETİMİ (RBAC) STİLLERİ (v14.2) --- */
.rbac-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
  font-family: "Inter", sans-serif;
  color: #444;
}

.rbac-tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  gap: 20px;
  padding-bottom: 5px;
}

.rbac-tab-btn {
  background: none;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #888;
  position: relative;
  transition: 0.3s;
}

.rbac-tab-btn.active {
  color: var(--primary);
}

.rbac-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 5px;
}

.rbac-role-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
}

.rbac-role-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  color: #666;
}

.rbac-role-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(14, 27, 66, 0.2);
}

.rbac-table-wrapper {
  max-height: 450px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-top: 10px;
}

.rbac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rbac-table thead {
  position: sticky;
  top: 0;
  background: #f7f7f7;
  z-index: 2;
}

.rbac-table th,
.rbac-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
}

.rbac-table tr:hover {
  background: #f9f9f9;
}

.rbac-resource-name {
  font-weight: 600;
  color: var(--primary);
}

.q-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.q-filter-item i {
  color: #64748b;
  font-size: 0.9rem;
}

.q-filter-item .minimal-select {
  border: none !important;
  background: transparent !important;
  padding: 8px 4px !important;
  font-weight: 800;
}

/* Modern Toggle Switch */
.rbac-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.rbac-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.rbac-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 22px;
}

.rbac-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked+.rbac-slider {
  background-color: var(--success);
}

input:checked+.rbac-slider:before {
  transform: translateX(22px);
}

.rbac-info-box {
  padding: 10px 15px;
  background: #e3f2fd;
  border-radius: 8px;
  color: #1976d2;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- HOME SCREEN SPECIAL STYLES (v15.0) --- */
/* --- HOME SCREEN SPECIAL STYLES (Premium Glassmorphism - Compact) --- */
.home-quote {
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 15px rgba(31, 38, 135, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 5px;
}

.home-quote:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(31, 38, 135, 0.12);
}

.home-quote::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(120deg,
      rgba(237, 242, 247, 0.4) 0%,
      rgba(255, 255, 255, 0.1) 100%);
  z-index: -1;
}

.home-quote-content {
  position: relative;
  text-align: center;
}

.quote-icon-start {
  color: var(--secondary);
  opacity: 0.15;
  font-size: 2.5rem;
  position: absolute;
  top: -15px;
  left: -25px;
  z-index: 0;
}

.quote-text {
  font-size: 0.95rem;
  font-style: italic;
  color: #2d3748;
  line-height: 1.5;
  position: relative;
  z-index: 1;
  margin: 0;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.quote-author {
  margin-top: 12px;
  font-weight: 800;
  color: var(--primary);
  font-size: 0.85rem;
  text-align: right;
  letter-spacing: 0.5px;
}

/* Home Screen Leaderboard Table Styling */
#home-leaderboard-table th {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #999;
  padding: 8px 5px;
}

#home-leaderboard-table td {
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.rank-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  background: #eee;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  color: #777;
}

.rbac-table {
  width: 100%;
  border-collapse: collapse;
}

.rbac-table th {
  background: #f8f9fa;
  padding: 12px 15px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #888;
  border-bottom: 2px solid #eee;
}

.rbac-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.rbac-category-row {
  background: #fdfdfd;
}

.rbac-category-row td {
  font-weight: 700;
  color: var(--secondary);
  font-size: 0.8rem;
  padding-top: 20px;
  padding-bottom: 8px;
}

.rbac-resource-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rbac-tag-ovr {
  background: #fff0f0;
  color: #d32f2f;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  border: 1px solid #ffdcdc;
}

.rbac-overridden {
  background: #fffcfc;
}

.rbac-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 44px;
}

.rbac-switch input {
  display: none;
}

.rbac-slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
  border-radius: 34px;
}

.rbac-slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 16px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.rbac-slider {
  background-color: var(--success);
}

input:checked+.rbac-slider:before {
  transform: translateX(20px);
}

/* --- AI ASİSTAN WIDGET --- */
#ai-widget-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: none;
}

.ai-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fca311;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-toggle-btn:hover {
  transform: scale(1.1);
}

.ai-toggle-btn span {
  font-size: 30px;
}

.ai-chat-box {
  display: none;
  width: 350px;
  height: 500px;
  background: #14213d;
  border-radius: 15px;
  position: absolute;
  bottom: 80px;
  right: 0;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #fca311;
}

.ai-chat-header {
  padding: 15px;
  background: #000;
  color: #fff;
  border-bottom: 2px solid #fca311;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-chat-header h5 {
  margin: 0;
  font-size: 16px;
}

.ai-chat-header button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
}

#ai-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-msg-system {
  background: #fff;
  color: #000;
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  max-width: 80%;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

