/* MagicBlocks DataRoom - World-Class Design System */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #191e32;
  line-height: 1.6;
  min-height: 100vh;
}

/* Design Tokens */
:root {
  --primary: #ff3f7a;
  --primary-dark: #e6396c;
  --primary-light: #ff5b8d;
  --secondary: #1faae8;
  --secondary-dark: #1c9bd6;
  --secondary-light: #30c4f2;
  --success: #37bc9b;
  --success-dark: #32a889;
  --success-light: #47ddb2;
  --warning: #f9ad03;
  --warning-dark: #e09b02;
  --warning-light: #f9c33e;
  --error: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #191e32;
  --gray-900: #30364b;
  --white: #ffffff;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --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);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-800);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* Header */
header {
  background: var(--white);
  padding: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--gray-200);
  width: 100%;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo img {
  height: 2.5rem;
  width: auto;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.header-subtitle {
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Main Content Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-sm {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Email Gate Section */
.gate-section {
  margin-top: 6rem;
  text-align: center;
}

.gate-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gate-subtitle {
  font-size: 1.25rem;
  color: var(--gray-600);
  margin-bottom: 3rem;
  font-weight: 400;
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

.btn-full {
  width: 100%;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

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

.card-restricted {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
}

/* Document Grid */
.docs-section {
  margin-top: 4rem;
  display: none;
}

.docs-section.active {
  display: block;
}

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

.docs-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.docs-subtitle {
  font-size: 1.125rem;
  color: var(--gray-600);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.doc-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.3s ease;
}

.doc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.doc-card.restricted {
  border-color: var(--warning);
  background: linear-gradient(135deg, var(--white) 0%, #fefce8 100%);
}

.doc-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.doc-icon.pdf { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.doc-icon.docx { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.doc-icon.pptx { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.doc-icon.xlsx { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); }
.doc-icon.zip { background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%); }
.doc-icon.default { background: linear-gradient(135deg, var(--gray-400) 0%, var(--gray-500) 100%); }

.doc-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.doc-filename {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.doc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-badge.open {
  background: #dcfce7;
  color: #166534;
}

.doc-badge.restricted {
  background: #fef3c7;
  color: #92400e;
}

.doc-lock {
  color: var(--gray-400);
  font-size: 0.875rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

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

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.modal-text {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
}

/* Loading States */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
}

.loading.active {
  display: flex;
}

.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--gray-200);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

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

.loading-text {
  color: var(--gray-600);
  font-weight: 500;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-top: 1.5rem;
  border-left: 4px solid;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #dc2626;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #16a34a;
}

.animate-slide-in {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Footer */
footer {
  margin-top: 6rem;
  padding-bottom: 3rem;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Responsive Design */
/* Small screens (phones) */
@media (max-width: 420px) {
  .container, .container-sm {
    padding: 0 0.75rem;
  }
  
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }
  
  .doc-card {
    padding: 1.25rem;
  }
  
  .doc-icon {
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.875rem;
  }
  
  .doc-title {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  html { font-size: 14px; }
  
  header {
    padding: 1rem;
  }
  
  header .container {
    padding: 0 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo img {
    height: 2rem;
  }
  
  .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .gate-title {
    font-size: 2.5rem;
  }
  
  .gate-section {
    margin-top: 3rem;
  }
  
  .container, .container-sm {
    padding: 0 1rem;
  }
  
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .doc-card {
    padding: 1.5rem;
  }
  
  .doc-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .doc-title {
    font-size: 1.125rem;
  }
  
  .modal {
    padding: 1rem;
  }
  
  .modal-content {
    padding: 2rem;
  }
  
  .modal-actions {
    flex-direction: column;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
}

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

.empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-text {
  color: var(--gray-500);
}

/* Admin Styles */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.login-card {
  max-width: 400px;
  width: 100%;
  margin: 2rem;
}

.login-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--warning) 0%, var(--error) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  box-shadow: var(--shadow-lg);
}

.login-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--gray-600);
  font-weight: 400;
}

.admin-dashboard {
  min-height: 100vh;
  background: var(--gray-50);
}

.admin-dashboard.hidden {
  display: none;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  margin-bottom: 3rem;
}

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

.stat-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.stat-primary { color: var(--primary); }
.stat-success { color: var(--success); }
.stat-secondary { color: var(--secondary); }

/* Admin Sections */
.admin-section {
  margin-bottom: 3rem;
}

.section-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.section-content {
  padding: 2rem;
}

/* Form Styles */
.upload-form {
  max-width: none;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.form-actions {
  margin-top: 2rem;
  text-align: right;
}

.file-input {
  padding: 0.75rem;
  border: 2px dashed var(--gray-300);
  background: var(--gray-50);
  transition: all 0.2s ease;
}

.file-input:hover {
  border-color: var(--primary);
  background: var(--white);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  table-layout: fixed;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table th:nth-child(1) { width: 40%; }
.admin-table th:nth-child(2) { width: 18%; }
.admin-table th:nth-child(3) { width: 12%; }
.admin-table th:nth-child(4) { width: 30%; }

.admin-table thead {
  background: var(--gray-50);
}

.admin-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-200);
}

.admin-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.admin-table tbody tr:hover {
  background: var(--gray-50);
}

.doc-file-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--white);
  background: var(--gray-400);
  margin-right: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.doc-file-icon:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.doc-file-icon.pdf {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.doc-file-icon.docx {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.doc-file-icon.pptx {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.doc-file-icon.xlsx {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.doc-file-icon.zip {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.doc-file-icon.default {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.doc-info {
  display: flex;
  align-items: center;
}

.doc-details {
  flex: 1;
}

.doc-name {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.doc-file {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.access-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.access-open {
  background: #dcfce7;
  color: #166534;
}

.access-restricted {
  background: #fef3c7;
  color: #92400e;
}

.action-buttons {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  background: var(--white);
  color: var(--gray-700);
  min-width: fit-content;
  white-space: nowrap;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

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

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

.action-btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.action-btn-success:hover {
  background: #059669;
  border-color: #059669;
}

.action-btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.action-btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

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

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

/* Chart Container */
.chart-container {
  height: 400px;
  position: relative;
}

/* Activity Tabs */
.activity-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
}

.activity-tab {
  padding: 1rem 2rem;
  background: none;
  border: none;
  color: var(--gray-600);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.activity-tab:hover {
  color: var(--gray-900);
}

.activity-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.activity-content {
  display: none;
}

.activity-content.active {
  display: block;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-xl);
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid;
  z-index: 1000;
  max-width: 400px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

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

.notification.success {
  border-color: var(--success);
  background: #f0fdf4;
  color: #166534;
}

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

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.animate-slide-in {
  animation: slideIn 0.3s ease forwards;
}

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-dashboard {
    padding-top: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .section-header, .section-content {
    padding: 1.5rem 1rem;
  }
  
  .admin-section {
    margin-bottom: 2rem;
  }
  
  .admin-table {
    font-size: 0.875rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .admin-table thead,
  .admin-table tbody,
  .admin-table th,
  .admin-table td,
  .admin-table tr {
    display: block;
  }
  
  .admin-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .admin-table tr {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
  }
  
  .admin-table td {
    border: none;
    padding: 0.5rem 0;
    position: relative;
    padding-left: 40% !important;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
  }
  
  .admin-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--gray-700);
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 0.375rem;
    align-items: stretch;
    width: 100%;
  }
  
  .action-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    justify-content: center;
    min-width: auto;
    width: 100%;
  }
  
  .action-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .doc-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .doc-file-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }
  
  .notification {
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  .modal-content {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  
  .activity-tab {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    min-width: 120px;
    text-align: center;
  }
  
  .activity-controls {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .activity-controls .form-group {
    margin: 0;
  }
  
  .activity-controls button {
    width: 100%;
    padding: 0.75rem;
  }
  
  .checkbox-group {
    margin: 0.5rem 0;
  }
  
  .checkbox-label {
    font-size: 0.875rem;
    padding: 0.5rem 0;
    display: block;
    cursor: pointer;
  }
} 

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.pagination-info {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin: 0 1rem;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.pagination-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--gray-100);
}

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

.pagination-btn.active:hover {
  background: var(--primary-dark);
}

@media (max-width: 768px) {
  .pagination-controls {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .pagination-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    min-width: 35px;
  }
  
  .pagination-info {
    margin: 0 0.5rem;
    font-size: 0.8rem;
  }
} 

/* PDF Viewer Modal Styles */
.pdf-viewer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pdf-viewer-modal.active {
  display: flex;
  opacity: 1;
}

.pdf-viewer-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--gray-900);
  color: var(--white);
}

/* PDF Viewer Header */
.pdf-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid var(--gray-700);
  backdrop-filter: blur(8px);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 1;
}

.pdf-viewer-header.auto-hide {
  transform: translateY(-100%);
  opacity: 0;
}

.back-btn, .download-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gray-800);
  border: 1px solid var(--gray-600);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover, .download-btn:hover {
  background: var(--gray-700);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.pdf-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
  text-align: center;
  flex: 1;
}

/* PDF Viewer Content */
.pdf-viewer-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
  padding-bottom: 80px;
  transition: padding 0.3s ease-in-out;
}

.pdf-viewer-content.ui-hidden {
  padding-top: 0;
  padding-bottom: 0;
}

.pdf-canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  cursor: grab;
}

.pdf-canvas-container:active {
  cursor: grabbing;
}

.pdf-canvas-container.scrollable {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 20px;
}

.pdf-canvas-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  min-height: 100%;
}

.pdf-canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  background: var(--white);
}

.pdf-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--white);
}

.pdf-loading.hidden {
  display: none;
}

/* Navigation Arrows */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
  opacity: 1;
}

.nav-arrow.auto-hide {
  opacity: 0;
  pointer-events: none;
}

.nav-arrow:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.9);
}

.nav-arrow-left {
  left: 2rem;
}

.nav-arrow-right {
  right: 2rem;
}

/* PDF Viewer Footer */
.pdf-viewer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.9);
  border-top: 1px solid var(--gray-700);
  backdrop-filter: blur(8px);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 1;
}

.pdf-viewer-footer.auto-hide {
  transform: translateY(100%);
  opacity: 0;
}

.pdf-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.zoom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: var(--radius);
  background: var(--gray-800);
  color: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: var(--gray-700);
  transform: scale(1.1);
}

.zoom-level {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-300);
  min-width: 3rem;
  text-align: center;
}

.page-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-300);
  background: var(--gray-800);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

#currentPageNum {
  color: var(--primary);
  font-weight: 600;
}

/* Mobile Responsive PDF Viewer */
@media (max-width: 768px) {
  .pdf-viewer-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .pdf-title {
    font-size: 1.125rem;
  }
  
  .back-btn, .download-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .nav-arrow {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .nav-arrow-left {
    left: 1rem;
  }
  
  .nav-arrow-right {
    right: 1rem;
  }
  
  .pdf-viewer-footer {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .pdf-controls {
    order: 2;
  }
  
  .page-counter {
    order: 1;
  }
}

@media (max-width: 420px) {
  .pdf-viewer-header {
    padding: 0.75rem;
  }
  
  .back-btn, .download-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .nav-arrow {
    width: 2rem;
    height: 2rem;
  }
  
  .nav-arrow-left {
    left: 0.5rem;
  }
  
  .nav-arrow-right {
    right: 0.5rem;
  }
  
  .pdf-viewer-footer {
    padding: 0.75rem;
  }
} 