/* CSS Variables - Matching Admin Theme */
:root {
  --primary-color: #2F2970;
  --secondary-color: #3498db;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --info-color: #3498db;
  --light-bg: #f8f9fa;
  --border-color: #dee2e6;
  --text-dark: #2c3e50;
  --text-muted: #6c757d;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 10px;
  --transition: all 0.3s ease;
  
  /* Modern UI Colors - Admin Theme */
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --popover: #ffffff;
  --popover-foreground: #0f172a;
  --primary: #2F2970;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --muted: #f8fafc;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #0f172a;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #2F2970;
  --radius: 0.5rem;
  
  /* Additional modern colors for better contrast */
  --success: #10b981;
  --success-foreground: #ffffff;
  --warning: #f59e0b;
  --warning-foreground: #ffffff;
  --info: #3b82f6;
  --info-foreground: #ffffff;
  
  /* Sidebar specific variables */
  --sidebar-width: 260px;
  --sidebar-width-mobile: 280px;
  --sidebar-bg: #2F2970;
  --sidebar-foreground: #ffffff;
  --sidebar-accent: rgba(255, 255, 255, 0.1);
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-muted: rgba(255, 255, 255, 0.7);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--background);
}

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

/* Portal Layout */
.portal-layout {
  display: flex;
  min-height: 100vh;
  background: var(--background);
  position: relative; /* Ensure proper stacking context */
}

/* ========================================
   SIDEBAR STYLES - shadcn/ui Inspired
   ======================================== */

.portal-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-foreground);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 1000;
  overflow: hidden;
  /* Ensure sidebar is always visible */
  visibility: visible !important;
  opacity: 1 !important;
}

/* Sidebar Header */
.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--sidebar-border);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon .icon {
  font-size: 1.25rem;
  color: var(--sidebar-foreground);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--sidebar-foreground);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.875rem;
  color: var(--sidebar-muted);
  line-height: 1.2;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  border: 1px solid var(--sidebar-border);
}

.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-icon {
  font-size: 1.25rem;
  color: var(--sidebar-foreground);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.user-greeting {
  font-size: 0.75rem;
  color: var(--sidebar-muted);
  line-height: 1.2;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sidebar-foreground);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Content */
.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
  overflow-y: auto;
}

/* Sidebar Groups */
.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sidebar-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 1rem;
  margin-bottom: 0.25rem;
}

.sidebar-group-content {
  display: flex;
  flex-direction: column;
}

.sidebar-group-bottom {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--sidebar-border);
}

/* Sidebar Menu */
.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-menu-item {
  position: relative;
}

/* Sidebar Menu Button */
.sidebar-menu-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--sidebar-foreground);
  font-size: 0.875rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.sidebar-menu-button:hover {
  background: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}

.sidebar-menu-button.active {
  background: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
  font-weight: 500;
}

.sidebar-menu-button.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-foreground);
}

.sidebar-menu-button .icon {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-menu-button span:not(.icon) {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Menu Badge */
.sidebar-menu-badge {
  background: var(--destructive);
  color: var(--destructive-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  min-width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Logout Button Special Styling */
.sidebar-menu-button-logout {
  color: #fca5a5;
}

.sidebar-menu-button-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.sidebar-menu-button-logout.active {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

/* Main Content Area */
.portal-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 1.5rem;
  background: var(--background);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    /* Mobile header - always visible */
  .mobile-header {
  display: flex !important;
    position: fixed !important;
    top: 0 !important;
    z-index: 999 !important;
    width: 100% !important;
    height: 80px !important; /* Fixed height */
    background: white !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    padding: 15px 20px !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    /* Ensure no other styles can override */
    left: 0 !important;
    right: 0 !important;
    /* Ensure header doesn't interfere with content */
    overflow: hidden !important;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-size: 18px !important;
    cursor: pointer !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .mobile-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
  }
  
  .mobile-header-title .icon {
    font-size: 20px;
  }
  
  /* Sidebar behavior on mobile */
  .portal-sidebar {
    transform: translateX(-100%) !important;
    width: 280px !important; /* Fallback value */
    width: var(--sidebar-width-mobile) !important;
    position: fixed !important;
    top: 0 !important; /* Ensure it starts from top */
    left: 0 !important; /* Ensure it starts from left */
    z-index: 9999 !important; /* Very high z-index to ensure visibility */
    transition: transform 0.3s ease !important;
    height: 100vh !important; /* Full height */
    background: var(--sidebar-bg) !important;
    /* Ensure no other styles can override */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* end debug */
  }
  
  .portal-sidebar.open {
    transform: translateX(0) !important;
    /* end debug */
  }
  
  /* Main content on mobile */
  .portal-main {
    margin-left: 0 !important;
    padding: 150px 15px 24px 15px; /* Increased top padding to clear header completely */
    width: 100%;
  }
  
  /* Mobile overlay */
  .mobile-menu-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
  }
  
  .mobile-menu-overlay.open {
    display: block !important;
    /* end debug */
  }
}

/* ========================================
   CONTENT STYLES
   ======================================== */

/* Welcome Section */
.welcome-section {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

/* Ensure all sections are visible on mobile */
@media (max-width: 768px) {
  .welcome-section {
    margin-top: 3rem; /* Increased top margin on mobile */
    position: relative; /* Ensure proper stacking context */
    z-index: 1; /* Ensure it's above background */
  }
  
  /* Ensure all content sections have proper spacing */
  .content-section {
    margin-top: 2rem;
  position: relative;
    z-index: 1;
  }
  
  /* Specific spacing for announcements section */
  .announcements-section {
    margin-top: 2rem;
    padding-top: 1rem;
  }
  
  /* Specific spacing for documents section */
  .documents-section {
    margin-top: 2rem;
    padding-top: 1rem;
  }
  
  /* Specific spacing for maintenance section */
  .maintenance-section {
    margin-top: 2rem;
    padding-top: 1rem;
  }
  
  /* Specific spacing for rooms section */
  .rooms-section {
    margin-top: 2rem;
    padding-top: 1rem;
  }
  
  /* Ensure test navigation section is properly spaced */
  .test-navigation {
    margin-top: 2rem;
  }
}

.welcome-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

/* Ensure welcome title is properly spaced on mobile */
@media (max-width: 768px) {
  .welcome-title {
    margin-top: 1rem;
    padding-top: 0.5rem;
    /* Ensure text isn't cut off */
    line-height: 1.3;
    word-wrap: break-word;
  }
}

.welcome-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.room-info {
  display: inline-flex;
  align-items: center;
    gap: 0.5rem;
  background: var(--light-bg);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.room-info .icon {
  font-size: 1rem;
}

/* Test Navigation */
.test-navigation {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.test-navigation h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.test-navigation p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.test-navigation-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.test-nav-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.test-nav-button:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 41, 112, 0.3);
}

/* Content Cards */
.content-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ========================================
   ROOMS & BUILDING ACCESS CARDS - shadcn/ui Inspired
   ======================================== */

/* Personal Access Codes Cards */
.personal-access-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Access Card Base Styles */
.access-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  overflow: hidden;
}

.access-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

/* Personal Access Cards */
.personal-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary) 100%);
  color: white;
  border: none;
}

.personal-card .card-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.personal-card .card-icon {
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.personal-card .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.personal-card .card-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.personal-card .code-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-align: center;
  letter-spacing: 0.1em;
}

/* Building Access Section */
.building-access-section {
  margin-top: 3rem;
}

.section-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

/* Building Codes Grid */
.building-codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Building Access Cards */
.building-card {
  background: white;
  border: 1px solid var(--border-color);
}

.building-card .card-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.building-card .card-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.building-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.2;
}

.building-card .card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.building-card .card-content {
  padding: 0 1.5rem 1rem 1.5rem;
}

.building-card .code-value {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  color: var(--primary-color);
  background: var(--light-bg);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-align: center;
  letter-spacing: 0.1em;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.building-card .code-value.hidden {
  filter: blur(4px);
  user-select: none;
}

.building-card .card-footer {
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Button Styles for Cards */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--accent);
  border-color: var(--border);
}

.btn-icon {
  margin-right: 0.5rem;
  font-size: 0.875rem;
}

/* Responsive Design for Cards */
@media (max-width: 768px) {
  .personal-access-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .building-codes-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .access-card {
    margin-bottom: 1rem;
  }
  
  .building-card .card-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn-sm {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   DOCUMENTS SECTION - shadcn/ui Inspired
   ======================================== */

/* Documents Container */
.documents-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Documents Section Group */
.documents-section-group {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

/* Section Header */
.section-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.section-description {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Documents Grid */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

/* Document Card */
.document-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  overflow: hidden;
}

.document-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

/* Document Card Header */
.document-card .card-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.document-card .card-icon {
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.document-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.3;
  word-wrap: break-word;
}

.document-card .card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Document Card Content */
.document-card .card-content {
  padding: 0 1.5rem 1rem 1.5rem;
}

.document-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meta-icon {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
}

.meta-text {
  font-weight: 500;
}

/* Document Card Footer */
.document-card .card-footer {
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  background: var(--light-bg);
}

/* Button Variants for Documents */
.btn-success {
  background: var(--success);
  color: var(--success-foreground);
  border: 1px solid var(--success);
}

.btn-success:hover {
  background: var(--success);
  opacity: 0.9;
}

.btn-success:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Ensure acknowledge button updates are visible */
.document-card .btn-success {
  transition: all 0.3s ease;
}

.document-card .btn-success:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ========================================
   NEW DOCUMENT ICON SYSTEM - No Conflicts
   ======================================== */

/* Base icon container */
.document-card .card-icon {
  font-size: 2rem !important;
  width: 3rem !important;
  height: 3rem !important;
  background: var(--light-bg) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--primary-color) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* NEW: CSS-based icon system using ::before pseudo-elements */
.document-card .card-icon::before {
  content: "📄" !important; /* Default icon */
  font-size: 1.5rem !important;
  line-height: 1 !important;
}

/* PDF Documents */
.document-card .card-icon[data-icon="pdf"]::before {
  content: "📕" !important;
  color: #dc2626 !important;
}

/* Word Documents */
.document-card .card-icon[data-icon="doc"]::before {
  content: "📘" !important;
  color: #2563eb !important;
}

/* Excel Documents */
.document-card .card-icon[data-icon="xls"]::before {
  content: "📊" !important;
  color: #16a34a !important;
}

/* PowerPoint Documents */
.document-card .card-icon[data-icon="ppt"]::before {
  content: "📑" !important;
  color: #7c3aed !important;
}

/* Image Files */
.document-card .card-icon[data-icon="image"]::before {
  content: "🖼️" !important;
  color: #0891b2 !important;
}

/* Archive Files */
.document-card .card-icon[data-icon="archive"]::before {
  content: "🗜️" !important;
  color: #ea580c !important;
}

/* Text Files */
.document-card .card-icon[data-icon="txt"]::before {
  content: "📄" !important;
  color: #6b7280 !important;
}

/* Video Files */
.document-card .card-icon[data-icon="video"]::before {
  content: "🎥" !important;
  color: #be185d !important;
}

/* Audio Files */
.document-card .card-icon[data-icon="audio"]::before {
  content: "🎵" !important;
  color: #059669 !important;
}

/* ========================================
   WIFI NETWORKS STYLING
   ======================================== */

.wifi-networks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wifi-network-item {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  position: relative;
}

.network-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.network-band {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Band-specific colors */
.network-band:contains("2.4GHz") {
  color: var(--info-color);
}

.network-band:contains("5GHz") {
  color: var(--warning-color);
}

.network-band:contains("6GHz") {
  color: var(--danger-color);
}

.network-status {
  font-size: 1.25rem;
}

.network-status.online {
  color: var(--success-color);
}

.network-status.offline {
  color: var(--danger-color);
}

.network-details {
  margin-bottom: 1rem;
}

.network-ssid, .network-password {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.password-hidden {
  font-family: monospace;
  letter-spacing: 2px;
}

.network-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-toggle-password {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-size: 1rem;
}

.btn-toggle-password:hover {
  background: var(--accent);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

/* Guest Networks Styling */
.guest-networks {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border-color);
}

.guest-networks-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.guest-network {
  border-left: 4px solid var(--info-color);
  background: rgba(52, 152, 219, 0.05);
}

.network-type {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.guest-type {
  background: var(--info-color);
  color: white;
}

/* WiFi Section Styling */
.wifi-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Modern WiFi Cards - shadcn/ui inspired */
.wifi-networks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.wifi-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.2s ease;
}

.wifi-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.wifi-card-guest {
  border-left: 4px solid var(--info-color);
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.02) 0%, rgba(52, 152, 219, 0.05) 100%);
}

.wifi-card-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--light-bg);
}

.wifi-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wifi-band-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.wifi-band-24 {
  background: var(--primary-color);
  color: white;
}

.wifi-band-5 {
  background: #f97316;
  color: white;
}

.wifi-band-6 {
  background: var(--danger-color);
  color: white;
}

.wifi-type-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--info-color);
  color: white;
}

.wifi-status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--success-color);
  color: white;
  margin-left: auto;
}

.wifi-card-content {
  padding: 1.5rem;
}

.wifi-info-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wifi-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--light-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.wifi-label {
  font-weight: 600;
  color: var(--text-dark);
  min-width: 80px;
}

.wifi-value {
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.wifi-copy-btn,
.wifi-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.wifi-copy-btn:hover {
  background: var(--primary-color);
  color: white;
}

.wifi-toggle-btn:hover {
  background: var(--accent);
  color: white;
}

.wifi-card-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--light-bg);
}

.wifi-action-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.wifi-action-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 1rem;
}

/* Responsive design for WiFi cards */
@media (max-width: 768px) {
  .wifi-networks {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .wifi-card-header,
  .wifi-card-content,
  .wifi-card-footer {
    padding: 1rem;
  }
  
  .wifi-card-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .wifi-status-badge {
    margin-left: 0;
  }
  
  .wifi-info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .wifi-label {
    min-width: auto;
  }
}

.wifi-section .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.wifi-section .section-header h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.wifi-section .section-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.wifi-networks-group {
  margin-bottom: 3rem;
}

.wifi-group-title {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.wifi-help-section {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.wifi-help-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.wifi-help-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.help-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.help-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.help-text {
  text-align: left;
  color: var(--text-dark);
}

.wifi-help-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   ANNOUNCEMENT READ STATUS
   ======================================== */

.read-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--success);
  color: var(--success-foreground);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: default;
  user-select: none;
}

.announcement-item.read {
  opacity: 0.8;
  background: var(--muted);
}

.announcement-item.read .announcement-title {
  color: var(--text-muted);
}

/* ========================================
   NOTIFICATION SYSTEM
   ======================================== */

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.5rem;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notification-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.notification-message {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
}

/* Notification Types */
.notification-success {
  border-color: var(--success);
  background: #f0fdf4;
}

.notification-success .notification-icon {
  color: var(--success);
}

.notification-error {
  border-color: var(--danger-color);
  background: #fef2f2;
}

.notification-error .notification-icon {
  color: var(--danger-color);
}

.notification-info {
  border-color: var(--info-color);
  background: #f0f9ff;
}

.notification-info .notification-icon {
  color: var(--info-color);
}

/* No Documents State */
.no-documents {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.no-documents-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-documents p {
  font-size: 1.125rem;
  margin: 0;
  font-weight: 500;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design for Documents */
@media (max-width: 768px) {
  .documents-container {
    gap: 2rem;
  }
  
  .documents-section-group {
    padding: 1.5rem;
  }
  
  .documents-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .document-card .card-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn-sm {
  width: 100%;
    justify-content: center;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
}

/* Override any conflicting styles from other CSS files */
.documents-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
  gap: 1.5rem !important;
}

.document-card {
  display: block !important;
  background: white !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow) !important;
}

/* Ensure old document styles don't interfere */
.document-item {
  display: none !important;
}

.documents-list {
  display: none !important;
}

.content-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.content-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.content-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.content-card .icon {
  font-size: 1.25rem;
}

.content-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.content-card-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 41, 112, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--accent);
  border-color: var(--border);
}

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

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Content Sections */
.content-section {
  display: none;
    opacity: 0;
    transform: translateY(20px);
  transition: all 0.3s ease;
  }

.content-section.active {
  display: block;
    opacity: 1;
    transform: translateY(0);
}

.content-section.hidden {
  display: none;
    opacity: 0;
  transform: translateY(-20px);
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .welcome-title {
    font-size: 1.5rem;
  }
  
  .welcome-subtitle {
    font-size: 1rem;
  }
  
  .content-cards {
    grid-template-columns: 1fr;
  }
  
  .test-navigation-buttons {
    flex-direction: column;
  }
  
  .test-nav-button {
    text-align: center;
  }
  
  .content-card-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}
