/* ==================================================
   CLEAN ACADEMIC THEME - Digital Library System
   Professional educational design with Material principles
   ================================================== */

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

/* ==================================================
   COLOR PALETTE
   ================================================== */
:root {
  /* Primary Colors */
  --navy-blue: #1e3a8a;
  --navy-blue-dark: #1e40af;
  --navy-blue-darker: #1e293b;
  --bright-orange: #f97316;
  --bright-orange-dark: #ea580c;

  /* Secondary Colors */
  --sky-blue: #3b82f6;
  --sky-blue-dark: #2563eb;
  --warm-gray: #6b7280;
  --light-gray: #f3f4f6;
  --border-gray: #e5e7eb;
  --white: #ffffff;

  /* Semantic Colors */
  --success-green: #10b981;
  --success-green-light: #d1fae5;
  --warning-yellow: #fbbf24;
  --warning-yellow-light: #fef3c7;
  --error-red: #ef4444;
  --error-red-light: #fee2e2;
  --info-cyan: #06b6d4;
  --info-cyan-light: #cffafe;
}

/* ==================================================
   BASE STYLES
   ================================================== */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #374151;
  background: var(--light-gray);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}

h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 600; }
h3 { font-size: 22px; font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }
h5 { font-size: 16px; font-weight: 600; }
h6 { font-size: 14px; font-weight: 600; }

/* ==================================================
   CARD COMPONENTS
   ================================================== */

/* Main Card - Elevated Material Style */
.glass-card {
  background: var(--white);
  border-radius: 12px;
  border: none;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Dark Card Variant */
.glass-card-dark {
  background: var(--navy-blue-darker);
  border-radius: 12px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.15);
  color: var(--white);
}

/* ==================================================
   BUTTON COMPONENTS
   ================================================== */

/* Primary Button (Navy Blue) */
.glass-button,
button[type="submit"],
.btn-primary {
  background: var(--navy-blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.glass-button:hover,
button[type="submit"]:hover,
.btn-primary:hover {
  background: var(--navy-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
}

.glass-button:active,
button[type="submit"]:active,
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(30, 58, 138, 0.3);
}

/* Secondary Button (Orange) */
.btn-secondary,
.btn-orange {
  background: var(--bright-orange);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
  transition: all 0.2s ease;
}

.btn-secondary:hover,
.btn-orange:hover {
  background: var(--bright-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--warm-gray);
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--navy-blue);
  color: var(--navy-blue);
  background: rgba(30, 58, 138, 0.05);
}

/* Small Icon Buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--light-gray);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--border-gray);
  transform: scale(1.05);
}

/* ==================================================
   INPUT & FORM COMPONENTS
   ================================================== */

/* Glass Input (Clean Material Style) */
.glass-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="tel"],
textarea,
select {
  background: var(--white);
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  color: #374151;
  transition: all 0.2s ease;
  width: 100%;
}

.glass-input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--sky-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.glass-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

/* Checkbox & Radio Buttons */
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--navy-blue);
  cursor: pointer;
}

/* Input fields with icons - add left padding to prevent overlap */
.position-relative input[type="text"],
.position-relative input[type="email"],
.position-relative input[type="password"],
.position-relative input[type="number"],
.position-relative input[type="tel"],
.position-relative input[type="url"],
.relative input[type="text"],
.relative input[type="email"],
.relative input[type="password"],
.relative input[type="number"],
.relative input[type="tel"],
.relative input[type="url"] {
  padding-left: 48px;
}

/* ==================================================
   NAVIGATION & SIDEBAR
   ================================================== */

/* Glass Navbar */
.glass-navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border-gray);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Glass Sidebar */
.glass-sidebar {
  background: linear-gradient(180deg, var(--navy-blue) 0%, var(--navy-blue-darker) 100%);
  border-right: none;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
}

/* Sidebar Links */
.sidebar-link {
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  padding: 12px 20px;
  border-radius: 8px;
  margin: 4px 12px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.sidebar-link.active {
  background: var(--bright-orange);
  color: var(--white);
  font-weight: 600;
}

/* ==================================================
   TABLE COMPONENTS
   ================================================== */

/* Table Base */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

/* Table Header */
thead tr {
  background: var(--navy-blue);
  color: var(--white);
}

thead th {
  padding: 16px 24px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

thead th:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

thead th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Table Body */
tbody tr {
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

tbody tr:hover {
  background: #f9fafb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

tbody td {
  padding: 16px 24px;
  border-top: 1px solid var(--border-gray);
  border-bottom: 1px solid var(--border-gray);
}

tbody td:first-child {
  border-left: 1px solid var(--border-gray);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

tbody td:last-child {
  border-right: 1px solid var(--border-gray);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* ==================================================
   BADGE COMPONENTS
   ================================================== */

/* Base Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

/* Primary Badge */
.badge-primary {
  background: var(--navy-blue);
  color: var(--white);
}

/* Secondary Badge */
.badge-secondary {
  background: var(--bright-orange);
  color: var(--white);
}

/* Success Badge */
.badge-success {
  background: var(--success-green);
  color: var(--white);
}

/* Warning Badge */
.badge-warning {
  background: var(--warning-yellow);
  color: #78350f;
}

/* Danger Badge */
.badge-danger {
  background: var(--error-red);
  color: var(--white);
}

/* Info Badge */
.badge-info {
  background: var(--info-cyan);
  color: var(--white);
}

/* ==================================================
   ALERT COMPONENTS
   ================================================== */

/* Alert Base */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 4px solid;
  margin-bottom: 20px;
  display: flex;
  align-items: start;
  gap: 12px;
}

/* Success Alert */
.alert-success {
  background: var(--success-green-light);
  border-left-color: var(--success-green);
  color: #065f46;
}

/* Error/Danger Alert */
.alert-danger,
.alert-error {
  background: var(--error-red-light);
  border-left-color: var(--error-red);
  color: #991b1b;
}

/* Warning Alert */
.alert-warning {
  background: var(--warning-yellow-light);
  border-left-color: var(--warning-yellow);
  color: #78350f;
}

/* Info Alert */
.alert-info {
  background: var(--info-cyan-light);
  border-left-color: var(--info-cyan);
  color: #164e63;
}

/* ==================================================
   GRADIENT UTILITIES
   ================================================== */

/* Primary Gradient (Navy to Sky Blue) */
.gradient-primary {
  background: linear-gradient(135deg, var(--navy-blue) 0%, var(--sky-blue) 100%);
}

/* Secondary Gradient (Orange) */
.gradient-secondary,
.gradient-orange {
  background: linear-gradient(135deg, var(--bright-orange) 0%, var(--bright-orange-dark) 100%);
}

/* Success Gradient */
.gradient-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Danger Gradient */
.gradient-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Warning Gradient */
.gradient-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* Info Gradient */
.gradient-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* ==================================================
   SHADOW UTILITIES
   ================================================== */

.shadow-sm {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shadow {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.shadow-md {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
}

.shadow-glass {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
}

.shadow-glass-lg {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* ==================================================
   ANIMATIONS
   ================================================== */

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

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

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-in {
  animation: scaleIn 0.2s ease-out;
}

/* Slide Up */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

/* Float Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.float-element {
  animation: float 3s ease-in-out infinite;
}

/* ==================================================
   SCROLLBAR STYLING
   ================================================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--navy-blue);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--navy-blue-dark);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--navy-blue) var(--light-gray);
}

/* ==================================================
   UTILITY CLASSES
   ================================================== */

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--navy-blue) 0%, var(--sky-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hover Lift Effect */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* Backdrop Blur Classes (Minimal for performance) */
.backdrop-blur-xs,
.backdrop-blur-sm,
.backdrop-blur-md,
.backdrop-blur-lg,
.backdrop-blur-xl,
.backdrop-blur-2xl {
  /* No backdrop blur in this theme - solid backgrounds only */
  background-color: rgba(255, 255, 255, 0.98);
}

/* Decorative Background Elements (Subtle) */
.bg-decoration,
.bg-decoration-1,
.bg-decoration-2 {
  display: none; /* No decorative elements in academic theme */
}

/* ==================================================
   RESPONSIVE UTILITIES
   ================================================== */

@media (max-width: 768px) {
  /* Reduce font sizes on mobile */
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  h4 { font-size: 18px; }

  /* Adjust card padding */
  .glass-card {
    border-radius: 8px;
  }

  /* Adjust button sizes */
  .glass-button,
  button[type="submit"] {
    padding: 10px 20px;
    font-size: 15px;
  }

  /* Stack table cells */
  table {
    border-spacing: 0 4px;
  }

  thead th,
  tbody td {
    padding: 12px 16px;
  }
}

/* ==================================================
   ACCESSIBILITY
   ================================================== */

/* Focus Visible Styles */
:focus-visible {
  outline: 3px solid var(--sky-blue);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .float-element {
    animation: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .glass-card {
    border: 2px solid #000;
  }

  button,
  .glass-button {
    border: 2px solid currentColor;
  }
}

/* ==================================================
   PRINT STYLES
   ================================================== */

@media print {
  body {
    background: white !important;
  }

  .glass-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  button,
  .btn-icon,
  .sidebar {
    display: none !important;
  }

  table {
    border-spacing: 0 !important;
  }

  thead tr {
    background: #f3f4f6 !important;
    color: #000 !important;
  }
}
