/* DIRECTory Master CSS - QPTEO Executive Portal */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --primary: #040484;
  --primary-light: #1616a0;
  --primary-dark: #020252;
  --primary-subtle: rgba(4, 4, 132, 0.08);
  --accent: #edac26;
  --accent-hover: #d89617;
  --accent-subtle: rgba(237, 172, 38, 0.15);
  
  --bg-page: #f4f6fb;
  --bg-card: #ffffff;
  --bg-surface: #ffffff;
  --bg-sidebar: #040484;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #040484;
  
  --success: #10b981;
  --success-subtle: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.12);
  --info: #0284c7;
  --info-subtle: rgba(2, 132, 199, 0.12);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(4, 4, 132, 0.08);
  --shadow-lg: 0 10px 25px rgba(4, 4, 132, 0.12);
  --shadow-hover: 0 12px 30px rgba(4, 4, 132, 0.16);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-card: #131b2e;
  --bg-surface: #18223a;
  --bg-sidebar: #03035c;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #23314f;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --primary-subtle: rgba(147, 168, 255, 0.12);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

[data-theme="dark"] a {
  color: #93a8ff;
}

a:hover {
  opacity: 0.85;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 132, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

body.sidebar-open {
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 270px;
  background: var(--bg-sidebar);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s ease;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.brand-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
}

.brand-direct {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-ory {
  color: #edac36;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-left: 0;
  padding-left: 0;
}

.sidebar-nav {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: none;
}

.nav-item.active svg {
  stroke: var(--accent);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item .badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
}

.nav-item.active .badge {
  background: rgba(4, 4, 132, 0.15);
  color: #040484;
}

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.user-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

/* Top Navbar */
.topbar {
  height: 68px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.mobile-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.mobile-toggle:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

/* Global Search Trigger Bar */
.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  width: 380px;
  max-width: 100%;
  min-width: 0;
  transition: var(--transition);
}

.search-trigger-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.search-text-full {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
}

.search-text-short {
  display: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
}

.search-trigger-btn .kbd-shortcut {
  margin-left: auto;
  font-size: 0.72rem;
  font-family: monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-action-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-label-short {
  display: none;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

/* Content View */
.content-body {
  padding: 28px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Page Headers */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-content {
  flex: 1;
  min-width: 240px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-body {
  padding: 22px;
}

/* Stat Cards (Executive 4-Grid on Desktop, 2x2 on Mobile/Tablet) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.stat-card.accent::before {
  background: var(--accent);
}

.stat-card-bday::before {
  background: #d97706;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card.accent .stat-icon {
  background: var(--accent-subtle);
  color: #b45309;
}

.stat-icon-bday {
  background: rgba(237, 172, 38, 0.15);
  color: #b45309;
}

.stat-content {
  min-width: 0;
  flex: 1;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(4, 4, 132, 0.25);
}

.btn-primary:hover {
  background: var(--primary-light);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(4, 4, 132, 0.35);
}

.btn-accent {
  background: var(--accent);
  color: #040484;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(237, 172, 38, 0.3);
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #040484;
}

.btn-outline {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-main);
}

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

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

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.badge-primary { background: var(--primary-subtle); color: var(--primary); }
.badge-accent { background: var(--accent-subtle); color: #b45309; }
.badge-success { background: var(--success-subtle); color: var(--success); }
.badge-warning { background: var(--warning-subtle); color: var(--warning); }
.badge-danger { background: var(--danger-subtle); color: var(--danger); }
.badge-info { background: var(--info-subtle); color: var(--info); }
.badge-slate { background: #f1f5f9; color: #475569; }

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

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

.data-table th {
  background: var(--bg-page);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: var(--primary-subtle);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

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

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success { background: var(--success-subtle); color: #065f46; border: 1px solid rgba(16, 185, 129, 0.3); }
.alert-error { background: var(--danger-subtle); color: #991b1b; border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-info { background: var(--info-subtle); color: #075985; border: 1px solid rgba(2, 132, 199, 0.3); }

/* Global Search Modal (Ctrl+K Command Center) */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 132, 0.4);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.search-modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.search-modal {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.search-input-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.search-input-header input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 1.15rem;
  font-family: inherit;
  color: var(--text-main);
  background: transparent;
}

.search-results-container {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}

.search-category-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}

.search-result-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-main);
  transition: var(--transition);
  text-decoration: none;
}

.search-result-item:hover, .search-result-item.selected {
  background: var(--primary-subtle);
  color: var(--primary);
}

.search-modal-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Personnel Grid & Card Styles */
.personnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.personnel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.personnel-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.personnel-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.personnel-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.personnel-pos {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.personnel-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  flex: 1;
}

.personnel-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.personnel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Dashboard Search Banner Callout */
.dashboard-search-banner {
  margin-bottom: 28px;
  background: linear-gradient(135deg, #040484 0%, #1616a0 100%);
  color: #ffffff;
  border: none;
}

.dashboard-search-banner .card-body {
  padding: 24px 28px;
}

.search-banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.search-banner-text {
  flex: 1;
  min-width: 240px;
}

.search-banner-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.search-banner-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.search-banner-btn {
  flex-shrink: 0;
}

/* Two-Column Dashboard Widgets Grid */
.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 24px;
  margin-bottom: 28px;
  align-items: start;
}

/* Profile Layout Grid */
.profile-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  margin-bottom: 30px;
}

.card-header-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

[data-theme="dark"] .card-header-link {
  color: #93a8ff;
}

.empty-bday-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.bday-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Birthday Widget Item */
.bday-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  transition: var(--transition);
  gap: 12px;
}

.bday-item:hover {
  background: var(--accent-subtle);
}

.bday-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.bday-details {
  min-width: 0;
  flex: 1;
}

.bday-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.bday-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bday-meta {
  text-align: right;
  flex-shrink: 0;
}

.bday-date {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
}

[data-theme="dark"] .bday-date {
  color: #93a8ff;
}

.bday-days-left {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.bday-badge-today {
  background: var(--accent);
  color: #040484;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Recent Repositories Table Elements */
.repo-title-text {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.3;
}

.repo-subcat-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Quick Administration Shortcuts */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.shortcut-btn {
  justify-content: flex-start;
  padding: 12px 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Filter Bar */
.filter-bar, .team-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.team-filter-search {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.team-filter-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px !important;
  height: 16px !important;
  color: var(--text-muted);
  pointer-events: none;
}

.team-filter-search-input {
  padding-left: 36px !important;
}

.team-filter-grid {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.team-filter-item {
  min-width: 150px;
}

.team-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-filter-btn {
  white-space: nowrap;
}

.team-filter-reset-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.cat-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
}

.cat-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cat-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(4, 4, 132, 0.25);
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 1000;
    height: 100vh;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .sidebar-close-btn {
    display: inline-flex;
  }
  
  .mobile-toggle {
    display: inline-flex;
  }
  
  .dashboard-widgets-grid,
  .profile-layout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .search-trigger-btn {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 16px;
    height: 62px;
    gap: 10px;
  }
  
  .content-body {
    padding: 16px;
  }
  
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }
  
  .page-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }
  
  .page-header-actions .btn {
    width: 100%;
    padding: 9px 10px;
    font-size: 0.82rem;
  }
  
  .page-title {
    font-size: 1.4rem;
  }
  
  .page-subtitle {
    font-size: 0.82rem;
  }
  
  /* STAT CARDS 2x2 GRID ON MOBILE */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }
  
  .stat-card {
    padding: 14px 12px !important;
    gap: 10px !important;
    border-radius: var(--radius-md) !important;
  }
  
  .stat-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
  }
  
  .stat-icon svg {
    width: 18px !important;
    height: 18px !important;
  }
  
  .stat-value {
    font-size: 1.4rem !important;
  }
  
  .stat-label {
    font-size: 0.68rem !important;
    letter-spacing: 0.02em !important;
    margin-top: 2px !important;
  }
  
  .search-trigger-btn {
    width: auto;
    flex: 1;
    padding: 7px 12px;
    gap: 6px;
  }
  
  .search-text-full {
    display: none;
  }
  
  .search-text-short {
    display: inline-block;
    font-size: 0.82rem;
  }
  
  .search-trigger-btn .kbd-shortcut {
    display: none;
  }
  
  .dashboard-search-banner .card-body {
    padding: 18px 20px;
  }
  
  .search-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  
  .search-banner-title {
    font-size: 1.15rem;
  }
  
  .search-banner-btn {
    width: 100%;
  }
  
  .shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .shortcut-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  
  .shortcut-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  
  /* Team Filter 2x2 Grid on Mobile */
  .team-filter-bar {
    padding: 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .team-filter-search {
    width: 100%;
    min-width: 100%;
  }

  .team-filter-search .form-control {
    width: 100%;
    height: 42px;
  }
  
  .team-filter-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  
  .team-filter-item {
    width: 100% !important;
    min-width: 0 !important;
  }
  
  .team-filter-item .form-control {
    width: 100%;
    font-size: 0.78rem;
    padding: 8px 6px;
    height: 40px;
    text-overflow: ellipsis;
  }
  
  .team-filter-actions {
    display: flex;
    gap: 6px;
    width: 100%;
  }
  
  .team-filter-btn {
    flex: 1;
    width: 100%;
    height: 40px;
    padding: 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
  }
  
  .team-filter-reset-btn {
    height: 40px;
    padding: 0 12px;
    font-size: 0.8rem;
    font-weight: 700;
  }

  /* Document Repositories Filter Row on Mobile (Strictly Side-by-Side) */
  .repo-filter-row {
    gap: 8px;
    margin-bottom: 1rem;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .portal-picker-btn {
    height: 40px;
    padding: 0 0.65rem;
    font-size: 0.8rem;
  }

  .portal-picker-label {
    font-size: 0.8rem;
  }

  .repo-reset-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 520px) {
  .repo-filter-row {
    gap: 6px;
  }

  .portal-picker-btn {
    padding: 0 0.5rem;
    font-size: 0.76rem;
  }

  .portal-picker-label {
    font-size: 0.76rem;
    margin-right: 0.25rem;
  }

  .portal-picker-chevron {
    width: 14px;
    height: 14px;
  }

  .topbar {
    padding: 0 12px;
    height: 58px;
  }
  
  .topbar-left {
    gap: 8px;
  }
  
  .topbar-actions {
    gap: 6px;
  }
  
  .topbar-action-btn {
    padding: 6px 9px;
    font-size: 0.75rem;
  }
  
  .btn-label-full {
    display: none;
  }
  
  .btn-label-short {
    display: inline-block;
  }
  
  .btn-icon {
    width: 34px;
    height: 34px;
  }
  
  .mobile-toggle {
    width: 34px;
    height: 34px;
    padding: 4px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  
  .stat-card {
    padding: 12px 10px !important;
    gap: 8px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .stat-icon {
    width: 32px !important;
    height: 32px !important;
  }
  
  .stat-value {
    font-size: 1.3rem !important;
  }
  
  .stat-label {
    font-size: 0.65rem !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.2 !important;
  }
  
  .page-header-actions {
    grid-template-columns: 1fr;
  }
  
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
  
  .search-modal-backdrop {
    padding: 40px 10px 10px;
  }
}

@media (max-width: 380px) {
  .search-trigger-btn {
    padding: 6px 8px;
  }
  
  .search-text-short {
    display: none;
  }
  
  .topbar-action-btn {
    padding: 6px 7px;
  }
}

/* ==========================================================================
   Executive Data Tables & Action Buttons
   ========================================================================== */
.table-responsive, .table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.table, .data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  color: var(--text-main);
}

.table thead th, .data-table thead th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}

.table tbody td, .data-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  transition: background 0.15s ease;
}

.table tbody tr:hover td, .data-table tbody tr:hover td {
  background: var(--primary-subtle);
}

.table tbody tr:last-child td, .data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Action button styles */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  line-height: 1.2;
}

.action-btn-open {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.25);
}

.action-btn-open:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.action-btn-edit {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: rgba(4, 4, 132, 0.2);
}

.action-btn-edit:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.action-btn-delete {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.25);
}

.action-btn-delete:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}


/* File Badges */
.file-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.file-badge-pdf    { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.file-badge-docs   { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.file-badge-sheets { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.file-badge-slides { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.file-badge-folder { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }
.file-badge-others { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

[data-theme="dark"] .file-badge-pdf    { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
[data-theme="dark"] .file-badge-docs   { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border-color: rgba(59, 130, 246, 0.3); }
[data-theme="dark"] .file-badge-sheets { background: rgba(34, 197, 94, 0.18); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
[data-theme="dark"] .file-badge-slides { background: rgba(245, 158, 11, 0.18); color: #fde68a; border-color: rgba(245, 158, 11, 0.3); }
[data-theme="dark"] .file-badge-folder { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.3); }
[data-theme="dark"] .file-badge-others { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.3); }

/* Dual-Dropdown Filter Row (Always Side-by-Side) */
.repo-filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    width: 100%;
}

.repo-select-wrapper {
    flex: 1;
    min-width: 0;
}

.portal-picker-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 44px;
    padding: 0 0.85rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    min-width: 0;
}

.portal-picker-btn:hover {
    border-color: var(--primary);
    background: var(--bg-surface);
}

.portal-picker-btn.is-active {
    border-color: var(--primary);
    background: var(--primary-subtle);
    color: var(--primary);
    font-weight: 700;
}

.portal-picker-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0.4rem;
    flex: 1;
    min-width: 0;
}

.portal-picker-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.repo-reset-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.repo-reset-btn:hover {
    background: var(--danger-subtle);
    border-color: var(--danger);
}

/* Bottom Sheet Picker Modal */
body.portal-sheet-open {
    overflow: hidden !important;
}

.portal-bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.25s ease;
}

.portal-bottom-sheet.is-open {
    visibility: visible;
    pointer-events: auto;
}

.portal-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 4, 132, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.portal-bottom-sheet.is-open .portal-sheet-backdrop {
    opacity: 1;
}

.portal-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: 72vh;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.portal-bottom-sheet.is-open .portal-sheet-panel {
    transform: translateY(0);
}

.portal-sheet-handle {
    width: 38px;
    height: 4.5px;
    background: #cbd5e1;
    border-radius: 4px;
    margin: 10px auto 4px auto;
    flex-shrink: 0;
    cursor: grab;
}

.portal-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.portal-sheet-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.portal-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-page);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.portal-sheet-close:hover {
    background: var(--border);
    color: var(--text-main);
}

.portal-sheet-search-wrap {
    position: relative;
    padding: 0.65rem 1.25rem;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.portal-sheet-search-icon {
    position: absolute;
    left: 2rem;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.portal-sheet-search-input {
    width: 100%;
    height: 38px;
    padding: 0 2.2rem 0 2.4rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.86rem;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.portal-sheet-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

.portal-sheet-search-clear {
    position: absolute;
    right: 1.85rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
}

.portal-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 12px)) 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.portal-sheet-group {
    margin-bottom: 0.25rem;
}

.portal-sheet-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    padding: 0.65rem 0.75rem 0.35rem 0.75rem;
    border-top: 1px dashed var(--border);
    margin-top: 0.4rem;
}

.portal-sheet-group:first-child .portal-sheet-group-title {
    border-top: none;
    margin-top: 0;
}

.portal-sheet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.72rem 0.85rem;
    min-height: 44px;
    border-radius: 10px;
    margin-bottom: 3px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: background-color 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}

.portal-sheet-item:hover,
.portal-sheet-item:focus {
    background: var(--primary-subtle);
    outline: none;
}

.portal-sheet-item.is-selected {
    background: var(--primary-subtle);
    color: var(--primary);
    font-weight: 700;
}

.portal-sheet-item-label {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.38;
    color: inherit;
    text-align: left;
    min-width: 0;
}

.portal-sheet-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.portal-sheet-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background: var(--bg-page);
    color: var(--text-muted);
    min-width: 22px;
}

.portal-sheet-item.is-selected .portal-sheet-pill {
    background: rgba(4, 4, 132, 0.14);
    color: var(--primary);
}

.portal-sheet-check {
    width: 16px;
    height: 16px;
    color: var(--primary);
    display: none;
    flex-shrink: 0;
}

.portal-sheet-item.is-selected .portal-sheet-check {
    display: inline-block;
}

.portal-sheet-empty {
    display: none;
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-light);
    font-size: 0.88rem;
}

@media (min-width: 768px) {
    .portal-bottom-sheet {
        align-items: center;
    }
    .portal-sheet-panel {
        border-radius: 16px;
        max-height: 75vh;
        transform: translateY(20px) scale(0.97);
        opacity: 0;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    }
    .portal-bottom-sheet.is-open .portal-sheet-panel {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Media Preview Modal (Exact Match to Image 1) */
.media-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 132, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.media-modal-backdrop.active {
    display: flex;
}

.media-modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 1050px;
    height: 92vh;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.media-modal-header {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #040484;
    color: #ffffff;
    flex-shrink: 0;
}

.media-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    letter-spacing: -0.01em;
}

.media-modal-header .category-badge {
    background: #ffffff;
    color: #040484;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    white-space: nowrap;
}

.media-modal-close {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: background 0.15s ease;
}

.media-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.media-modal-body {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #525659;
}

.media-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.media-modal-footer {
    padding: 10px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    flex-shrink: 0;
}

.media-modal-download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #040484;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.media-modal-download-link:hover {
    color: #edac36;
    text-decoration: underline;
}

.media-modal-close-btn {
    padding: 5px 14px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.media-modal-close-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.doc-preview-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 480px;
    margin: 20px;
}

.doc-preview-card svg {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
}

/* Action Buttons */
.preview-btn, .download-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.preview-btn {
    background: var(--primary-subtle);
    color: var(--primary);
    border: 1px solid rgba(4, 4, 132, 0.2);
}

.preview-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

.download-btn {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.download-btn:hover {
    background: #10b981;
    color: #ffffff;
}

.preview-btn svg, .download-btn svg {
    width: 14px;
    height: 14px;
}

