/**
 * Veroc Web - Modern Professional UI
 * Advanced responsive design for all pages
 * @package Veroc_Web
 * @version 2.0
 */

/* ========================================
   CSS VARIABLES - DESIGN SYSTEM
   ======================================== */
:root {
  /* Primary Colors */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --error: #ef4444;
  --error-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE STYLES
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-700);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  letter-spacing: -0.025em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

@media (max-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
}

/* ========================================
   LAYOUT CONTAINER
   ======================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
}

/* ========================================
   BUTTONS - MODERN STYLE
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.5;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-200);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ========================================
   CARDS - MODERN GLASSMORPHISM
   ======================================== */
.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* ========================================
   FORMS - MODERN INPUTS
   ======================================== */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--gray-900);
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ========================================
   NAVIGATION - MODERN HEADER
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--gray-900);
  margin: 0;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-600);
  background: var(--primary-50);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--gray-600);
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-2);
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .nav-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu a {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--text-lg);
  }
}

/* ========================================
   PORTAL - COMPLETE REDESIGN
   ======================================== */
.portal-wrapper {
  min-height: calc(100vh - 72px);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-50) 100%);
  padding: var(--space-8) 0;
}

.portal-header {
  margin-bottom: var(--space-8);
}

.portal-header h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.portal-header p {
  color: var(--gray-600);
  font-size: var(--text-lg);
}

.portal-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 1024px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.portal-sidebar {
  position: sticky;
  top: 96px;
}

.user-profile-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  text-align: center;
  margin-bottom: var(--space-6);
}

.user-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-4);
  border: 4px solid var(--primary-100);
  box-shadow: var(--shadow-md);
}

.user-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-1);
}

.user-email {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-4);
}

/* Portal Navigation */
.portal-nav {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.portal-nav ul {
  list-style: none;
  padding: var(--space-2);
}

.portal-nav li {
  margin-bottom: var(--space-1);
}

.portal-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.portal-nav a:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.portal-nav a.active {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.portal-nav .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

/* Main Content */
.portal-main {
  min-height: 600px;
}

.portal-section {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  display: block;
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--primary-600);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Welcome Card */
.welcome-card {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.welcome-card h3 {
  color: white;
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.welcome-card p {
  color: var(--primary-100);
  font-size: var(--text-base);
  margin: 0;
}

/* License Cards */
.license-grid {
  display: grid;
  gap: var(--space-6);
}

.license-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: center;
}

@media (max-width: 768px) {
  .license-card {
    grid-template-columns: 1fr;
  }
}

.license-info h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.license-key {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--gray-100);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--gray-700);
}

.license-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-active {
  background: var(--success-light);
  color: var(--success);
}

.status-expired {
  background: var(--error-light);
  color: var(--error);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 2px dashed var(--gray-300);
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: var(--gray-100);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 40px;
}

.empty-state h3 {
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.empty-state p {
  color: var(--gray-500);
  margin-bottom: var(--space-6);
}

/* ========================================
   FOOTER - MODERN DESIGN
   ======================================== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand h3 {
  color: white;
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.footer-brand p {
  color: var(--gray-400);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--gray-800);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary-600);
  color: white;
  transform: translateY(-2px);
}

.footer-column h4 {
  color: white;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-6);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-links a {
  color: var(--gray-400);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  color: var(--gray-500);
  font-size: var(--text-sm);
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.footer-legal a:hover {
  color: var(--gray-300);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Grid utilities */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* Spacing utilities */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}

/* Ticket System Styles */
.support-overview {
    gap: 2rem;
    margin-bottom: 2rem;
}

.support-card {
    text-align: center;
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.support-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.support-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: white;
}

.ticket-stats {
    gap: 1rem;
    margin-bottom: 2rem;
}

.ticket-stats .stat-card {
    text-align: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ticket-stats .stat-card:hover {
    background: #f0f7ff;
    border-color: #2563eb;
}

/* Ticket Form */
.ticket-form {
    padding: 1.5rem;
}

.form-row {
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.priority-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.priority-option {
    cursor: pointer;
}

.priority-option input {
    display: none;
}

.priority-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.priority-option input:checked + .priority-badge {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.priority-low { background: #dcfce7; color: #166534; }
.priority-medium { background: #fef3c7; color: #92400e; }
.priority-high { background: #fee2e2; color: #991b1b; }
.priority-urgent { background: #fecaca; color: #7f1d1d; }

/* Tickets List */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.ticket-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ticket-item.status-open { border-left-color: #2563eb; }
.ticket-item.status-in-progress { border-left-color: #f59e0b; }
.ticket-item.status-resolved { border-left-color: #10b981; }
.ticket-item.status-closed { border-left-color: #6b7280; opacity: 0.8; }

.ticket-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.ticket-number {
    font-family: monospace;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.ticket-subject {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.ticket-preview {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.ticket-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.ticket-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ticket-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open { background: #dbeafe; color: #1e40af; }
.status-in-progress { background: #fef3c7; color: #92400e; }
.status-resolved { background: #d1fae5; color: #065f46; }
.status-closed { background: #f3f4f6; color: #374151; }

/* Ticket Detail View */
.ticket-detail-view {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ticket-conversation {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    max-width: 80%;
    display: flex;
    gap: 0.75rem;
}

.message-staff {
    background: white;
    border: 1px solid #e5e7eb;
    margin-left: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-direction: row-reverse;
}

.message-staff .message-content {
    background: #2563eb;
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    border-bottom-right-radius: 0.25rem;
}

.message-user {
    background: #f3f4f6;
    margin-right: auto;
    border: 1px solid #e5e7eb;
    flex-direction: row;
}

.message-user .message-content {
    background: #f3f4f6;
    color: #111827;
    padding: 1rem;
    border-radius: 0.75rem;
    border-bottom-left-radius: 0.25rem;
}

.message-avatar {
    flex-shrink: 0;
}

.message-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
    gap: 1rem;
}

.message-body {
    line-height: 1.6;
    font-size: 0.9375rem;
}

.message-content {
    line-height: 1.6;
}

.reply-form {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

/* Notifications */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 9999;
    border-left: 4px solid;
}

.notification.show {
    transform: translateX(0);
}

.notification-success { border-left-color: #10b981; }
.notification-error { border-left-color: #ef4444; }
.notification-info { border-left-color: #3b82f6; }

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.empty-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ticket-arrow {
        display: none;
    }
    
    .message {
        max-width: 100%;
    }
}

/* ========================================
   MOBILE FIXES - RESPONSIVE IMPROVEMENTS
   ======================================== */

/* Tablet and below */
@media (max-width: 1024px) {
    .portal-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .portal-sidebar {
        position: relative;
        top: 0;
        order: 2;
    }
    
    .portal-main {
        order: 1;
    }
    
    .user-profile-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: var(--space-4);
        padding: var(--space-4);
    }
    
    .user-avatar {
        width: 64px;
        height: 64px;
        margin: 0;
    }
    
    .user-profile-card .user-name,
    .user-profile-card .user-email {
        margin-bottom: var(--space-1);
    }
    
    .user-profile-card .btn {
        margin-left: auto;
    }
    
    .portal-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    
    .portal-nav li {
        flex: 1;
        min-width: 140px;
    }
    
    .portal-nav a {
        justify-content: center;
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    .portal-wrapper {
        padding: var(--space-4) 0;
    }
    
    .portal-header h1 {
        font-size: var(--text-2xl);
    }
    
    .portal-header p {
        font-size: var(--text-base);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    
    .stat-card {
        padding: var(--space-4);
    }
    
    .stat-number {
        font-size: var(--text-2xl);
    }
    
    .ticket-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .support-grid {
        grid-template-columns: 1fr;
    }
    
    .ticket-item {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-4);
    }
    
    .ticket-arrow {
        display: none;
    }
    
    .ticket-header {
        width: 100%;
    }
    
    .ticket-subject {
        font-size: var(--text-base);
    }
    
    .message {
        max-width: 90%;
        padding: var(--space-3);
    }
    
    .message-user,
    .message-staff {
        margin-left: 0;
        margin-right: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .license-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .license-key {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .welcome-card {
        padding: var(--space-6);
    }
    
    .section-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .user-profile-card {
        flex-direction: column;
        text-align: center;
    }
    
    .user-profile-card .btn {
        margin-left: 0;
        width: 100%;
    }
    
    .portal-nav li {
        flex: 1 1 100%;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-3);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ticket-stats {
        grid-template-columns: 1fr;
    }
    
    .priority-selector {
        flex-direction: column;
        width: 100%;
    }
    
    .priority-option {
        width: 100%;
    }
    
    .priority-badge {
        display: block;
        text-align: center;
    }
    
    .btn {
        width: 100%;
    }
    
    .flex.gap-2 {
        flex-direction: column;
    }
}

/* ========================================
   MOBILE MENU FINAL FIX
   ======================================== */

@media (max-width: 1024px) {
    /* Sticky container */
    .portal-sidebar {
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        background: linear-gradient(135deg, #f9fafb 0%, #eff6ff 100%) !important;
        padding: 12px 16px !important;
        margin: 0 0 16px 0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        order: 1 !important;
    }

    .portal-main {
        order: 2 !important;
    }

    /* Profile card - compact horizontal */
    .user-profile-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px !important;
        margin-bottom: 12px !important;
        background: white !important;
        border-radius: 12px !important;
        border: 1px solid #e5e7eb !important;
    }

    .user-avatar {
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        border-width: 2px !important;
        flex-shrink: 0 !important;
    }

    /* Container for name/email */
    .user-profile-card .user-info,
    .user-profile-card h3.user-name,
    .user-profile-card p.user-email {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .user-profile-card .user-name {
        font-size: 15px !important;
        font-weight: 600 !important;
        margin: 0 0 2px 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #111827 !important;
    }

    .user-profile-card .user-email {
        font-size: 12px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #6b7280 !important;
    }

    /* Edit Profile Button - compact */
    .user-profile-card .btn {
        margin: 0 !important;
        margin-left: auto !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        width: auto !important;
        min-width: auto !important;
        border-radius: 8px !important;
    }

    /* Hide "Edit" text on very small screens, show only icon */
    @media (max-width: 380px) {
        .user-profile-card .btn {
            padding: 8px !important;
        }
        .user-profile-card .btn span.dashicons {
            margin: 0 !important;
        }
    }

    /* Horizontal scrollable menu */
    .portal-nav {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        overflow: visible !important;
    }

    .portal-nav ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        list-style: none !important;
    }

    .portal-nav ul::-webkit-scrollbar {
        display: none !important;
    }

    .portal-nav li {
        flex: 0 0 auto !important;
        margin: 0 !important;
        min-width: 65px !important;
        max-width: 85px !important;
        position: relative !important;
    }

    /* Menu buttons */
    .portal-nav a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 10px 6px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        text-align: center !important;
        text-decoration: none !important;
        background: white !important;
        border: 1.5px solid #e5e7eb !important;
        border-radius: 10px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
        color: #374151 !important;
        min-height: 60px !important;
        transition: all 0.2s ease !important;
        line-height: 1.2 !important;
    }

    .portal-nav a:hover,
    .portal-nav a:active {
        background: #f9fafb !important;
        border-color: #2563eb !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }

    .portal-nav a.active {
        background: #2563eb !important;
        color: white !important;
        border-color: #2563eb !important;
        box-shadow: 0 2px 4px rgba(37,99,235,0.3) !important;
    }

    .portal-nav .dashicons {
        font-size: 20px !important;
        width: 20px !important;
        height: 20px !important;
        display: block !important;
    }

    /* Badge */
    .portal-nav a .badge {
        position: absolute !important;
        top: -4px !important;
        right: -4px !important;
        min-width: 16px !important;
        height: 16px !important;
        padding: 0 4px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        line-height: 16px !important;
        background: #ef4444 !important;
        color: white !important;
        border-radius: 9999px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .portal-sidebar {
        padding: 10px 12px !important;
    }

    .user-profile-card {
        gap: 10px !important;
        padding: 10px !important;
    }

    .user-avatar {
        width: 40px !important;
        height: 40px !important;
    }

    .user-profile-card .user-name {
        font-size: 14px !important;
    }

    .user-profile-card .user-email {
        font-size: 11px !important;
    }

    .portal-nav li {
        min-width: 58px !important;
        max-width: 75px !important;
    }

    .portal-nav a {
        padding: 8px 4px !important;
        min-height: 54px !important;
        font-size: 10px !important;
    }

    .portal-nav .dashicons {
        font-size: 18px !important;
        width: 18px !important;
        height: 18px !important;
    }
}

/* ========================================
   MOBILE AUTO-FIT - COMPLETE RESPONSIVE
   ======================================== */

/* Viewport meta fix for mobile browsers */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* Prevent horizontal overflow on all mobile */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Container auto-fit */
    .container {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Portal wrapper full width */
    .portal-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 0 !important;
    }

    /* Portal header compact */
    .portal-header {
        width: 100% !important;
        padding: 20px 16px !important;
        margin-bottom: 0 !important;
        text-align: center !important;
    }

    .portal-header h1 {
        font-size: 24px !important;
        line-height: 1.2 !important;
        margin-bottom: 8px !important;
    }

    .portal-header p {
        font-size: 14px !important;
        color: #6b7280 !important;
    }

    /* Portal grid single column */
    .portal-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0 !important;
    }

    /* Sticky sidebar */
    .portal-sidebar {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        max-width: 100vw !important;
        background: linear-gradient(135deg, #f9fafb 0%, #eff6ff 100%) !important;
        padding: 12px 16px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        box-sizing: border-box !important;
    }

    /* Profile card horizontal compact */
    .user-profile-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px !important;
        margin-bottom: 12px !important;
        background: white !important;
        border-radius: 12px !important;
        border: 1px solid #e5e7eb !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .user-avatar {
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        border-width: 2px !important;
    }

    .user-profile-info {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .user-name {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin: 0 0 2px 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #111827 !important;
    }

    .user-email {
        font-size: 12px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #6b7280 !important;
    }

    /* Edit button compact */
    .user-profile-card .btn {
        margin: 0 !important;
        margin-left: auto !important;
        padding: 8px 14px !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        width: auto !important;
        border-radius: 8px !important;
    }

    /* Horizontal scroll menu */
    .portal-nav {
        width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    .portal-nav ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        list-style: none !important;
    }

    .portal-nav ul::-webkit-scrollbar {
        display: none !important;
    }

    .portal-nav li {
        flex: 1 0 auto !important;
        margin: 0 !important;
        min-width: 65px !important;
        max-width: 85px !important;
        position: relative !important;
    }

    .portal-nav a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 10px 6px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        text-align: center !important;
        text-decoration: none !important;
        background: white !important;
        border: 1.5px solid #e5e7eb !important;
        border-radius: 10px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
        color: #374151 !important;
        min-height: 60px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .portal-nav a.active {
        background: #2563eb !important;
        color: white !important;
        border-color: #2563eb !important;
    }

    .portal-nav .dashicons {
        font-size: 20px !important;
        width: 20px !important;
        height: 20px !important;
        display: block !important;
    }

    .portal-nav a .badge {
        position: absolute !important;
        top: -4px !important;
        right: -4px !important;
        min-width: 16px !important;
        height: 16px !important;
        padding: 0 4px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        line-height: 16px !important;
        background: #ef4444 !important;
        color: white !important;
        border-radius: 9999px !important;
    }

    /* Main content area */
    .portal-main {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 16px !important;
        box-sizing: border-box !important;
    }

    /* Stats grid 2 columns */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    .stat-card {
        padding: 16px !important;
        min-width: 0 !important;
    }

    .stat-number {
        font-size: 28px !important;
    }

    .stat-label {
        font-size: 11px !important;
    }

    /* Welcome card */
    .welcome-card {
        padding: 20px !important;
        margin-bottom: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .welcome-card h3 {
        font-size: 18px !important;
    }

    .welcome-card p {
        font-size: 14px !important;
    }

    /* Cards grid */
    .grid.grid-2.mt-8 {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .card {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .card-body {
        padding: 16px !important;
    }

    /* Footer auto-fit */
    .site-footer {
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 40px 16px 20px !important;
        box-sizing: border-box !important;
    }

    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        width: 100% !important;
    }

    .footer-grid h4 {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }

    .footer-grid p,
    .footer-grid a {
        font-size: 14px !important;
        word-break: break-word !important;
    }

    .footer-social {
        gap: 12px !important;
    }

    .footer-social a {
        width: 36px !important;
        height: 36px !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
        padding-top: 20px !important;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .portal-sidebar {
        padding: 10px 12px !important;
    }

    .user-profile-card {
        gap: 10px !important;
        padding: 10px !important;
    }

    .user-avatar {
        width: 40px !important;
        height: 40px !important;
    }

    .user-name {
        font-size: 14px !important;
    }

    .user-email {
        font-size: 11px !important;
    }

    .portal-nav li {
        min-width: 58px !important;
        max-width: 75px !important;
    }

    .portal-nav a {
        padding: 8px 4px !important;
        min-height: 54px !important;
        font-size: 10px !important;
    }

    .portal-nav .dashicons {
        font-size: 18px !important;
        width: 18px !important;
        height: 18px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

/* iPhone SE / very small */
@media (max-width: 320px) {
    .portal-nav a {
        font-size: 9px !important;
        padding: 6px 3px !important;
    }

    .user-profile-card .btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
}

/* ========================================
   ULTIMATE MOBILE OVERRIDE - LOAD LAST
   ======================================== */

/* Force mobile viewport */
@viewport { width: device-width; }

/* ========================================
   MOBILE ONLY - MAXIMUM SPECIFICITY
   ======================================== */

@media only screen and (max-width: 1024px) {
    
    /* RESET EVERYTHING FOR MOBILE */
    html body .portal-wrapper,
    html body .portal-wrapper * {
        box-sizing: border-box !important;
    }
    
    /* Force single column layout */
    html body .portal-wrapper .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
    }
    
    /* Grid becomes single column */
    html body .portal-wrapper .portal-grid {
        display: block !important;
        width: 100% !important;
    }
    
    /* SIDEBAR - Sticky at top */
    html body .portal-wrapper .portal-sidebar {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        width: 100% !important;
        background: #f0f7ff !important;
        padding: 10px 15px !important;
        margin: 0 -15px 15px -15px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
    
    /* PROFILE CARD - Horizontal compact */
    html body .portal-wrapper .user-profile-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px !important;
        margin-bottom: 12px !important;
        background: white !important;
        border-radius: 10px !important;
        border: 1px solid #e5e7eb !important;
        width: calc(100% - 30px) !important;
    }
    
    html body .portal-wrapper .user-avatar {
        width: 45px !important;
        height: 45px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    
    html body .portal-wrapper .user-name {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #111827 !important;
        margin: 0 0 3px 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 150px !important;
    }
    
    html body .portal-wrapper .user-email {
        font-size: 12px !important;
        color: #6b7280 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 150px !important;
    }
    
    html body .portal-wrapper .user-profile-card .btn {
        margin: 0 0 0 auto !important;
        padding: 8px 14px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        background: white !important;
        border: 1px solid #d1d5db !important;
        color: #374151 !important;
        border-radius: 6px !important;
    }
    
    /* NAVIGATION - Horizontal scroll buttons */
    html body .portal-wrapper .portal-nav {
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    html body .portal-wrapper .portal-nav ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        list-style: none !important;
    }
    
    html body .portal-wrapper .portal-nav ul::-webkit-scrollbar {
        display: none !important;
    }
    
    html body .portal-wrapper .portal-nav li {
        flex: 0 0 auto !important;
        margin: 0 !important;
        min-width: 70px !important;
        position: relative !important;
    }
    
    html body .portal-wrapper .portal-nav a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 10px 8px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        text-align: center !important;
        background: white !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 8px !important;
        color: #374151 !important;
        min-height: 60px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    }
    
    html body .portal-wrapper .portal-nav a.active {
        background: #2563eb !important;
        color: white !important;
        border-color: #2563eb !important;
    }
    
    html body .portal-wrapper .portal-nav .dashicons {
        font-size: 20px !important;
        width: 20px !important;
        height: 20px !important;
    }
    
    /* MAIN CONTENT */
    html body .portal-wrapper .portal-main {
        width: 100% !important;
        padding: 15px !important;
    }
    
    /* STATS - 2 columns */
    html body .portal-wrapper .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    
    /* FOOTER */
    html body .site-footer .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
    }
}

/* Very small screens */
@media only screen and (max-width: 480px) {
    html body .portal-wrapper .stats-grid {
        grid-template-columns: 1fr !important;
    }
}