/* 
  INMIN Support Website - Core Design System & Styling
  Premium Startup Design: Dark Mode, Blue Gradients, Glassmorphism, Responsive & Fast
*/

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

:root {
  /* HSL Tailored Color Palette */
  --bg-dark: hsl(222, 47%, 7%);
  --bg-card: hsla(222, 47%, 11%, 0.75);
  --bg-card-hover: hsla(222, 47%, 16%, 0.85);
  
  --primary-blue: hsl(217, 91%, 60%);
  --primary-blue-glow: hsla(217, 91%, 60%, 0.15);
  --primary-indigo: hsl(239, 84%, 67%);
  --primary-teal: hsl(172, 96%, 42%);
  
  --text-white: hsl(210, 40%, 98%);
  --text-normal: hsl(215, 20%, 80%);
  --text-muted: hsl(215, 16%, 60%);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-focus: hsla(217, 91%, 60%, 0.5);
  
  /* Status Colors */
  --status-pending-bg: hsla(38, 92%, 50%, 0.15);
  --status-pending-text: hsl(38, 92%, 60%);
  --status-processing-bg: hsla(217, 91%, 60%, 0.15);
  --status-processing-text: hsl(217, 91%, 60%);
  --status-resolved-bg: hsla(142, 72%, 29%, 0.2);
  --status-resolved-text: hsl(142, 76%, 50%);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-normal);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Glowing Blobs */
body::before,
body::after {
  content: '';
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(120px);
  opacity: 0.25;
}

body::before {
  background: radial-gradient(circle, var(--primary-blue) 0%, transparent 70%);
  top: -10vw;
  right: -5vw;
}

body::after {
  background: radial-gradient(circle, var(--primary-indigo) 0%, transparent 70%);
  bottom: -10vw;
  left: -5vw;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-white);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-normal);
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-indigo);
  text-decoration: underline;
}

/* Header & Nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-white);
  text-decoration: none;
}

.logo-dot {
  width: 10px;
  height: 10px;
  background-color: var(--primary-blue);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-blue);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-white);
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-white) 30%, var(--primary-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Layout Grid for Support Page */
.support-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-control {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

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

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2rem;
  padding-right: 2.5rem;
}

select.form-control option {
  background-color: var(--bg-dark);
  color: var(--text-white);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-indigo) 100%);
  border: none;
  border-radius: 10px;
  padding: 1rem;
  color: var(--text-white);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--text-white);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Side Card & Bullet List */
.sidebar-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary-blue);
  padding-left: 0.75rem;
}

.sidebar-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.bullet-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.bullet-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-normal);
  font-size: 0.95rem;
}

.bullet-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-teal);
  font-weight: bold;
}

.bullet-list.delete-list li::before {
  content: '•';
  color: #ef4444;
  font-size: 1.5rem;
  top: -0.25rem;
}

/* Policy Page Styling */
.policy-card {
  max-width: 800px;
  margin: 0 auto;
}

.policy-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.policy-content h2:first-of-type {
  margin-top: 0;
}

.policy-content p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  color: var(--text-normal);
}

.policy-content ul, .policy-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.policy-content li {
  margin-bottom: 0.5rem;
  color: var(--text-normal);
}

.last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: block;
}

/* Admin Dashboard CSS */
.admin-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-val {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin-top: 0.5rem;
}

/* Controls Bar */
.controls-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.search-input-wrapper input {
  padding-left: 2.5rem;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.5;
}

.filter-group {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-white);
  padding: 0.85rem 1.2rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Table Container */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.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(--border-color);
}

.admin-table th {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-white);
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

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

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
}

.badge-processing {
  background-color: var(--status-processing-bg);
  color: var(--status-processing-text);
}

.badge-resolved {
  background-color: var(--status-resolved-bg);
  color: var(--status-resolved-text);
}

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

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

.modal-content {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-smooth);
  overflow: hidden;
}

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

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-white);
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.detail-row {
  margin-bottom: 1.25rem;
}

.detail-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.detail-value {
  color: var(--text-white);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  word-break: break-word;
}

.detail-value.message-box {
  min-height: 100px;
  white-space: pre-wrap;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.01);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Status control button group */
.status-buttons {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.status-buttons button {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.85rem;
}

.btn-status-pending {
  background: var(--status-pending-bg);
  border: 1px solid var(--status-pending-text);
  color: var(--status-pending-text);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: filter var(--transition-fast);
}

.btn-status-processing {
  background: var(--status-processing-bg);
  border: 1px solid var(--status-processing-text);
  color: var(--status-processing-text);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: filter var(--transition-fast);
}

.btn-status-resolved {
  background: var(--status-resolved-bg);
  border: 1px solid var(--status-resolved-text);
  color: var(--status-resolved-text);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: filter var(--transition-fast);
}

.status-buttons button:hover {
  filter: brightness(1.2);
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  color: var(--text-white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  min-width: 300px;
  max-width: 450px;
}

.toast-success {
  border-left: 4px solid var(--primary-teal);
}

.toast-error {
  border-left: 4px solid #ef4444;
}

@keyframes slideIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-icon {
  font-size: 1.25rem;
}

.toast-icon-success {
  color: var(--primary-teal);
}

.toast-icon-error {
  color: #ef4444;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Footer Section */
footer {
  margin-top: 5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-white);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--text-white);
}

/* Auth Modal Card (Admin Panel specific) */
.auth-card {
  max-width: 400px;
  margin: 4rem auto;
}

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

.auth-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .support-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .nav-links {
    width: 100%;
    justify-content: space-between;
  }
  
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input-wrapper {
    max-width: 100%;
  }
  
  .filter-group {
    flex-direction: column;
  }
  
  .glass-card {
    padding: 1.5rem;
  }
  
  .status-buttons {
    flex-direction: column;
  }
}
