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

/* CSS Reset & Variable Definitions */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Theme: Dark Mode (Default) */
  --bg-color: #0b0d17;
  --surface-color: rgba(20, 24, 43, 0.6);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --primary-color: #6366f1; /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.15);
  --primary-hover: #4f46e5;
  
  --accent-color: #10b981; /* Emerald */
  --accent-glow: rgba(16, 185, 129, 0.15);
  
  --danger-color: #ef4444;
  --danger-hover: #dc2626;

  --card-radius: 20px;
  --button-radius: 12px;
  --input-radius: 10px;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;

  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient-bg: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0b0d17 70%);
}

/* Theme: Light Mode Overrides */
[data-theme="light"] {
  --bg-color: #f8fafc;
  --surface-color: rgba(255, 255, 255, 0.7);
  --surface-border: rgba(0, 0, 0, 0.06);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary-color: #4f46e5;
  --primary-glow: rgba(79, 70, 229, 0.1);
  --primary-hover: #4338ca;
  
  --accent-color: #059669;
  --accent-glow: rgba(5, 150, 105, 0.1);

  --gradient-bg: radial-gradient(circle at 50% 0%, #e0e7ff 0%, #f8fafc 80%);
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: var(--transition-smooth);
}

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

/* Layout Elements */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 2rem 0;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  background: var(--gradient-hero);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-text span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.theme-toggle {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

/* Views Management */
.view {
  display: none;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 1rem 4rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Dashboard Styles */
.dashboard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-title {
  font-size: 1.75rem;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--button-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: var(--surface-color);
  border-color: var(--surface-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

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

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Profiles Grid */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.profile-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: var(--transition-smooth);
}

.profile-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-glow);
  border: 2px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary-color);
}

.card-info {
  flex: 1;
  overflow: hidden;
}

.card-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.card-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.card-company {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.card-footer-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  width: 100%;
}

.card-footer-buttons .btn {
  flex: 1;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface-color);
  border: 1.5px dashed var(--surface-border);
  border-radius: var(--card-radius);
  backdrop-filter: blur(10px);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  opacity: 0.6;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--card-radius);
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  transform: scale(0.95);
  transition: var(--transition-smooth);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface-border);
}

.modal-title {
  font-size: 1.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

/* Profile Form Elements */
.form-group-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

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

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: var(--input-radius);
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(255, 255, 255, 0.05);
}

.form-control:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
}

/* Form Tabs or Sections */
.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
  color: var(--primary-color);
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 0.5rem;
}

/* Image Upload Preview Utility */
.avatar-upload-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-color);
  border: 2px dashed var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview-placeholder {
  font-size: 2rem;
  opacity: 0.5;
}

.upload-btn-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.upload-btn-wrapper input[type=file] {
  font-size: 100px;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
}

/* Public Profile View (Premium Phone Preview Mode) */
.public-profile-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 0;
}

.profile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.preview-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-color);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-nav-bottom {
  text-align: center;
  margin-top: 1.5rem;
}

.profile-card-premium {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 30px;
  overflow: hidden;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.profile-bg-banner {
  height: 140px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.profile-bg-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--surface-color), transparent);
}

.profile-header-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem 1.5rem 1.5rem;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.profile-avatar-premium {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-color);
  background: var(--surface-color);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 3rem;
  color: var(--primary-color);
  overflow: hidden;
}

.profile-avatar-premium img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name-premium {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.profile-title-premium {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.profile-company-premium {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Save to Contacts Call To Action */
.cta-save-container {
  padding: 1.5rem;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: center;
}

.btn-cta-save {
  width: 100%;
  padding: 1.15rem;
  font-size: 1.1rem;
  background: var(--primary-color);
  color: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--primary-glow);
  transition: var(--transition-smooth);
}

.btn-cta-save:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px var(--primary-glow);
}

.btn-cta-save svg {
  width: 24px;
  height: 24px;
}

/* Quick Details / Contact Actions List */
.profile-details-premium {
  padding: 1.5rem;
}

.contact-action-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-border);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-smooth);
  margin-bottom: 0.75rem;
}

.contact-action-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
  border-color: rgba(99, 102, 241, 0.2);
}

.action-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.action-item-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.action-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.action-value {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Social Icon Grid */
.social-links-premium {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 2.5rem 1.5rem;
}

.social-circle-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.social-circle-btn:hover {
  transform: translateY(-5px);
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px var(--primary-glow);
}

/* Modal: Share / QR View Specific */
.share-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-code-wrapper {
  background: white;
  padding: 1rem;
  border-radius: 16px;
  margin: 1rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-code-wrapper canvas {
  display: block;
}

.share-link-box {
  width: 100%;
  margin-top: 1.5rem;
}

.share-input-group {
  display: flex;
  margin-top: 0.5rem;
}

.share-input-group input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.share-input-group button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.instructions-nfc {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-border);
  border-radius: var(--input-radius);
  padding: 1rem;
  line-height: 1.5;
}

.instructions-nfc h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #10b981;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-container.active {
  transform: translateX(-50%) translateY(0);
}

/* Dashboard Tabs Navigation */
.dashboard-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 1rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 10px;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--primary-color);
  background: var(--primary-glow);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

/* Admin Actions Bar */
.admin-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  max-width: 500px;
}

.search-input-wrapper .form-control {
  padding-left: 2.75rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Admin Glassmorphic Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--card-radius);
  border: 1px solid var(--surface-border);
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th, 
.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--surface-border);
  vertical-align: middle;
}

.admin-table th {
  background: rgba(99, 102, 241, 0.28);
  color: #e0e7ff;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .admin-table th {
  background: rgba(79, 70, 229, 0.22);
  color: #312e81;
  border-bottom: 1px solid rgba(79, 70, 229, 0.3);
}

.admin-table tr {
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table td .card-avatar {
  width: 40px;
  height: 40px;
  font-size: 1rem;
  border-width: 1px;
}

.admin-table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.admin-table-actions button,
.admin-table-actions a {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Footer style */
footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--surface-border);
  margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .modal-content {
    padding: 1.5rem;
    width: 95%;
  }
  .profiles-grid {
    grid-template-columns: 1fr;
  }
  .admin-actions-bar {
    flex-direction: column;
    align-items: stretch;
  .search-input-wrapper {
    max-width: 100%;
  }
  #admin-login-section {
    width: 95%;
    padding: 1.5rem;
    margin: 1rem auto;
  }
}

/* ═══════════════════════════════════════════
   MULTI-TENANT v2.0 — Yeni Bileşenler
═══════════════════════════════════════════ */

/* Surface card — generic content box */
.surface-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Stats grid — super admin summary */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(20px);
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Credit bar */
.credit-bar-wrap {
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  width: 120px;
  display: inline-block;
  vertical-align: middle;
}
.credit-bar {
  height: 100%;
  border-radius: 100px;
  transition: width 0.5s ease;
}

/* Credit widget — dealer panel top */
.credit-widget {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--card-radius);
  padding: 1rem 1.5rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  backdrop-filter: blur(20px);
}
.credit-widget-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.credit-widget-numbers {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
}
.credit-big   { color: var(--primary-color); }
.credit-sep   { color: var(--text-muted); }
.credit-limit { color: var(--text-secondary); }

/* Toggle Switch */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  vertical-align: middle;
  cursor: pointer;
}
.switch-toggle input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 100px;
  transition: 0.3s;
}
.switch-slider:before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.switch-toggle input:checked + .switch-slider { background: var(--primary-color); }
.switch-toggle input:checked + .switch-slider:before { transform: translateX(16px); }

/* Role badges */
.role-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.role-superadmin   { background: rgba(239,68,68,0.15);   color: #ef4444; }
.role-dealer_admin { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.role-company_admin{ background: rgba(99,102,241,0.15);  color: #6366f1; }
.role-user         { background: rgba(16,185,129,0.15);  color: #10b981; }

/* Tab panels */
.tab-panel { margin-top: 1.5rem; }

/* Admin table actions alignment fix */
.admin-table-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}


