/* Pharmacy College Management System - Custom CSS */
:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-subtle: #ccfbf1;
  --secondary: #64748b;
  --accent: #38bdf8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --light: #f8fafc;
  --sidebar-width: 270px;
  --header-height: 68px;
  --card-radius: 12px;
  --border-color: #e2e8f0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #f1f5f9;
  color: #334155;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Header / Navbar */
.app-navbar {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.brand-badge {
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 1010;
  transition: all 0.3s ease;
}

.sidebar-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  font-weight: 700;
  padding: 12px 20px 4px;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 8px;
  margin: 2px 10px;
  transition: all 0.2s ease;
}

.nav-link-custom i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  color: #64748b;
}

.nav-link-custom:hover {
  background: #f0fdfa;
  color: var(--primary);
}

.nav-link-custom:hover i {
  color: var(--primary);
}

.nav-link-custom.active {
  background: linear-gradient(90deg, #0d9488, #0f766e);
  color: #ffffff !important;
  font-weight: 600;
}

.nav-link-custom.active i {
  color: #ffffff !important;
}

/* Main Content Area */
.app-main-content {
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--header-height));
  padding-bottom: 40px;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-main-content {
    margin-left: 0;
  }
}

/* Modern Cards */
.pharma-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 24px;
}

.pharma-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.card-header-custom {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-widget {
  padding: 20px;
  border-radius: var(--card-radius);
  background: #ffffff;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.stat-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.stat-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Tables */
.table-custom {
  margin-bottom: 0;
}

.table-custom thead th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
}

.table-custom tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
  font-size: 0.9rem;
}

.table-hover tbody tr:hover {
  background-color: #f8fafc;
}

/* Public Notice Ticker (Upward Scrolling) */
.ticker-wrap {
  position: relative;
  overflow: hidden;
  height: 48px;
  background: #042f2e;
  color: #5eead4;
  border-bottom: 2px solid #0d9488;
}

.ticker-title {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #0d9488;
  color: #ffffff;
  padding: 0 20px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  z-index: 10;
  letter-spacing: 0.5px;
}

.ticker-content {
  position: absolute;
  left: 170px;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
}

.vertical-marquee {
  display: flex;
  flex-direction: column;
  animation: scrollUp 15s linear infinite;
}

.vertical-marquee:hover {
  animation-play-state: paused;
}

@keyframes scrollUp {
  0% { transform: translateY(0); }
  25% { transform: translateY(-48px); }
  50% { transform: translateY(-96px); }
  75% { transform: translateY(-144px); }
  100% { transform: translateY(0); }
}

.ticker-item {
  height: 48px;
  line-height: 48px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 30px;
  color: #ccfbf1;
  font-size: 0.92rem;
}

.ticker-item a {
  color: #5eead4;
  text-decoration: none;
}

.ticker-item a:hover {
  text-decoration: underline;
}

/* Role Badges */
.badge-role-developer { background-color: #6366f1; color: white; }
.badge-role-admin { background-color: #0d9488; color: white; }
.badge-role-principal { background-color: #8b5cf6; color: white; }
.badge-role-staff { background-color: #0284c7; color: white; }
.badge-role-librarian { background-color: #d97706; color: white; }
.badge-role-lab_tech { background-color: #059669; color: white; }
.badge-role-accountant { background-color: #16a34a; color: white; }
.badge-role-store_manager { background-color: #ca8a04; color: white; }
.badge-role-student { background-color: #2563eb; color: white; }
.badge-role-guardian { background-color: #4b5563; color: white; }

/* Action Buttons */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ID Card Styles */
.student-id-card {
  width: 340px;
  height: 520px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  background: white;
  border: 1px solid #cbd5e1;
  margin: 0 auto;
  position: relative;
}

.id-card-header {
  background: linear-gradient(135deg, #0f766e, #0369a1);
  color: white;
  padding: 16px;
  text-align: center;
}

.id-card-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  object-fit: cover;
  margin: -40px auto 12px;
  background: white;
  display: block;
}

/* Certificate Styles */
.certificate-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 40px;
  background: #ffffff;
  border: 8px double #0d9488;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  position: relative;
}

.certificate-seal {
  width: 100px;
  height: 100px;
  border: 3px solid #0d9488;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: 700;
  color: #0d9488;
  font-size: 0.8rem;
  text-align: center;
}
