/* ==========================================================================
   TCE ProFlow - Design System & Styling (Thiagarajar College of Engineering)
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Colors - TCE Institutional Branding */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #64748b;

  /* TCE Theme Colors */
  --tce-blue: #0f294a;
  --tce-blue-light: #1e3a8a;
  --tce-gold: #d4af37;
  --tce-gold-light: rgba(212, 175, 55, 0.1);
  --tce-gray: #f1f5f9;

  /* Helper Status Colors (Light Theme Friendly) */
  --neon-blue: #0284c7;
  --neon-green: #10b981;
  --neon-purple: #7c3aed;
  --neon-orange: #ea580c;
  --neon-pink: #db2777;
  --neon-cyan: #0891b2;
  --neon-red: #ef4444;

  /* Shadows & Highlights */
  --glow-blue: 0 4px 12px rgba(2, 132, 199, 0.06);
  --glow-green: 0 4px 12px rgba(16, 185, 129, 0.06);
  --glow-purple: 0 4px 12px rgba(124, 58, 237, 0.06);
  --glow-orange: 0 4px 12px rgba(234, 88, 12, 0.06);
  --glow-pink: 0 4px 12px rgba(219, 39, 119, 0.06);
  --glow-red: 0 4px 12px rgba(239, 68, 68, 0.06);
  --shadow-main: 0 10px 15px -3px rgba(15, 23, 42, 0.04), 0 4px 6px -4px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(15, 23, 42, 0.04);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 10% 10%, rgba(15, 41, 74, 0.02) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(212, 175, 55, 0.03) 0px, transparent 50%);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--tce-blue);
}

/* Layout Framework */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navigation */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  background: var(--tce-blue);
  border-bottom: 3.5px solid var(--tce-gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(15, 41, 74, 0.12);
}

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

.logo-orb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--tce-gold);
  position: relative;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  transform: rotate(45deg);
  border: 2px solid #ffffff;
}

.logo-orb::after {
  content: 'TCE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  color: var(--tce-blue);
  font-size: 8px;
  font-weight: 800;
  font-family: var(--font-heading);
}

.logo-area h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.logo-area h1 span {
  color: var(--tce-gold);
}

.logo-motto {
  font-size: 0.65rem;
  color: var(--tce-gold);
  letter-spacing: 0.5px;
  margin-top: -3px;
  font-style: italic;
  opacity: 0.9;
}

/* Navigation Tabs */
.role-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.role-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: 20px;
  color: #cbd5e1;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
}

.role-btn:hover {
  color: #fff;
}

.role-btn.active {
  background: var(--tce-gold);
  border: 1px solid var(--tce-gold);
  color: var(--tce-blue);
  font-weight: 600;
  box-shadow: none;
  text-shadow: none;
}

/* Header Right Profile & Notif */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.notification-trigger {
  position: relative;
  cursor: pointer;
  color: #cbd5e1;
  transition: var(--transition-fast);
}

.notification-trigger:hover {
  color: #fff;
}

.notification-trigger .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--neon-red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 1.5rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid var(--tce-gold);
}

.profile-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.profile-info p {
  font-size: 0.75rem;
  color: #cbd5e1;
}

/* Notification Dropdown Menu */
.notif-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  width: 300px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-main);
  display: none;
  overflow: hidden;
  z-index: 110;
  color: var(--text-main);
}

.notif-dropdown.show {
  display: block;
  animation: slideInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-header {
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--tce-blue);
}

.notif-list {
  max-height: 250px;
  overflow-y: auto;
}

.notif-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item.unread {
  background: rgba(15, 41, 74, 0.03);
  border-left: 3px solid var(--tce-blue);
}

.notif-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Main Dashboard Panels */
.app-content {
  flex: 1;
  padding: 2rem;
  position: relative;
}

.view-panel {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.view-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Stats Cards Grid */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-main);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: #cbd5e1;
}

.stat-card.glow-blue:hover { border-color: var(--neon-blue); }
.stat-card.glow-green:hover { border-color: var(--neon-green); }
.stat-card.glow-purple:hover { border-color: var(--neon-purple); }
.stat-card.glow-orange:hover { border-color: var(--neon-orange); }
.stat-card.glow-cyan:hover { border-color: var(--neon-cyan); }
.stat-card.glow-red:hover { border-color: var(--neon-red); }
.stat-card.glow-indigo:hover { border-color: var(--tce-blue); }

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.stat-body h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Progress Ring CSS */
.stat-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-ring-container {
  position: relative;
  width: 80px;
  height: 80px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform-origin: 50% 50%;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tce-blue);
  font-family: var(--font-heading);
}

.progress-slider-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.progress-slider-box label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(15, 41, 74, 0.08);
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--tce-blue);
  cursor: pointer;
  transition: transform 0.1s ease;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Glass Cards & Layout Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

.grid-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-main);
  overflow: hidden;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.06), 0 4px 12px -5px rgba(15, 23, 42, 0.04);
}

.card.border-glow-pink:hover { border-color: rgba(255, 67, 132, 0.4); }
.card.border-glow-orange:hover { border-color: rgba(255, 124, 59, 0.4); }
.card.border-glow-red:hover { border-color: rgba(255, 62, 62, 0.4); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: #fafafb;
}

.card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tce-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Forms & UI Controls */
.quick-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text-main);
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
  border-color: var(--tce-blue);
  background: #fdfdfd;
}

select option {
  background: #ffffff;
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  border: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-blue {
  background: var(--tce-blue);
  color: #fff;
}
.btn-blue:hover {
  background: var(--tce-blue-light);
  transform: translateY(-2px);
}

.btn-orange {
  background: var(--neon-orange);
  color: #fff;
}
.btn-orange:hover {
  transform: translateY(-2px);
}

.btn-indigo {
  background: var(--tce-blue);
  color: #fff;
  border: 1px solid var(--tce-blue);
}
.btn-indigo:hover {
  background: var(--tce-blue-light);
  transform: translateY(-2px);
}

.btn-purple {
  background: var(--neon-purple);
  color: #fff;
}
.btn-purple:hover {
  transform: translateY(-2px);
}

.btn-pink {
  background: var(--neon-pink);
  color: #fff;
}
.btn-pink:hover {
  transform: translateY(-2px);
}

.btn-dark {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
}
.btn-dark:hover {
  background: #cbd5e1;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

.form-actions-right {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Timeline Components */
.log-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.max-h-350 { max-height: 350px; }
.max-h-250 { max-height: 250px; }
.max-h-200 { max-height: 200px; }
.mt-15 { margin-top: 15px; }

.log-item {
  display: flex;
  gap: 1rem;
  position: relative;
}

.log-item::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -20px;
  width: 2px;
  background: #cbd5e1;
}

.log-item:last-child::before {
  display: none;
}

.log-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tce-blue);
  flex-shrink: 0;
}

.log-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
  flex: 1;
}

.log-title-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.log-title-row strong {
  font-size: 0.85rem;
  color: var(--tce-blue);
}

.log-title-row span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.log-item-desc {
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.4;
}

.log-meta-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(15, 41, 74, 0.05);
  color: var(--tce-blue);
  margin-top: 6px;
  border: 1px solid rgba(15, 41, 74, 0.1);
  font-weight: 500;
}

/* File Dropzone & Manager */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background: #f8fafc;
}

.dropzone:hover {
  border-color: var(--tce-blue);
  background: rgba(15, 41, 74, 0.02);
}

.dropzone p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.dropzone p span {
  color: var(--tce-blue);
  font-weight: 600;
  text-decoration: underline;
}

.progress-bar-container {
  margin-top: 1rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

.progress-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.progress-bar {
  background: #e2e8f0;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  background: var(--tce-blue);
  height: 100%;
  width: 0;
  transition: width 0.1s ease;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
}

.file-info-col {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-info-col svg {
  color: var(--neon-cyan);
}

.file-details {
  display: flex;
  flex-direction: column;
}

.file-details strong {
  font-size: 0.8rem;
  color: var(--text-main);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-details span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge-indigo { background: rgba(99, 102, 241, 0.1); color: #4f46e5; border: 1px solid rgba(99, 102, 241, 0.2); }
.badge-emerald { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-orange { background: rgba(249, 115, 22, 0.1); color: #ea580c; border: 1px solid rgba(249, 115, 22, 0.2); }
.badge-red { background: rgba(239, 68, 68, 0.1); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.2); }

.status-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
  width: 100%;
}

.status-badge.approved { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-badge.pending { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.status-badge.rejected { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Interactive Timeline View */
.timeline-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  padding-left: 1.5rem;
}

.timeline-visual::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #cbd5e1;
}

.timeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-dot {
  position: absolute;
  left: -27px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 2px solid var(--bg-secondary);
  transition: var(--transition-normal);
}

.timeline-step.completed .timeline-dot {
  background: var(--neon-green);
}

.timeline-step.active .timeline-dot {
  background: var(--tce-blue);
  animation: pulseBlue 1.5s infinite;
}

@keyframes pulseBlue {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.timeline-step h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.timeline-step.completed h4 {
  color: var(--tce-blue);
}

.timeline-step.active h4 {
  color: var(--tce-blue-light);
}

.timeline-step span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Doubt Cards */
.doubt-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.doubt-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
}

.doubt-card.open {
  border-left: 3px solid var(--neon-orange);
}

.doubt-card.resolved {
  border-left: 3px solid var(--neon-green);
  opacity: 0.85;
}

.doubt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.doubt-card-header h5 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tce-blue);
}

.doubt-reply {
  background: #f0fdf4;
  border-left: 2px solid var(--neon-green);
  border-radius: 4px;
  padding: 6px 10px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #166534;
}

/* Comments thread */
.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.comment-bubble {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  max-width: 90%;
}

.comment-bubble.guide-origin {
  background: var(--tce-gold-light);
  border-color: rgba(212, 175, 55, 0.3);
  align-self: flex-start;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.comment-meta .author {
  color: var(--tce-blue);
}

.comment-meta .time {
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-main);
}

/* Meetings list styling */
.meeting-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.meeting-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  transition: var(--transition-fast);
}

.meeting-card:hover {
  background: #f1f5f9;
}

.meet-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tce-blue);
  margin-bottom: 4px;
}

.meet-time-loc {
  font-size: 0.7rem;
  color: var(--tce-blue-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.meet-mom-summary {
  font-size: 0.75rem;
  color: var(--text-main);
  line-height: 1.4;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

/* ==========================================================================
   GUIDE PORTAL SPECIFIC STYLES
   ========================================================================== */
.guide-grid-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .guide-grid-layout {
    grid-template-columns: 1fr;
  }
}

.teams-sidebar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  height: fit-content;
  box-shadow: var(--shadow-main);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.sidebar-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tce-blue);
}

.teams-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guide-team-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: var(--transition-normal);
}

.guide-team-btn:hover {
  background: #f1f5f9;
}

.guide-team-btn.active {
  background: var(--tce-gold-light);
  border-color: var(--tce-gold);
}

.guide-team-btn .btn-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--tce-blue);
}

.guide-team-btn .team-subtext {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.guide-team-btn .bar-container {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.guide-team-btn .bar-fill {
  height: 100%;
  background: var(--tce-blue);
  width: 0;
  transition: width 0.3s ease;
}

.guide-team-btn.active .bar-fill {
  background: linear-gradient(to right, var(--tce-blue), var(--tce-gold));
}

.guide-main-pane {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Banner area */
.team-title-banner {
  background: linear-gradient(135deg, var(--tce-blue), var(--tce-blue-light));
  border: 1px solid var(--tce-blue);
  border-bottom: 3.5px solid var(--tce-gold);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(15,41,74,0.1);
  color: #ffffff;
}

.team-title-banner h2 {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 2px;
  font-weight: 800;
}

.team-title-banner p {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.team-banner-stats {
  display: flex;
  gap: 1.5rem;
}

.banner-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.banner-stat .label {
  font-size: 0.7rem;
  color: #cbd5e1;
  text-transform: uppercase;
}

.banner-stat .val {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--tce-gold);
}

/* Doc review cards for guides */
.document-review-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-review-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc-review-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.doc-review-info svg {
  color: var(--neon-cyan);
}

.doc-review-details {
  display: flex;
  flex-direction: column;
}

.doc-review-details strong {
  font-size: 0.85rem;
  color: var(--text-main);
}

.doc-review-details span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.doc-review-actions {
  display: flex;
  gap: 0.5rem;
}

/* Milestones checklists for guides */
.milestone-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.milestone-control-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
}

.milestone-label-col {
  display: flex;
  flex-direction: column;
}

.milestone-label-col strong {
  font-size: 0.85rem;
  color: var(--tce-blue);
}

.milestone-label-col span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.milestone-buttons {
  display: flex;
  gap: 0.4rem;
}

/* Cross team comparison table styling */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #ffffff;
}

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

.comparison-table th {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--tce-blue);
  border-bottom: 2px solid var(--border-color);
  font-family: var(--font-heading);
}

.comparison-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table tr:hover td {
  background: #f8fafc;
}

/* Hidden Class */
.hidden {
  display: none !important;
}

/* HOD Portal Styles */
.delayed-team-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.delayed-team-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  transition: var(--transition-fast);
}

.delayed-team-card:hover {
  background: #fde8e8;
}

.delayed-info h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.delayed-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* SVG Chart Bar layout for HOD */
.department-chart-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0.5rem 0;
}

.dept-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dept-label {
  width: 150px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.dept-bar-wrapper {
  flex: 1;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.dept-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 1s ease-in-out;
}

.fill-cse { background: linear-gradient(to right, var(--tce-blue), #3b82f6); }
.fill-it { background: linear-gradient(to right, #7c3aed, #db2777); }
.fill-ece { background: linear-gradient(to right, #ea580c, #ef4444); }

.dept-val {
  width: 35px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  color: var(--tce-blue);
}

/* SVGs Inline Classes */
.icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  vertical-align: middle;
}
.icon-inline {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  vertical-align: middle;
}
.icon-lg {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.text-blue { color: var(--neon-blue); }
.text-green { color: #059669; }
.text-purple { color: var(--neon-purple); }
.text-orange { color: var(--neon-orange); }
.text-pink { color: var(--neon-pink); }
.text-cyan { color: var(--neon-cyan); }
.text-red { color: var(--neon-red); }

/* Modal Frame Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 500px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: #fafafb;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tce-blue);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Animations Keyframes */
@keyframes slideInDown {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Responsive Overrides */
@media (max-width: 640px) {
  .app-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .role-nav {
    width: 100%;
    justify-content: space-between;
  }
  .role-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}
