/* ShareSTI - Official STI College Lending Platform
   Modern Professional Design System v2.0 */

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

/* =========================
   Design Tokens
   ========================= */
:root {
  /* Official STI Colors */
  --sti-blue: #003366;
  --sti-blue-dark: #001d3d;
  --sti-blue-light: #004080;
  --sti-gold: #FFD700;
  --sti-gold-dark: #D4AF00;
  --sti-gold-light: #FFE44D;
  
  /* Neutral Palette */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  
  /* Semantic Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  /* Surface Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --surface-elevated: rgba(255, 255, 255, 0.98);
  
  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.15);
  --shadow-glow: 0 0 40px rgba(255, 215, 0, 0.15);
  --shadow-glow-blue: 0 0 40px rgba(0, 51, 102, 0.1);
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-primary) 0%, #eef2f6 100%);
  min-height: 100vh;
  color: var(--slate-800);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 0% 0%, rgba(0, 51, 102, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(255, 215, 0, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* =========================
   Keyframe Animations
   ========================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
  50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.4); }
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
  0%, 100% { border-color: var(--sti-gold); }
  50% { border-color: var(--sti-gold-light); }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes morphGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* =========================
   Main Layout
   ========================= */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-6);
  position: relative;
  z-index: 1;
  animation: fadeIn 0.5s var(--ease-out);
}

/* =========================
   Top Navigation Bar
   ========================= */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-6);
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 100%);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 215, 0, 0.1);
  position: relative;
  overflow: hidden;
  animation: fadeInDown 0.6s var(--ease-out);
}

/* Gold accent line at bottom */
.top-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--sti-gold), transparent);
  border-radius: var(--radius-full);
}

/* Subtle shimmer effect */
.top-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
  animation: shimmer 3s infinite;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  z-index: 1;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: relative;
  z-index: 1;
}

.logo-icon {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: transform var(--duration-normal) var(--spring);
}

.logo-icon:hover {
  transform: scale(1.05);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  z-index: 1;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--duration-normal) var(--ease-out);
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-1px);
}

.nav-tab.active {
  background: var(--sti-gold);
  color: var(--sti-blue-dark);
  border-color: var(--sti-gold);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.nav-tab.active:hover {
  background: var(--sti-gold-light);
  transform: translateY(-1px);
}

.nav-tab .tab-icon {
  font-size: 1rem;
  transition: transform var(--duration-normal) var(--spring);
}

.nav-tab:hover .tab-icon {
  transform: scale(1.1);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: relative;
  z-index: 1;
}

.user-name {
  font-weight: 600;
  color: white;
  font-size: 0.875rem;
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all var(--duration-normal) var(--ease-out);
}

.user-name:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 215, 0, 0.3);
}

.btn-logout {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-logout::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--danger);
  border-radius: inherit;
  transform: scale(0);
  transition: transform var(--duration-normal) var(--ease-out);
}

.btn-logout svg {
  position: relative;
  z-index: 1;
  transition: transform var(--duration-normal) var(--ease-out);
}

.btn-logout:hover {
  border-color: var(--danger);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-logout:hover::before {
  transform: scale(1);
}

.btn-logout:hover svg {
  transform: translateX(2px);
}

/* =========================
   Tab Navigation
   ========================= */
.tab-nav {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.tab-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--slate-600);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid var(--slate-200);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.tab-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--sti-gold), var(--sti-gold-light));
  border-radius: var(--radius-full) var(--radius-full) 0 0;
  transition: transform var(--duration-normal) var(--ease-out);
}

.tab-link:hover {
  color: var(--sti-blue);
  border-color: var(--slate-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tab-link:hover::before {
  transform: translateX(-50%) scaleX(1);
}

.tab-link.active {
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 100%);
  color: var(--sti-gold);
  border-color: var(--sti-blue);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.tab-link.active::before {
  transform: translateX(-50%) scaleX(1);
  background: linear-gradient(90deg, var(--sti-gold), var(--sti-gold-light), var(--sti-gold));
}

.tab-icon {
  font-size: 1.25rem;
  transition: transform var(--duration-normal) var(--spring);
}

.tab-link:hover .tab-icon {
  transform: scale(1.15);
}

.tab-link.active .tab-icon {
  animation: bounce 1s var(--ease-out) infinite;
}

/* =========================
   Main Card Container
   ========================= */
.card {
  background: var(--surface-elevated);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  animation: scaleIn 0.5s var(--ease-out) 0.2s both;
}

/* Top gradient accent */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sti-blue), var(--sti-gold), var(--sti-blue));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Subtle corner accent */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at top right, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* =========================
   Section Headers
   ========================= */
.section {
  margin-top: var(--space-10);
  animation: fadeInUp 0.5s var(--ease-out);
}

.section:first-of-type {
  margin-top: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--slate-200);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.section-header h2,
.section-header h3 {
  font-weight: 700;
  color: var(--slate-800);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  letter-spacing: -0.01em;
}

.section-header h2 {
  font-size: 1.375rem;
}

.section-header h3 {
  font-size: 1.125rem;
}

/* Gold accent bar */
.section-header h2::before,
.section-header h3::before {
  content: '';
  width: 4px;
  height: 1.5em;
  background: linear-gradient(180deg, var(--sti-gold), var(--sti-gold-dark));
  border-radius: var(--radius-full);
}

/* =========================
   Notifications
   ========================= */
.btn-notif {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 2px solid var(--slate-200);
  background: white;
  cursor: pointer;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-notif:hover {
  border-color: var(--sti-gold);
  background: var(--warning-light);
  transform: scale(1.05);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: var(--danger);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-1);
  animation: pulse 2s infinite;
}

.notif-badge.hidden {
  display: none;
}

.notifications-panel {
  position: fixed;
  top: 100px;
  right: var(--space-6);
  width: 400px;
  max-height: 70vh;
  background: var(--slate-50);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  z-index: 1000;
  animation: slideInRight 0.3s var(--ease-out);
}

.notifications-panel.hidden {
  display: none;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 100%);
  color: white;
  border-bottom: 3px solid var(--sti-gold);
}

.notifications-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.btn-clear-notifs {
  padding: var(--space-1) var(--space-3);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-clear-notifs:hover {
  background: rgba(255, 255, 255, 0.25);
}

.notifications-list {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-3);
}

.notification-item,
.notif-item {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  background: white;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.notification-item::before,
.notif-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--sti-gold);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.notification-item:last-child,
.notif-item:last-child {
  margin-bottom: 0;
}

.notification-item:hover,
.notif-item:hover {
  background: var(--slate-50);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.notification-item.unread,
.notif-item.unread {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 248, 220, 0.5) 100%);
  border-color: var(--sti-gold);
}

.notification-item.unread::before,
.notif-item.unread::before {
  background: var(--sti-gold);
  animation: pulse 2s infinite;
}

.notification-item.read,
.notif-item.read {
  opacity: 0.75;
}

.notification-item.read::before,
.notif-item.read::before {
  background: var(--slate-300);
}

.notification-item p,
.notif-item p {
  margin: 0 0 var(--space-2) 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--slate-700);
  padding-left: var(--space-2);
}

.notification-item .time,
.notification-item .notif-time,
.notif-item .time,
.notif-item .notif-time {
  font-size: 0.75rem;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding-left: var(--space-2);
}

.notification-item .notif-time::before,
.notif-item .notif-time::before {
  content: '🕐';
  font-size: 0.7rem;
}

/* Empty state in notifications */
.notifications-list .empty-state {
  text-align: center;
  padding: var(--space-6);
  color: var(--slate-500);
  font-size: 0.875rem;
}

/* =========================
   Forms
   ========================= */
.item-form {
  background: linear-gradient(145deg, var(--slate-50) 0%, rgba(255, 248, 220, 0.3) 100%);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  margin-bottom: var(--space-6);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.item-form::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sti-blue), var(--sti-gold), var(--sti-blue));
  transform: scaleX(0);
  transition: transform var(--duration-normal) var(--ease-out);
}

.item-form:focus-within {
  border-color: var(--sti-blue);
  box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
}

.item-form:focus-within::before {
  transform: scaleX(1);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.form-row-half {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group label .required {
  color: var(--danger);
}

.form-group label .optional {
  color: var(--slate-400);
  font-weight: 400;
  text-transform: none;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: inherit;
  background: white;
  color: var(--slate-800);
  transition: all var(--duration-normal) var(--ease-out);
}

.form-group input:hover,
.form-group select:hover {
  border-color: var(--slate-300);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sti-blue);
  box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
}

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

.input-hint {
  font-size: 0.6875rem;
  color: var(--slate-500);
  margin-top: var(--space-1);
}

.urgency-group {
  display: flex;
  align-items: flex-end;
}

.urgency-group label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--warning-light);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.urgency-group label:hover {
  border-color: var(--warning);
}

.urgency-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--warning);
}

.urgent-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  text-transform: none;
  letter-spacing: normal;
}

/* =========================
   Buttons
   ========================= */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: var(--shadow-md);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
  transition: left var(--duration-slow) var(--ease-out);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary span {
  position: relative;
  z-index: 1;
}

/* Secondary & Action Buttons */
.btn-secondary {
  padding: var(--space-2) var(--space-4);
  background: white;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  color: var(--slate-700);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-secondary:hover {
  border-color: var(--sti-blue);
  color: var(--sti-blue);
  background: var(--slate-50);
}

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

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

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

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

.btn-warning {
  background: var(--warning-light);
  color: var(--slate-700);
  border-color: var(--warning);
}

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

/* =========================
   Search & Filters
   ========================= */
.controls-inline {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  min-width: 180px;
  background: white;
  transition: all var(--duration-fast) var(--ease-out);
}

.search-input:focus {
  outline: none;
  border-color: var(--sti-blue);
  box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
}

.controls-inline select {
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  background: white;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.controls-inline select:focus {
  outline: none;
  border-color: var(--sti-blue);
  box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
}

/* =========================
   Items Grid
   ========================= */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}

.empty-state {
  grid-column: 1 / -1;
  padding: var(--space-10) var(--space-6);
  text-align: center;
  color: var(--slate-500);
  background: var(--slate-50);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--slate-200);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

/* =========================
   Item Cards
   ========================= */
.item-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s var(--ease-out) both;
}

/* Staggered animations for cards */
.items-grid .item-card:nth-child(1) { animation-delay: 0ms; }
.items-grid .item-card:nth-child(2) { animation-delay: 50ms; }
.items-grid .item-card:nth-child(3) { animation-delay: 100ms; }
.items-grid .item-card:nth-child(4) { animation-delay: 150ms; }
.items-grid .item-card:nth-child(5) { animation-delay: 200ms; }
.items-grid .item-card:nth-child(6) { animation-delay: 250ms; }

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background var(--duration-normal) var(--ease-out);
}

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

.item-card:hover::before {
  background: linear-gradient(90deg, var(--sti-blue), var(--sti-gold));
}

/* Card status variants */
.item-card.available {
  border-left: 4px solid var(--success);
}

.item-card.borrowed {
  border-left: 4px solid var(--sti-gold);
}

.item-card.pending {
  border-left: 4px solid var(--info);
}

.item-card.urgent {
  border-left: 4px solid var(--danger);
  background: linear-gradient(135deg, white 0%, rgba(254, 226, 226, 0.3) 100%);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-3);
  gap: var(--space-3);
}

.item-category {
  font-size: 1.5rem;
  line-height: 1;
}

.item-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: var(--space-2);
  line-height: 1.4;
}

.item-desc {
  font-size: 0.8125rem;
  color: var(--slate-600);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-bottom: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--slate-100);
}

.item-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Status Badges */
.status-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.status-badge.available {
  background: var(--success-light);
  color: #065f46;
}

.status-badge.borrowed {
  background: var(--warning-light);
  color: #92400e;
}

.status-badge.pending {
  background: var(--info-light);
  color: #1e40af;
  animation: pulse 2s infinite;
}

.status-badge.open {
  background: #e0e7ff;
  color: #3730a3;
}

.status-badge.fulfilled {
  background: var(--success-light);
  color: #065f46;
}

.status-badge.cancelled {
  background: var(--slate-100);
  color: var(--slate-500);
}

.status-badge.returned {
  background: var(--slate-100);
  color: var(--slate-600);
}

.status-badge.expired {
  background: var(--danger-light);
  color: #991b1b;
}

.status-badge.return-pending {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  animation: pulse 2s infinite;
}

/* Return Pending Info */
.return-pending-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: #065f46;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  border-left: 3px solid #10b981;
  font-weight: 500;
}

.return-pending-info.lender {
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left-color: #f59e0b;
  animation: pulse 2s infinite;
}

/* Item card return pending state */
.item-card.return-pending {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Highlight button for return pending */
.btn-return.highlight {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: #059669 !important;
  animation: pulse 2s infinite;
}

/* Pending button (disabled) */
.btn-return-item.pending {
  background: var(--slate-100);
  border-color: var(--slate-300);
  color: var(--slate-500);
  cursor: not-allowed;
}

/* Availability Info */
.availability-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--slate-600);
  background: var(--info-light);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  border-left: 3px solid var(--info);
}

.availability-info.expired {
  background: var(--danger-light);
  border-left-color: var(--danger);
  color: #991b1b;
}

.availability-info.warning {
  background: #fef3c7;
  border-left-color: var(--warning);
  color: #92400e;
  animation: pulse 2s infinite;
}

.availability-info .time-remaining {
  font-weight: 600;
  margin-left: var(--space-1);
}

.availability-preview {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.preview-text {
  font-size: 0.875rem;
  color: var(--slate-600);
  background: var(--info-light);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.input-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-top: var(--space-1);
}

/* Item Card Expired State */
.item-card.expired {
  opacity: 0.8;
  border-color: var(--danger);
}

.item-card.expired::before {
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
}

.btn-renew {
  background: var(--info);
  color: white;
  border: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-renew:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* Expiring Soon States */
.item-card.expiring-soon {
  border-color: var(--warning);
  box-shadow: 0 0 0 1px var(--warning), var(--shadow-md);
}

.item-card.expiring-soon::before {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.item-card.overdue {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px var(--danger), var(--shadow-md);
  animation: pulse 1.5s infinite;
}

.item-card.overdue::before {
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
}

.borrower-info.urgent {
  background: #fef3c7;
  border-left-color: var(--warning);
}

.borrower-info.urgent small {
  color: #92400e;
  font-weight: 500;
}

/* Status badge for expiring/overdue */
.status-badge.expiring {
  background: var(--warning-light);
  color: #92400e;
  animation: pulse 1.5s infinite;
}

.status-badge.overdue {
  background: var(--danger);
  color: white;
  animation: pulse 1s infinite;
}

/* Urgent return button */
.btn-return-item.urgent {
  background: var(--danger);
  animation: pulse 1.5s infinite;
}

.btn-return-item.urgent:hover {
  background: #b91c1c;
}

.urgent-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  background: var(--danger);
  color: white;
  border-radius: var(--radius-sm);
  animation: pulse 1.5s infinite;
}

/* Borrower Info */
.borrower-info {
  font-size: 0.8125rem;
  color: var(--slate-600);
  background: var(--warning-light);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  border-left: 3px solid var(--sti-gold);
}

.borrower-info strong {
  color: var(--slate-800);
}

.lender-info {
  font-size: 0.8125rem;
  color: var(--slate-600);
  background: var(--info-light);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  border-left: 3px solid var(--info);
}

/* Item Actions */
.item-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.item-actions button {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: white;
  color: var(--slate-700);
  transition: all var(--duration-fast) var(--ease-out);
}

.item-actions button:hover {
  border-color: var(--sti-blue);
  color: var(--sti-blue);
  transform: translateY(-1px);
}

.item-actions .btn-approve {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.item-actions .btn-approve:hover {
  background: #059669;
  border-color: #059669;
  color: white;
}

.item-actions .btn-reject,
.item-actions .btn-cancel {
  color: var(--danger);
  border-color: var(--danger-light);
}

.item-actions .btn-reject:hover,
.item-actions .btn-cancel:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.item-actions .btn-return {
  background: var(--sti-gold);
  border-color: var(--sti-gold);
  color: var(--slate-800);
}

.item-actions .btn-return:hover {
  background: var(--sti-gold-dark);
  border-color: var(--sti-gold-dark);
}

.item-actions .btn-request {
  background: var(--sti-blue);
  border-color: var(--sti-blue);
  color: white;
}

.item-actions .btn-request:hover {
  background: var(--sti-blue-dark);
  border-color: var(--sti-blue-dark);
  color: white;
}

/* Edit Button */
.item-actions .btn-edit {
  background: var(--sti-blue);
  border-color: var(--sti-blue);
  color: white;
}

.item-actions .btn-edit:hover {
  background: var(--sti-blue-dark);
  border-color: var(--sti-blue-dark);
}

/* Delete Button */
.item-actions .btn-delete {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
  min-width: auto;
  padding: 0.5rem 0.75rem;
}

.item-actions .btn-delete:hover {
  background: #c82333;
  border-color: #bd2130;
}

/* Accept Button */
.item-actions .btn-accept {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.item-actions .btn-accept:hover {
  background: #218838;
  border-color: #1e7e34;
}

/* Decline Button */
.item-actions .btn-decline {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

.item-actions .btn-decline:hover {
  background: #c82333;
  border-color: #bd2130;
}

/* Offer Button */
.item-actions .btn-offer {
  background: var(--sti-gold);
  border-color: var(--sti-gold);
  color: var(--sti-blue-dark);
  font-weight: 600;
}

.item-actions .btn-offer:hover {
  background: var(--sti-gold-dark);
  border-color: var(--sti-gold-dark);
}

/* Contact Button */
.item-actions .btn-contact {
  background: #17a2b8;
  border-color: #17a2b8;
  color: white;
}

.item-actions .btn-contact:hover {
  background: #138496;
  border-color: #117a8b;
}

/* =========================
   History Section
   ========================= */
.collapsible {
  cursor: pointer;
  user-select: none;
}

.collapsible:hover {
  opacity: 0.8;
}

.toggle-icon {
  font-size: 0.75rem;
  transition: transform var(--duration-normal) var(--ease-out);
  color: var(--slate-500);
}

.collapsible.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.history-section {
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.history-section.collapsed {
  display: none;
}

/* =========================
   Login Page Styles
   ========================= */

/* Override body background for login page */
body.login-page,
body:has(.login-wrap) {
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 50%, #000d1a 100%) !important;
  margin: 0;
  padding: 0;
}

body.login-page::before,
body:has(.login-wrap)::before {
  display: none !important;
}

html:has(.login-wrap),
html:has(body.login-page) {
  background: var(--sti-blue-dark);
}

.login-wrap {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 50%, #000d1a 100%);
  position: relative;
  overflow: hidden;
}

/* Animated particles */
.login-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-particles span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--sti-gold);
  border-radius: var(--radius-full);
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
}

.login-particles span:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 8s;
}

.login-particles span:nth-child(2) {
  top: 60%;
  left: 20%;
  animation-delay: 1s;
  animation-duration: 6s;
}

.login-particles span:nth-child(3) {
  top: 40%;
  right: 15%;
  animation-delay: 2s;
  animation-duration: 7s;
}

.login-particles span:nth-child(4) {
  bottom: 30%;
  left: 30%;
  animation-delay: 1.5s;
  animation-duration: 9s;
}

.login-particles span:nth-child(5) {
  bottom: 20%;
  right: 25%;
  animation-delay: 0.5s;
  animation-duration: 7.5s;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-elevated);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-2xl), 0 0 80px rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  animation: scaleIn 0.6s var(--ease-out);
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sti-blue), var(--sti-gold), var(--sti-blue));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.login-header .logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.login-header .logo-icon {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 4px 12px rgba(0, 51, 102, 0.3));
  animation: float 4s ease-in-out infinite;
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--sti-blue);
  letter-spacing: -0.02em;
}

.login-header .tagline {
  font-size: 0.875rem;
  color: var(--slate-600);
  line-height: 1.5;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  background: var(--slate-100);
  padding: var(--space-1);
  border-radius: var(--radius-md);
}

.auth-tab {
  flex: 1;
  padding: var(--space-3);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--slate-600);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.auth-tab:hover {
  color: var(--slate-800);
}

.auth-tab.active {
  background: white;
  color: var(--sti-blue);
  box-shadow: var(--shadow-sm);
}

/* Auth Forms */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s var(--ease-out);
}

.login-form .form-group {
  margin-bottom: var(--space-4);
}

.login-form .form-group:last-of-type {
  margin-bottom: var(--space-6);
}

/* Fix form-row-half inside login card */
.login-form .form-row-half,
.login-card .form-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.login-form .form-row-half input,
.login-card .form-row-half input {
  width: 100%;
  min-width: 0;
}

.error-message {
  padding: var(--space-3);
  background: var(--danger-light);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 0.8125rem;
  margin-bottom: var(--space-4);
  animation: shake 0.4s var(--ease-out);
}

.error-message.hidden {
  display: none;
}

.success-message {
  padding: var(--space-3);
  background: var(--success-light);
  border: 1px solid #6ee7b7;
  border-radius: var(--radius-md);
  color: #065f46;
  font-size: 0.8125rem;
  margin-bottom: var(--space-4);
}

.success-message.hidden {
  display: none;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
  transition: left var(--duration-slow) var(--ease-out);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login .arrow {
  font-size: 1.25rem;
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn-login:hover .arrow {
  transform: translateX(4px);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Login Footer */
.login-footer {
  margin-top: var(--space-6);
  text-align: center;
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--slate-200), transparent);
  margin-bottom: var(--space-5);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.footer-logo {
  font-size: 1.25rem;
}

.footer-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sti-blue);
}

.login-footer .text-muted {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-bottom: var(--space-3);
}

.footer-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sti-gold-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* =========================
   stishare-Style Login Layout
   ========================= */
body.stishare-style {
  background: #f5f5f5;
}

body.stishare-style .wrap {
  display: none;
}

.stishare-login-container {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Left Panel - Branding */
.stishare-left-panel {
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 50px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  overflow-y: auto;
}

.stishare-brand {
  margin-bottom: 24px;
}

.stishare-logo {
  width: 250px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 51, 102, 0.2));
}

.stishare-content {
  max-width: 480px;
}

.stishare-headline {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.3;
  margin-bottom: 14px;
}

.stishare-description {
  font-size: 0.9375rem;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 20px;
}

.stishare-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stishare-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--slate-700);
}

.feature-icon {
  font-size: 1.125rem;
}

/* Right Panel - Auth Card */
.stishare-right-panel {
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: #fff;
  border-left: 1px solid #e5e5e5;
  overflow-y: auto;
}

.stishare-auth-card {
  width: 100%;
  max-width: 350px;
  text-align: center;
}

.stishare-card-logo {
  display: none; /* Hide logo in right panel - left panel shows it */
}

.stishare-card-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.stishare-card-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.stishare-card-subtitle {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin-bottom: 20px;
}

/* stishare Form Styles */
.stishare-form {
  display: none;
}

.stishare-form.active {
  display: block;
}

.stishare-form-group {
  margin-bottom: 12px;
}

.stishare-form-group input {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  font-size: 0.9375rem;
  font-family: inherit;
  background: transparent;
  transition: all 0.2s ease;
  outline: none;
}

.stishare-form-group input:focus {
  border-bottom-color: var(--sti-blue);
}

.stishare-form-group input::placeholder {
  color: var(--slate-400);
}

.stishare-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stishare-btn-primary {
  width: 100%;
  padding: 11px 20px;
  background: var(--sti-blue);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 6px;
  margin-bottom: 12px;
}

.stishare-btn-primary:hover {
  background: var(--sti-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.stishare-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.stishare-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.8125rem;
}

.stishare-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-600);
  cursor: pointer;
  font-size: 0.8125rem;
}

.stishare-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--sti-blue);
}

.stishare-link {
  color: var(--sti-blue);
  text-decoration: none;
  font-weight: 500;
}

.stishare-link:hover {
  text-decoration: underline;
}

.stishare-btn-secondary {
  width: 100%;
  padding: 11px 20px;
  background: transparent;
  color: var(--sti-blue);
  border: 2px solid var(--sti-blue);
  border-radius: 50px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stishare-btn-secondary:hover {
  background: rgba(0, 51, 102, 0.05);
}

.stishare-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: var(--slate-400);
  font-size: 0.8125rem;
}

.stishare-divider::before,
.stishare-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.stishare-divider span {
  padding: 0 12px;
}

/* Error message in stishare style */
.stishare-form .error-message {
  text-align: left;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.8125rem;
  margin-bottom: 16px;
}

/* =========================
   Landscape Devices (Wide Screens - width > height)
   Uses vw (viewport width) for sizing
   ========================= */
@media (min-aspect-ratio: 1/1) {
  /* ---- Main Layout ---- */
  .wrap {
    max-width: 90vw;
    padding: clamp(16px, 1.5vw, 24px);
  }
  
  /* ---- Top Navigation ---- */
  .top-nav {
    padding: clamp(6px, 0.5vw, 10px) clamp(16px, 1.5vw, 24px);
    border-radius: clamp(16px, 1.5vw, 24px);
    margin-bottom: clamp(16px, 1.5vw, 24px);
  }
  
  .logo-icon {
    width: clamp(70px, 6vw, 100px);
    height: clamp(70px, 6vw, 100px);
  }
  
  .user-name {
    font-size: clamp(0.75rem, 0.9vw, 0.9375rem);
    padding: clamp(6px, 0.5vw, 10px) clamp(12px, 1vw, 18px);
  }
  
  .btn-logout {
    width: clamp(32px, 2.5vw, 44px);
    height: clamp(32px, 2.5vw, 44px);
    font-size: clamp(0.875rem, 1vw, 1.125rem);
  }
  
  /* ---- Nav Tabs (in top nav) ---- */
  .nav-tabs {
    gap: clamp(6px, 0.5vw, 10px);
  }
  
  .nav-tab {
    padding: clamp(6px, 0.5vw, 10px) clamp(12px, 1vw, 18px);
    font-size: clamp(0.75rem, 0.85vw, 0.9rem);
    gap: clamp(4px, 0.4vw, 8px);
  }
  
  .nav-tab .tab-icon {
    font-size: clamp(0.875rem, 0.9vw, 1rem);
  }

  /* ---- Tab Navigation ---- */
  .tab-nav {
    gap: clamp(12px, 1vw, 18px);
    margin-bottom: clamp(16px, 1.5vw, 24px);
  }
  
  .tab-link {
    padding: clamp(12px, 1vw, 18px) clamp(16px, 1.5vw, 26px);
    font-size: clamp(0.8rem, 0.95vw, 1rem);
    border-radius: clamp(12px, 1vw, 18px);
    gap: clamp(8px, 0.8vw, 14px);
  }
  
  .tab-icon {
    font-size: clamp(1rem, 1.3vw, 1.375rem);
  }
  
  /* ---- Card Container ---- */
  .card {
    padding: clamp(20px, 2vw, 36px);
    border-radius: clamp(16px, 1.5vw, 26px);
  }
  
  /* ---- Section Headers ---- */
  .section {
    margin-top: clamp(24px, 2.5vw, 44px);
  }
  
  .section-header {
    margin-bottom: clamp(14px, 1.3vw, 22px);
    padding-bottom: clamp(12px, 1vw, 18px);
    gap: clamp(12px, 1vw, 18px);
  }
  
  .section-header h2 {
    font-size: clamp(1.125rem, 1.4vw, 1.5rem);
    gap: clamp(8px, 0.8vw, 14px);
  }
  
  .section-header h3 {
    font-size: clamp(1rem, 1.15vw, 1.25rem);
    gap: clamp(8px, 0.8vw, 14px);
  }
  
  /* ---- Notifications ---- */
  .btn-notif {
    width: clamp(36px, 2.8vw, 48px);
    height: clamp(36px, 2.8vw, 48px);
    font-size: clamp(0.9rem, 1.1vw, 1.25rem);
  }
  
  .notif-badge {
    min-width: clamp(16px, 1.3vw, 22px);
    height: clamp(16px, 1.3vw, 22px);
    font-size: clamp(0.6rem, 0.7vw, 0.75rem);
  }
  
  .notifications-panel {
    width: clamp(320px, 25vw, 420px);
    max-height: 70vh;
    top: clamp(80px, 7vw, 110px);
    right: clamp(16px, 1.5vw, 28px);
    border-radius: clamp(14px, 1.3vw, 22px);
  }
  
  .notifications-header {
    padding: clamp(12px, 1vw, 18px) clamp(14px, 1.3vw, 22px);
  }
  
  .notifications-header h3 {
    font-size: clamp(0.875rem, 1vw, 1.0625rem);
    gap: clamp(6px, 0.5vw, 10px);
  }
  
  .btn-clear-notifs {
    padding: clamp(4px, 0.3vw, 6px) clamp(8px, 0.8vw, 14px);
    font-size: clamp(0.65rem, 0.75vw, 0.8125rem);
    border-radius: clamp(6px, 0.6vw, 10px);
  }
  
  .notifications-list {
    max-height: clamp(280px, 26vw, 440px);
    padding: clamp(6px, 0.5vw, 10px);
  }
  
  .notification-item {
    padding: clamp(10px, 0.9vw, 14px) clamp(12px, 1vw, 18px);
    border-radius: clamp(8px, 0.7vw, 12px);
    margin-bottom: clamp(6px, 0.5vw, 10px);
    font-size: clamp(0.8rem, 0.9vw, 0.9375rem);
  }
  
  .notification-item .time {
    font-size: clamp(0.6rem, 0.7vw, 0.75rem);
  }
  
  /* ---- Forms ---- */
  .item-form {
    padding: clamp(16px, 1.5vw, 28px);
    border-radius: clamp(12px, 1vw, 18px);
    margin-bottom: clamp(16px, 1.5vw, 28px);
  }
  
  .form-row,
  .form-row-half {
    gap: clamp(12px, 1vw, 18px);
    margin-bottom: clamp(12px, 1vw, 18px);
  }
  
  .form-group {
    gap: clamp(6px, 0.5vw, 10px);
  }
  
  .form-group label {
    font-size: clamp(0.65rem, 0.75vw, 0.8125rem);
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: clamp(10px, 0.9vw, 14px) clamp(12px, 1vw, 18px);
    font-size: clamp(0.8rem, 0.95vw, 1rem);
    border-radius: clamp(8px, 0.7vw, 12px);
  }
  
  .input-hint {
    font-size: clamp(0.6rem, 0.7vw, 0.75rem);
  }
  
  .urgency-group label {
    padding: clamp(10px, 0.9vw, 14px) clamp(12px, 1vw, 18px);
    border-radius: clamp(8px, 0.7vw, 12px);
    gap: clamp(6px, 0.5vw, 10px);
  }
  
  .urgency-group input[type="checkbox"] {
    width: clamp(14px, 1.2vw, 20px);
    height: clamp(14px, 1.2vw, 20px);
  }
  
  .urgent-label {
    font-size: clamp(0.75rem, 0.9vw, 0.9375rem);
  }
  
  /* ---- Buttons ---- */
  .btn-primary {
    padding: clamp(12px, 1vw, 18px) clamp(16px, 1.5vw, 26px);
    font-size: clamp(0.8rem, 0.95vw, 1rem);
    border-radius: clamp(8px, 0.7vw, 12px);
    gap: clamp(6px, 0.5vw, 10px);
  }
  
  .btn-secondary {
    padding: clamp(8px, 0.6vw, 12px) clamp(12px, 1vw, 18px);
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
    border-radius: clamp(8px, 0.7vw, 12px);
  }
  
  .btn-success,
  .btn-danger,
  .btn-warning {
    padding: clamp(8px, 0.6vw, 12px) clamp(12px, 1vw, 18px);
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
  }
  
  /* ---- Search & Filters ---- */
  .controls-inline {
    gap: clamp(8px, 0.8vw, 14px);
  }
  
  .search-input {
    padding: clamp(8px, 0.6vw, 12px) clamp(12px, 1vw, 18px);
    font-size: clamp(0.75rem, 0.9vw, 0.9375rem);
    min-width: clamp(140px, 12vw, 200px);
    border-radius: clamp(8px, 0.7vw, 12px);
  }
  
  .controls-inline select {
    padding: clamp(8px, 0.6vw, 12px) clamp(12px, 1vw, 18px);
    font-size: clamp(0.75rem, 0.9vw, 0.9375rem);
    border-radius: clamp(8px, 0.7vw, 12px);
  }
  
  /* ---- Items Grid ---- */
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 22vw, 360px), 1fr));
    gap: clamp(12px, 1vw, 18px);
  }
  
  .empty-state {
    padding: clamp(32px, 3vw, 52px) clamp(16px, 1.5vw, 28px);
    border-radius: clamp(12px, 1vw, 18px);
  }
  
  .empty-state-icon {
    font-size: clamp(2rem, 3vw, 3.5rem);
    margin-bottom: clamp(8px, 0.8vw, 14px);
  }
  
  /* ---- Item Cards ---- */
  .item-card {
    padding: clamp(14px, 1.3vw, 22px);
    border-radius: clamp(12px, 1vw, 18px);
  }
  
  .item-header {
    margin-bottom: clamp(8px, 0.8vw, 14px);
    gap: clamp(8px, 0.8vw, 14px);
  }
  
  .item-category {
    font-size: clamp(1.125rem, 1.5vw, 1.75rem);
  }
  
  .item-name {
    font-size: clamp(0.875rem, 1vw, 1.0625rem);
    margin-bottom: clamp(6px, 0.5vw, 10px);
  }
  
  .item-desc {
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
    margin-bottom: clamp(8px, 0.8vw, 14px);
  }
  
  .item-meta {
    font-size: clamp(0.65rem, 0.75vw, 0.8125rem);
    margin-bottom: clamp(8px, 0.8vw, 14px);
    padding-top: clamp(8px, 0.8vw, 14px);
    gap: clamp(4px, 0.3vw, 6px);
  }
  
  /* ---- Status Badges ---- */
  .status-badge {
    font-size: clamp(0.55rem, 0.7vw, 0.75rem);
    padding: clamp(3px, 0.25vw, 5px) clamp(8px, 0.8vw, 14px);
  }
  
  /* ---- Availability & Borrower Info ---- */
  .availability-info {
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
    padding: clamp(8px, 0.6vw, 12px) clamp(10px, 0.9vw, 14px);
    margin-bottom: clamp(8px, 0.8vw, 14px);
    border-radius: clamp(8px, 0.7vw, 12px);
  }
  
  .borrower-info,
  .lender-info {
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
    padding: clamp(10px, 0.9vw, 14px);
    border-radius: clamp(8px, 0.7vw, 12px);
    margin-bottom: clamp(8px, 0.8vw, 14px);
  }
  
  .urgent-badge {
    font-size: clamp(0.55rem, 0.7vw, 0.75rem);
    padding: clamp(3px, 0.25vw, 5px) clamp(6px, 0.5vw, 10px);
    border-radius: clamp(4px, 0.35vw, 6px);
    gap: clamp(3px, 0.25vw, 5px);
  }
  
  /* ---- Item Actions ---- */
  .item-actions {
    gap: clamp(6px, 0.5vw, 10px);
    margin-top: clamp(8px, 0.8vw, 14px);
  }
  
  .item-actions button {
    padding: clamp(8px, 0.6vw, 12px) clamp(10px, 0.9vw, 14px);
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
    border-radius: clamp(8px, 0.7vw, 12px);
  }
  
  .btn-renew {
    padding: clamp(6px, 0.5vw, 10px) clamp(10px, 0.9vw, 14px);
    font-size: clamp(0.65rem, 0.75vw, 0.8125rem);
    border-radius: clamp(8px, 0.7vw, 12px);
  }
  
  /* ---- Modals ---- */
  .modal-overlay {
    padding: clamp(16px, 1.5vw, 28px);
  }
  
  .modal {
    max-width: clamp(360px, 32vw, 520px);
    border-radius: clamp(16px, 1.5vw, 26px);
  }
  
  .modal-header {
    padding: clamp(14px, 1.3vw, 22px) clamp(16px, 1.5vw, 28px);
  }
  
  .modal-header h3 {
    font-size: clamp(1rem, 1.15vw, 1.25rem);
  }
  
  .modal-body {
    padding: clamp(16px, 1.5vw, 28px);
  }
  
  .modal-footer {
    padding: clamp(12px, 1vw, 18px) clamp(16px, 1.5vw, 28px);
    gap: clamp(8px, 0.8vw, 14px);
  }
  
  /* ---- Toast Notifications ---- */
  .toast-container {
    top: clamp(60px, 5vw, 90px);
    right: clamp(14px, 1.3vw, 24px);
    gap: clamp(8px, 0.8vw, 14px);
  }
  
  .toast {
    padding: clamp(12px, 1vw, 18px) clamp(14px, 1.3vw, 22px);
    border-radius: clamp(12px, 1vw, 18px);
    gap: clamp(8px, 0.8vw, 14px);
    min-width: clamp(240px, 20vw, 340px);
    max-width: clamp(300px, 28vw, 440px);
  }
  
  .toast-icon {
    font-size: clamp(1.125rem, 1.5vw, 1.75rem);
  }
  
  .toast-title {
    font-size: clamp(0.8rem, 0.9vw, 0.9375rem);
  }
  
  .toast-message {
    font-size: clamp(0.75rem, 0.85vw, 0.875rem);
  }
  
  .toast-close {
    padding: clamp(4px, 0.3vw, 6px);
    font-size: clamp(0.875rem, 1vw, 1.125rem);
  }
  
  /* ---- Loading States ---- */
  .loading {
    padding: clamp(24px, 2vw, 36px);
  }
  
  .spinner {
    width: clamp(24px, 2vw, 36px);
    height: clamp(24px, 2vw, 36px);
  }
  
  /* ---- Request Cards ---- */
  .request-card {
    padding: clamp(14px, 1.3vw, 22px);
    border-radius: clamp(12px, 1vw, 18px);
  }
  
  /* ---- Footer ---- */
  .footer {
    padding: clamp(16px, 1.5vw, 28px);
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
  }
  
  /* ---- Error/Success Messages ---- */
  .error-message,
  .success-message {
    padding: clamp(10px, 0.9vw, 14px);
    font-size: clamp(0.7rem, 0.85vw, 0.875rem);
    border-radius: clamp(8px, 0.7vw, 12px);
    margin-bottom: clamp(12px, 1vw, 18px);
  }
  
  /* ---- History Section ---- */
  .toggle-icon {
    font-size: clamp(0.65rem, 0.75vw, 0.8125rem);
  }
  
  /* ---- stishare Login Layout (Landscape) ---- */
  .stishare-login-container {
    flex-direction: row;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }
  
  .stishare-left-panel {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3vw 4vw;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow-y: auto;
  }
  
  .stishare-brand {
    margin-bottom: 2vw;
  }
  
  .stishare-logo {
    width: 250px;
    height: auto;
  }
  
  .stishare-content {
    max-width: 90%;
  }
  
  .stishare-headline {
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
    color: var(--slate-800);
    margin-bottom: 1.2vw;
    line-height: 1.3;
  }
  
  .stishare-description {
    font-size: clamp(0.875rem, 1vw, 1rem);
    color: var(--slate-600);
    line-height: 1.6;
    margin-bottom: 2vw;
  }
  
  .stishare-features {
    display: flex;
    flex-direction: column;
    gap: 1vw;
  }
  
  .stishare-feature {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    font-size: clamp(0.8rem, 0.95vw, 0.9375rem);
    color: var(--slate-700);
  }
  
  .feature-icon {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
  }
  
  .stishare-right-panel {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vw;
    background: #fff;
    border-left: 1px solid #e5e5e5;
    overflow-y: auto;
  }
  
  .stishare-auth-card {
    width: 100%;
    max-width: clamp(280px, 85%, 380px);
  }
  
  .stishare-card-logo {
    display: none;
  }
  
  .stishare-card-title {
    font-size: clamp(1.125rem, 1.4vw, 1.375rem);
  }
  
  .stishare-card-subtitle {
    font-size: clamp(0.75rem, 0.85vw, 0.875rem);
    margin-bottom: 1.5vw;
  }
  
  .stishare-form-group {
    margin-bottom: 0.8vw;
  }
  
  .stishare-form-group input {
    padding: clamp(8px, 0.7vw, 12px) clamp(10px, 0.9vw, 14px);
    font-size: clamp(0.8rem, 0.9vw, 0.9375rem);
  }
  
  .stishare-form-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.5vw;
  }
  
  .stishare-btn-primary,
  .stishare-btn-secondary {
    padding: clamp(9px, 0.75vw, 12px) clamp(14px, 1.1vw, 20px);
    font-size: clamp(0.8rem, 0.9vw, 0.9375rem);
  }
  
  .stishare-btn-primary {
    margin-top: 0.4vw;
    margin-bottom: 0.7vw;
  }
  
  .stishare-links {
    margin-bottom: 0.7vw;
    font-size: clamp(0.7rem, 0.8vw, 0.8125rem);
  }
  
  .stishare-checkbox {
    font-size: clamp(0.7rem, 0.8vw, 0.8125rem);
  }
  
  .stishare-checkbox input {
    width: clamp(13px, 1vw, 16px);
    height: clamp(13px, 1vw, 16px);
  }
  
  .stishare-divider {
    margin: 1vw 0;
    font-size: clamp(0.7rem, 0.8vw, 0.8125rem);
  }
  
  .stishare-form .error-message {
    font-size: clamp(0.7rem, 0.8vw, 0.8125rem);
    padding: 0.6vw 0.8vw;
    margin-bottom: 0.7vw;
  }
}

/* =========================
   Portrait Devices (Tall Screens - height > width)
   Uses vh (viewport height) for sizing
   ========================= */
@media (max-aspect-ratio: 1/1) {
  /* ---- Main Layout ---- */
  .wrap {
    max-width: 100%;
    padding: clamp(12px, 2vh, 20px);
  }
  
  /* ---- Top Navigation ---- */
  .top-nav {
    flex-direction: column;
    gap: clamp(6px, 0.8vh, 10px);
    padding: clamp(12px, 1.5vh, 16px) clamp(12px, 1.8vh, 18px);
    border-radius: clamp(14px, 2vh, 22px);
    margin-bottom: clamp(12px, 1.8vh, 20px);
  }
  
  .nav-controls {
    margin-top: -15px;
    width: 100%;
    justify-content: center;
    gap: clamp(8px, 1vh, 12px);
  }
  
  .nav-brand {
    width: 100%;
    justify-content: center;
  }
  
  .logo-icon {
    width: clamp(60px, 10vh, 90px);
    height: clamp(60px, 10vh, 90px);
  }
  
  .nav-user {
    gap: clamp(6px, 0.8vh, 10px);
  }
  
  .user-name {
    font-size: clamp(0.7rem, 1.6vh, 0.875rem);
    padding: clamp(6px, 1vh, 10px) clamp(10px, 1.6vh, 16px);
  }
  
  .btn-logout {
    width: clamp(32px, 4.5vh, 42px);
    height: clamp(32px, 4.5vh, 42px);
    font-size: clamp(0.875rem, 1.8vh, 1.0625rem);
  }
  
  /* ---- Nav Tabs (in top nav) ---- */
  .nav-tabs {
    gap: clamp(6px, 0.8vh, 10px);
  }
  
  .nav-tab {
    padding: clamp(6px, 1vh, 10px) clamp(12px, 1.6vh, 18px);
    font-size: clamp(0.7rem, 1.4vh, 0.8rem);
    gap: clamp(4px, 0.6vh, 8px);
  }
  
  .nav-tab .tab-icon {
    font-size: clamp(0.75rem, 1.4vh, 0.9rem);
  }

  /* ---- Tab Navigation ---- */
  .tab-nav {
    flex-direction: column;
    gap: clamp(8px, 1.4vh, 14px);
    margin-bottom: clamp(12px, 2vh, 20px);
  }
  
  .tab-link {
    padding: clamp(12px, 1.8vh, 18px) clamp(16px, 2.2vh, 24px);
    font-size: clamp(0.8rem, 1.7vh, 0.9375rem);
    border-radius: clamp(10px, 1.6vh, 16px);
    gap: clamp(8px, 1.3vh, 12px);
  }
  
  .tab-icon {
    font-size: clamp(1rem, 2vh, 1.25rem);
  }
  
  /* ---- Card Container ---- */
  .card {
    padding: clamp(16px, 2.5vh, 28px);
    border-radius: clamp(14px, 2vh, 22px);
  }
  
  /* ---- Section Headers ---- */
  .section {
    margin-top: clamp(20px, 3.5vh, 36px);
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: clamp(12px, 2vh, 20px);
    padding-bottom: clamp(10px, 1.6vh, 16px);
    gap: clamp(10px, 1.6vh, 16px);
  }
  
  .section-header h2 {
    font-size: clamp(1rem, 2.2vh, 1.375rem);
    gap: clamp(8px, 1.3vh, 12px);
  }
  
  .section-header h3 {
    font-size: clamp(0.9375rem, 1.9vh, 1.125rem);
    gap: clamp(8px, 1.3vh, 12px);
  }
  
  /* ---- Notifications ---- */
  .btn-notif {
    margin-top: -48px;
    margin-left: 280px;
    width: clamp(36px, 5vh, 46px);
    height: clamp(36px, 5vh, 46px);
    font-size: clamp(0.9rem, 1.9vh, 1.125rem);
  }
  
  .notif-badge {
    min-width: clamp(16px, 2.2vh, 20px);
    height: clamp(16px, 2.2vh, 20px);
    font-size: clamp(0.6rem, 1.2vh, 0.7rem);
  }
  
  .notifications-panel {
    right: clamp(12px, 2vh, 20px);
    left: clamp(12px, 2vh, 20px);
    width: auto;
    max-height: 65vh;
    top: clamp(70px, 12vh, 100px);
    border-radius: clamp(14px, 2vh, 20px);
  }
  
  .notifications-header {
    padding: clamp(12px, 1.8vh, 16px) clamp(14px, 2vh, 20px);
  }
  
  .notifications-header h3 {
    font-size: clamp(0.875rem, 1.8vh, 1rem);
    gap: clamp(6px, 1vh, 10px);
  }
  
  .btn-clear-notifs {
    padding: clamp(4px, 0.7vh, 6px) clamp(8px, 1.3vh, 12px);
    font-size: clamp(0.65rem, 1.3vh, 0.75rem);
    border-radius: clamp(6px, 1vh, 10px);
  }
  
  .notifications-list {
    max-height: clamp(200px, 35vh, 350px);
    padding: clamp(6px, 1vh, 10px);
  }
  
  .notification-item {
    padding: clamp(10px, 1.6vh, 14px) clamp(12px, 1.8vh, 16px);
    border-radius: clamp(8px, 1.3vh, 12px);
    margin-bottom: clamp(6px, 1vh, 10px);
    font-size: clamp(0.8rem, 1.6vh, 0.9375rem);
  }
  
  .notification-item .time {
    font-size: clamp(0.6rem, 1.2vh, 0.7rem);
  }
  
  /* ---- Forms ---- */
  .item-form {
    padding: clamp(14px, 2.2vh, 24px);
    border-radius: clamp(12px, 1.8vh, 18px);
    margin-bottom: clamp(14px, 2.2vh, 24px);
  }
  
  .form-row,
  .form-row-half {
    grid-template-columns: 1fr;
    gap: clamp(10px, 1.6vh, 16px);
    margin-bottom: clamp(10px, 1.6vh, 16px);
  }
  
  .form-group {
    gap: clamp(6px, 1vh, 10px);
  }
  
  .form-group label {
    font-size: clamp(0.65rem, 1.3vh, 0.75rem);
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: clamp(10px, 1.6vh, 14px) clamp(12px, 1.8vh, 16px);
    font-size: clamp(0.8rem, 1.7vh, 0.9375rem);
    border-radius: clamp(8px, 1.3vh, 12px);
  }
  
  .input-hint {
    font-size: clamp(0.6rem, 1.2vh, 0.7rem);
  }
  
  .urgency-group label {
    padding: clamp(10px, 1.6vh, 14px) clamp(12px, 1.8vh, 16px);
    border-radius: clamp(8px, 1.3vh, 12px);
    gap: clamp(6px, 1vh, 10px);
  }
  
  .urgency-group input[type="checkbox"] {
    width: clamp(14px, 2.2vh, 18px);
    height: clamp(14px, 2.2vh, 18px);
  }
  
  .urgent-label {
    font-size: clamp(0.75rem, 1.6vh, 0.875rem);
  }
  
  /* ---- Buttons ---- */
  .btn-primary {
    padding: clamp(12px, 1.8vh, 16px) clamp(16px, 2.2vh, 24px);
    font-size: clamp(0.8rem, 1.7vh, 0.9375rem);
    border-radius: clamp(8px, 1.3vh, 12px);
    gap: clamp(6px, 1vh, 10px);
  }
  
  .btn-secondary {
    padding: clamp(8px, 1.3vh, 12px) clamp(12px, 1.8vh, 16px);
    font-size: clamp(0.7rem, 1.5vh, 0.8125rem);
    border-radius: clamp(8px, 1.3vh, 12px);
  }
  
  .btn-success,
  .btn-danger,
  .btn-warning {
    padding: clamp(8px, 1.3vh, 12px) clamp(12px, 1.8vh, 16px);
    font-size: clamp(0.7rem, 1.5vh, 0.8125rem);
  }
  
  /* ---- Search & Filters ---- */
  .controls-inline {
    width: 100%;
    flex-direction: column;
    gap: clamp(8px, 1.3vh, 12px);
  }
  
  .search-input {
    width: 100%;
    padding: clamp(10px, 1.5vh, 14px) clamp(12px, 1.8vh, 16px);
    font-size: clamp(0.8rem, 1.6vh, 0.9375rem);
    border-radius: clamp(8px, 1.3vh, 12px);
  }
  
  .controls-inline select {
    width: 100%;
    padding: clamp(10px, 1.5vh, 14px) clamp(12px, 1.8vh, 16px);
    font-size: clamp(0.8rem, 1.6vh, 0.9375rem);
    border-radius: clamp(8px, 1.3vh, 12px);
  }
  
  /* ---- Items Grid ---- */
  .items-grid {
    grid-template-columns: 1fr;
    gap: clamp(12px, 1.8vh, 18px);
  }
  
  .empty-state {
    padding: clamp(28px, 5vh, 48px) clamp(14px, 2.2vh, 24px);
    border-radius: clamp(12px, 1.8vh, 18px);
  }
  
  .empty-state-icon {
    font-size: clamp(2rem, 5vh, 3rem);
    margin-bottom: clamp(8px, 1.3vh, 12px);
  }
  
  /* ---- Item Cards ---- */
  .item-card {
    padding: clamp(14px, 2.2vh, 20px);
    border-radius: clamp(12px, 1.8vh, 18px);
  }
  
  .item-header {
    margin-bottom: clamp(8px, 1.3vh, 12px);
    gap: clamp(8px, 1.3vh, 12px);
  }
  
  .item-category {
    font-size: clamp(1.125rem, 2.5vh, 1.5rem);
  }
  
  .item-name {
    font-size: clamp(0.875rem, 1.8vh, 1rem);
    margin-bottom: clamp(6px, 1vh, 10px);
  }
  
  .item-desc {
    font-size: clamp(0.7rem, 1.5vh, 0.8125rem);
    margin-bottom: clamp(8px, 1.3vh, 12px);
  }
  
  .item-meta {
    font-size: clamp(0.65rem, 1.3vh, 0.75rem);
    margin-bottom: clamp(8px, 1.3vh, 12px);
    padding-top: clamp(8px, 1.3vh, 12px);
    gap: clamp(4px, 0.6vh, 6px);
  }
  
  /* ---- Status Badges ---- */
  .status-badge {
    font-size: clamp(0.55rem, 1.2vh, 0.7rem);
    padding: clamp(3px, 0.5vh, 5px) clamp(8px, 1.3vh, 12px);
  }
  
  /* ---- Availability & Borrower Info ---- */
  .availability-info {
    font-size: clamp(0.7rem, 1.5vh, 0.8125rem);
    padding: clamp(8px, 1.3vh, 12px) clamp(10px, 1.5vh, 14px);
    margin-bottom: clamp(8px, 1.3vh, 12px);
    border-radius: clamp(8px, 1.3vh, 12px);
  }
  
  .borrower-info,
  .lender-info {
    font-size: clamp(0.7rem, 1.5vh, 0.8125rem);
    padding: clamp(10px, 1.6vh, 14px);
    border-radius: clamp(8px, 1.3vh, 12px);
    margin-bottom: clamp(8px, 1.3vh, 12px);
  }
  
  .urgent-badge {
    font-size: clamp(0.55rem, 1.2vh, 0.7rem);
    padding: clamp(3px, 0.5vh, 5px) clamp(6px, 1vh, 10px);
    border-radius: clamp(4px, 0.6vh, 6px);
    gap: clamp(3px, 0.5vh, 5px);
  }
  
  /* ---- Item Actions ---- */
  .item-actions {
    flex-direction: column;
    gap: clamp(8px, 1.3vh, 12px);
    margin-top: clamp(10px, 1.6vh, 14px);
  }
  
  .item-actions button {
    width: 100%;
    padding: clamp(10px, 1.5vh, 14px) clamp(12px, 1.8vh, 16px);
    font-size: clamp(0.75rem, 1.5vh, 0.8125rem);
    border-radius: clamp(8px, 1.3vh, 12px);
  }
  
  .btn-renew {
    padding: clamp(8px, 1.2vh, 12px) clamp(10px, 1.5vh, 14px);
    font-size: clamp(0.65rem, 1.3vh, 0.75rem);
    border-radius: clamp(8px, 1.3vh, 12px);
  }
  
  /* ---- Modals ---- */
  .modal-overlay {
    padding: clamp(14px, 2.2vh, 24px);
  }
  
  .modal {
    max-width: 95%;
    border-radius: clamp(16px, 2.5vh, 24px);
  }
  
  .modal-header {
    padding: clamp(14px, 2vh, 20px) clamp(16px, 2.5vh, 24px);
  }
  
  .modal-header h3 {
    font-size: clamp(1rem, 2vh, 1.125rem);
  }
  
  .modal-body {
    padding: clamp(16px, 2.5vh, 24px);
  }
  
  .modal-footer {
    padding: clamp(12px, 1.8vh, 18px) clamp(16px, 2.5vh, 24px);
    gap: clamp(8px, 1.3vh, 12px);
  }
  
  /* ---- Toast Notifications ---- */
  .toast-container {
    top: clamp(60px, 8vh, 90px);
    right: clamp(12px, 2vh, 20px);
    left: clamp(12px, 2vh, 20px);
    gap: clamp(8px, 1.3vh, 12px);
  }
  
  .toast {
    padding: clamp(12px, 1.8vh, 16px) clamp(14px, 2vh, 20px);
    border-radius: clamp(12px, 1.8vh, 16px);
    gap: clamp(8px, 1.3vh, 12px);
    min-width: auto;
    max-width: 100%;
  }
  
  .toast-icon {
    font-size: clamp(1.125rem, 2.5vh, 1.5rem);
  }
  
  .toast-title {
    font-size: clamp(0.8rem, 1.6vh, 0.9375rem);
  }
  
  .toast-message {
    font-size: clamp(0.75rem, 1.5vh, 0.8125rem);
  }
  
  .toast-close {
    padding: clamp(4px, 0.6vh, 6px);
    font-size: clamp(0.875rem, 1.8vh, 1rem);
  }
  
  /* ---- Loading States ---- */
  .loading {
    padding: clamp(24px, 4vh, 36px);
  }
  
  .spinner {
    width: clamp(24px, 4vh, 34px);
    height: clamp(24px, 4vh, 34px);
  }
  
  /* ---- Request Cards ---- */
  .request-card {
    padding: clamp(14px, 2.2vh, 20px);
    border-radius: clamp(12px, 1.8vh, 18px);
  }
  
  /* ---- Footer ---- */
  .footer {
    padding: clamp(14px, 2.2vh, 24px);
    font-size: clamp(0.7rem, 1.5vh, 0.8125rem);
  }
  
  /* ---- Error/Success Messages ---- */
  .error-message,
  .success-message {
    padding: clamp(10px, 1.6vh, 14px);
    font-size: clamp(0.7rem, 1.5vh, 0.8125rem);
    border-radius: clamp(8px, 1.3vh, 12px);
    margin-bottom: clamp(12px, 1.8vh, 18px);
  }
  
  /* ---- History Section ---- */
  .toggle-icon {
    font-size: clamp(0.65rem, 1.3vh, 0.75rem);
  }
  
  /* ---- stishare Login Layout (Portrait) ---- */
  .stishare-login-container {
    flex-direction: column;
    min-height: 100vh;
  }
  
  /* Portrait Header - Compact with branding */
  .stishare-left-panel {
    flex: none;
    padding: 4vh 6vw 3vh;
    text-align: center;
    align-items: center;
    background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 100%);
    min-height: 22vh;
  }
  
  .stishare-brand {
    margin-bottom: 2vh;
  }
  
  .stishare-logo {
    width: 250px;
    height: auto;
    min-width: 50px;
    min-height: 50px;
    max-width: 90px;
    max-height: 90px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  }
  
  .stishare-content {
    max-width: 100%;
  }
  
  .stishare-headline {
    font-size: clamp(1rem, 2.8vh, 1.5rem);
    color: white;
    margin-bottom: 1vh;
    line-height: 1.3;
  }
  
  .stishare-description {
    font-size: clamp(0.75rem, 1.8vh, 0.9375rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5vh;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
  }
  
  .stishare-features {
    display: none; /* Hide on portrait to save vertical space */
  }
  
  /* Portrait Form Area */
  .stishare-right-panel {
    flex: 1;
    width: 100%;
    min-width: auto;
    border-left: none;
    padding: 3.5vh 6vw 4vh;
    background: white;
    border-radius: 24px 24px 0 0;
    margin-top: -2vh;
    position: relative;
    z-index: 1;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  }
  
  .stishare-auth-card {
    max-width: 100%;
    width: 100%;
  }
  
  .stishare-card-logo {
    display: none; /* Hide duplicate logo on portrait */
  }
  
  .stishare-card-title {
    font-size: clamp(1.125rem, 3vh, 1.5rem);
    margin-bottom: 0.5vh;
  }
  
  .stishare-card-subtitle {
    font-size: clamp(0.75rem, 1.8vh, 0.9375rem);
    margin-bottom: 2.5vh;
  }
  
  .stishare-form-group {
    margin-bottom: 1.8vh;
  }
  
  .stishare-form-group input {
    padding: clamp(10px, 1.6vh, 14px) clamp(12px, 2vh, 16px);
    font-size: clamp(0.875rem, 2vh, 1rem);
    border-bottom-width: 2px;
  }
  
  .stishare-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .stishare-btn-primary {
    padding: clamp(11px, 1.8vh, 15px) clamp(18px, 2.5vh, 26px);
    font-size: clamp(0.875rem, 2vh, 1rem);
    margin-top: 0.8vh;
    margin-bottom: 1.8vh;
  }
  
  .stishare-btn-secondary {
    padding: clamp(11px, 1.8vh, 15px) clamp(18px, 2.5vh, 26px);
    font-size: clamp(0.875rem, 2vh, 1rem);
  }
  
  .stishare-links {
    margin-bottom: 1.5vh;
    font-size: clamp(0.7rem, 1.6vh, 0.875rem);
  }
  
  .stishare-checkbox {
    font-size: clamp(0.7rem, 1.6vh, 0.875rem);
  }
  
  .stishare-checkbox input {
    width: clamp(14px, 2.2vh, 18px);
    height: clamp(14px, 2.2vh, 18px);
  }
  
  .stishare-divider {
    margin: 2vh 0;
    font-size: clamp(0.7rem, 1.6vh, 0.875rem);
  }
  
  .stishare-form .error-message {
    font-size: clamp(0.7rem, 1.6vh, 0.875rem);
    padding: 1.3vh 1.8vh;
    margin-bottom: 1.5vh;
  }
}

/* Portrait - Tablet size (wider tall screens) */
@media (max-aspect-ratio: 1/1) and (min-width: 550px) {
  /* ---- Main UI for Tablet Portrait ---- */
  .top-nav {
    flex-direction: row;
  }
  
  .nav-controls {
    width: auto;
  }
  
  .nav-brand {
    width: auto;
    justify-content: flex-start;
  }
  
  .nav-tabs {
    width: auto;
  }
  
  .nav-user {
    width: auto;
    justify-content: flex-end;
  }
  
  .tab-nav {
    flex-direction: row;
  }
  
  .form-row,
  .form-row-half {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(clamp(280px, 40vw, 340px), 1fr));
  }
  
  .item-actions {
    flex-direction: row;
  }
  
  .item-actions button {
    width: auto;
    flex: 1;
  }
  
  .controls-inline {
    flex-direction: row;
  }
  
  .search-input,
  .controls-inline select {
    width: auto;
  }
  
  /* ---- stishare Login for Tablet Portrait ---- */
  .stishare-left-panel {
    padding: 5vh 8vw 4vh;
    min-height: 28vh;
  }
  
  .stishare-logo {
    width: 250px;
    height: auto;
    max-width: 110px;
    max-height: 110px;
  }
  
  .stishare-headline {
    font-size: clamp(1.25rem, 3.2vh, 1.75rem);
  }
  
  .stishare-description {
    font-size: clamp(0.875rem, 2vh, 1rem);
    -webkit-line-clamp: 3;
  }
  
  .stishare-features {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 4vw;
    flex-wrap: wrap;
    margin-top: 2vh;
  }
  
  .stishare-feature {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(0.75rem, 1.7vh, 0.875rem);
  }
  
  .stishare-right-panel {
    padding: 4vh 10vw;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .stishare-form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.2vh;
  }
  
  .stishare-card-title {
    font-size: clamp(1.25rem, 3.5vh, 1.625rem);
  }
}

/* =========================
   Modals
   ========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--space-6);
  animation: fadeIn 0.2s var(--ease-out);
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  animation: scaleIn 0.3s var(--ease-out);
}

.modal-header {
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 100%);
  color: white;
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--slate-50);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* =========================
   Toast Notifications
   ========================= */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  padding: var(--space-4) var(--space-5);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 300px;
  max-width: 400px;
  animation: slideInRight 0.3s var(--ease-out);
  border-left: 4px solid var(--slate-400);
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast.info {
  border-left-color: var(--info);
}

.toast-icon {
  font-size: 1.25rem;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--slate-800);
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--slate-600);
  margin-top: var(--space-1);
}

.toast-close {
  padding: var(--space-1);
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: color var(--duration-fast);
}

.toast-close:hover {
  color: var(--slate-600);
}

/* =========================
   Page Transition Loader
   ========================= */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--sti-blue) 0%, var(--sti-blue-dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.active {
  opacity: 1;
  visibility: visible;
}

.page-loader .loader-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  margin-bottom: var(--space-4);
  animation: pulse 1s ease-in-out infinite;
}

.page-loader .loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--sti-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.page-loader .loader-text {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: var(--space-4);
  opacity: 0.8;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

/* =========================
   Loading States
   ========================= */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--sti-blue);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

.skeleton {
  background: linear-gradient(90deg, var(--slate-200) 0%, var(--slate-100) 50%, var(--slate-200) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* =========================
   Request Card Specific
   ========================= */
.request-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.request-card.urgent {
  border-color: var(--danger);
  background: linear-gradient(135deg, white 0%, rgba(254, 226, 226, 0.3) 100%);
}

.request-card.urgent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--danger);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.request-card .urgent-banner {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: var(--space-2);
}

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

/* Request Card Content Overflow Fix */
.request-card.my-request {
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.request-card .request-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.request-card .request-details {
  margin-bottom: var(--space-3);
}

.request-card .request-details p {
  margin: var(--space-1) 0;
  word-break: break-word;
}

.request-card .request-message {
  color: var(--slate-600);
  font-style: italic;
}

.request-card .request-meta {
  font-size: 0.8125rem;
  color: var(--slate-500);
  margin-bottom: var(--space-3);
}

.request-card .request-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Request Actions Buttons */
.request-actions .btn-cancel {
  padding: 0.5rem 1rem;
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  background: white;
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.request-actions .btn-cancel:hover {
  background: var(--danger);
  color: white;
}

.request-actions .btn-contact {
  padding: 0.5rem 1rem;
  border: 1px solid #17a2b8;
  border-radius: var(--radius-md);
  background: #17a2b8;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.request-actions .btn-contact:hover {
  background: #138496;
  border-color: #117a8b;
}

.request-actions .btn-offer {
  padding: 0.5rem 1rem;
  border: 1px solid var(--sti-gold);
  border-radius: var(--radius-md);
  background: var(--sti-gold);
  color: var(--sti-blue-dark);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.request-actions .btn-offer:hover {
  background: var(--sti-gold-dark);
  border-color: var(--sti-gold-dark);
}

.request-actions .btn-accept {
  padding: 0.5rem 1rem;
  border: 1px solid #28a745;
  border-radius: var(--radius-md);
  background: #28a745;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.request-actions .btn-accept:hover {
  background: #218838;
  border-color: #1e7e34;
}

.request-actions .btn-decline {
  padding: 0.5rem 1rem;
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  background: white;
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.request-actions .btn-decline:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

/* =========================
   Borrow Request Card (Lender View)
   ========================= */
.borrow-request-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
}

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

.borrow-request-card.urgent {
  border-color: var(--danger);
  background: linear-gradient(135deg, white 0%, rgba(254, 226, 226, 0.3) 100%);
}

.borrow-request-card.urgent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--danger);
}

.borrow-request-card .urgent-banner {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: var(--space-2);
}

.borrow-request-card .request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.borrow-request-card .requester-name {
  font-weight: 600;
  color: var(--slate-800);
}

.borrow-request-card .request-time {
  font-size: 0.8125rem;
  color: var(--slate-500);
}

.borrow-request-card .request-details {
  margin-bottom: var(--space-3);
}

.borrow-request-card .request-details p {
  margin: var(--space-1) 0;
  color: var(--slate-700);
}

.borrow-request-card .request-message {
  color: var(--slate-600);
  font-style: italic;
}

.borrow-request-card .request-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

/* =========================
   Footer
   ========================= */
.footer {
  text-align: center;
  padding: var(--space-6);
  color: var(--slate-500);
  font-size: 0.8125rem;
}

.footer a {
  color: var(--sti-blue);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* =========================
   Responsive Design
   ========================= */
@media (max-width: 768px) {
  .wrap {
    padding: var(--space-4);
  }
  
  .top-nav {
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
  }
  
  .nav-controls {
    width: 100%;
    justify-content: center;
    gap: var(--space-2);
  }
  
  .nav-brand {
    width: 100%;
    justify-content: center;
  }
  
  .nav-tabs {
    gap: var(--space-2);
  }
  
  .nav-user {
    gap: var(--space-2);
  }
  
  .tab-nav {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .card {
    padding: var(--space-5);
  }
  
  .form-row,
  .form-row-half {
    grid-template-columns: 1fr;
  }
  
  .items-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .controls-inline {
    width: 100%;
    flex-direction: column;
  }
  
  .search-input,
  .controls-inline select {
    width: 100%;
  }
  
  .login-card {
    padding: var(--space-6);
  }
  
  .notifications-panel {
    right: var(--space-4);
    left: var(--space-4);
    width: auto;
  }
}

@media (max-width: 480px) {
  .section-header h2 {
    font-size: 1.125rem;
  }
  
  .item-actions {
    flex-direction: column;
  }
  
  .item-actions button {
    width: 100%;
  }
}

/* Large Screens */
@media (min-width: 1400px) {
  .wrap {
    max-width: 1400px;
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  }
}

/* =========================
   Print Styles
   ========================= */
@media print {
  body {
    background: white;
  }
  
  .top-nav,
  .tab-nav,
  .btn-notif,
  .item-actions,
  .notifications-panel {
    display: none;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

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

:focus-visible {
  outline: 2px solid var(--sti-blue);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --slate-200: #666;
    --slate-300: #555;
  }
  
  .btn-primary,
  .btn-login {
    border: 2px solid white;
  }
}

/* =========================
   Utility Classes
   ========================= */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--slate-500);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

/* =========================
   Toast Notifications
   ========================= */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--success);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  animation: toastSlideIn 0.5s var(--spring) forwards;
  max-width: 400px;
  min-width: 300px;
}

.toast.toast-success {
  border-left-color: var(--success);
}

.toast.toast-error {
  border-left-color: var(--danger);
}

.toast.toast-warning {
  border-left-color: var(--warning);
}

.toast.toast-info {
  border-left-color: var(--info);
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  animation: toastIconPop 0.4s var(--spring) 0.2s both;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--slate-600);
}

.toast-close {
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
  flex-shrink: 0;
}

.toast-close:hover {
  background: var(--slate-100);
  color: var(--slate-600);
}

.toast.toast-exit {
  animation: toastSlideOut 0.3s var(--ease-out) forwards;
}

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

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

@keyframes toastIconPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Enlarged Logo for Login */
.logo-large {
  width: 120px !important;
  height: 120px !important;
}

.login-header .logo-large {
  width: 140px !important;
  height: 140px !important;
  margin-bottom: var(--space-4);
}
