/* =========================================
   PARRAS — Design System & Styles
   Purple (#7B4FBF) → Gold (#E8892E)
   Light Theme for Hostinger Deployment
   ========================================= */

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

/* ---- CSS Custom Properties ---- */
:root {
  --purple: #7B4FBF;
  --purple-light: #9B6FDF;
  --purple-dark: #5A2D8E;
  --purple-subtle: #EDE6F6;
  --gold: #D4A017;
  --amber: #E8892E;
  --gold-light: #F0C75E;
  --gold-subtle: #FDF4E0;
  --bg: #F8F6FB;
  --bg-secondary: #F0ECF5;
  --card-bg: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #5A5A7A;
  --text-muted: #9A9AB0;
  --border: #E8E5F0;
  --border-light: #F0EDF5;
  --danger: #E74C6F;
  --danger-light: #FDECF0;
  --success: #2ECC71;
  --success-light: #E8FAF0;
  --gradient-primary: linear-gradient(135deg, #7B4FBF, #E8892E);
  --gradient-purple: linear-gradient(135deg, #5A2D8E, #9B6FDF);
  --gradient-gold: linear-gradient(135deg, #D4A017, #E8892E);
  --gradient-hero: linear-gradient(160deg, #F8F6FB 0%, #EDE6F6 40%, #FDF4E0 100%);
  --shadow-sm: 0 1px 3px rgba(90, 45, 142, 0.06);
  --shadow-md: 0 4px 14px rgba(90, 45, 142, 0.08);
  --shadow-lg: 0 8px 30px rgba(90, 45, 142, 0.1);
  --shadow-xl: 0 16px 50px rgba(90, 45, 142, 0.14);
  --shadow-glow-purple: 0 0 25px rgba(123, 79, 191, 0.25);
  --shadow-glow-gold: 0 0 25px rgba(212, 160, 23, 0.25);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.15s ease;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--purple); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--purple-dark); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 246, 251, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.nav-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1.5px;
}
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.nav-link:hover {
  color: var(--purple);
  background: var(--purple-subtle);
}
.nav-link.admin-link {
  background: var(--gradient-primary);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(123, 79, 191, 0.2);
}
.nav-link.admin-link:hover {
  box-shadow: var(--shadow-glow-purple);
  transform: translateY(-1px);
  color: #fff;
}

/* ---- Hero ---- */
.hero {
  margin-top: 70px;
  padding: 80px 24px 60px;
  background: var(--gradient-hero);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 79, 191, 0.06) 0%, transparent 70%);
  animation: heroFloat 8s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.06) 0%, transparent 70%);
  animation: heroFloat 10s ease-in-out infinite reverse;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.hero-content { position: relative; z-index: 1; }
.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
  animation: logoPulse 4s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: var(--shadow-lg), 0 0 20px rgba(123, 79, 191, 0.2); }
  50% { box-shadow: var(--shadow-xl), 0 0 35px rgba(123, 79, 191, 0.3); }
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.hero-tagline {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ---- Circuit Decoration ---- */
.circuit-line {
  position: absolute;
  background: var(--gradient-primary);
  opacity: 0.07;
  border-radius: 2px;
}
.circuit-line.h { height: 2px; width: 120px; }
.circuit-line.v { width: 2px; height: 80px; }
.circuit-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.1;
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.section-title-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ---- Notice Board ---- */
.notice-board {
  padding: 60px 0 80px;
}
.notices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

/* ---- Notice Card ---- */
.notice-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 0;
  position: relative;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  animation: cardFadeIn var(--transition-slow) both;
}
.notice-card:nth-child(1) { animation-delay: 0.05s; }
.notice-card:nth-child(2) { animation-delay: 0.1s; }
.notice-card:nth-child(3) { animation-delay: 0.15s; }
.notice-card:nth-child(4) { animation-delay: 0.2s; }
.notice-card:nth-child(5) { animation-delay: 0.25s; }
.notice-card:nth-child(6) { animation-delay: 0.3s; }
.notice-card:nth-child(n+7) { animation-delay: 0.35s; }
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.notice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transition: height var(--transition);
}
.notice-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.notice-card:hover::before { height: 5px; }

.card-body { padding: 28px 24px 24px; }

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-subtle);
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.card-date-icon { font-size: 0.85rem; }
.card-author-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--amber);
  background: var(--gold-subtle);
  padding: 4px 10px;
  border-radius: 20px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.card-attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.card-read-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-fast);
}
.notice-card:hover .card-read-more { gap: 8px; }

/* ---- Notice Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px) scale(0.96);
  transition: transform var(--transition-slow);
  box-shadow: var(--shadow-xl);
}
.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}
.modal-gradient-bar {
  height: 6px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 2;
}
.modal-close:hover { background: var(--purple-subtle); color: var(--purple); }
.modal-inner { padding: 32px 36px 36px; }
.modal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.modal-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-subtle);
  padding: 6px 14px;
  border-radius: 20px;
}
.modal-author {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--amber);
  background: var(--gold-subtle);
  padding: 6px 14px;
  border-radius: 20px;
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 20px;
}
.modal-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Modal Attachments */
.modal-attachments {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}
.modal-attachments-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-light);
}
.attachment-item:hover {
  background: var(--purple-subtle);
  border-color: rgba(123, 79, 191, 0.2);
}
.attachment-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.attachment-icon.image { background: #EBF5FB; }
.attachment-icon.pdf { background: #FDECF0; }
.attachment-icon.link { background: var(--purple-subtle); }
.attachment-info { flex: 1; min-width: 0; }
.attachment-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment-type {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.attachment-action {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.attachment-action:hover { background: rgba(123, 79, 191, 0.08); }
.attachment-image-preview {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

/* ---- Empty & Loading States ---- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.6; }
.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.empty-state p { color: var(--text-muted); font-size: 0.95rem; }

.loading-state { text-align: center; padding: 60px 24px; }
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { color: var(--text-muted); font-size: 0.9rem; }

/* ---- Footer ---- */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-light);
  padding: 40px 24px;
  text-align: center;
}
.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 12px;
  opacity: 0.8;
}
.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* =========================================
   ADMIN DASHBOARD STYLES
   ========================================= */

/* ---- Admin Layout ---- */
.admin-page { margin-top: 70px; }
.admin-header-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 24px;
}
.admin-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.admin-welcome h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.admin-welcome p {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.admin-actions { display: flex; align-items: center; gap: 12px; }

/* Auth Container (Clerk sign-in) */
.auth-container {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--gradient-hero);
}
.auth-box {
  text-align: center;
}
.auth-box .hero-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
}
.auth-box h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.auth-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
#clerk-sign-in {
  display: flex;
  justify-content: center;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(123, 79, 191, 0.25);
}
.btn-primary:hover {
  box-shadow: var(--shadow-glow-purple);
  transform: translateY(-1px);
  color: #fff;
}
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--purple-subtle);
  border-color: var(--purple);
  color: var(--purple);
}
.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}
.btn-sm {
  font-size: 0.8rem;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* ---- Admin Content ---- */
.admin-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* ---- Create Notice Panel ---- */
.create-panel {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
  overflow: hidden;
}
.create-panel-header {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}
.create-panel-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.create-panel-body { padding: 28px; }
.create-panel-body.collapsed { display: none; }

/* ---- Form ---- */
.form-group { margin-bottom: 22px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 16px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(123, 79, 191, 0.1);
}
.form-textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.65;
}
.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Attachment Type Selector (Legacy — kept for backward compat) */
.attachment-type-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.attachment-type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.attachment-type-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.attachment-type-btn.active {
  border-color: var(--purple);
  background: var(--purple-subtle);
  color: var(--purple);
  font-weight: 600;
}
.attachment-type-btn .att-icon { font-size: 1.1rem; }

/* ===== Upload Zone V2 — Premium Multi-file ===== */
.upload-zone-v2 {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg) 0%, rgba(123, 79, 191, 0.03) 100%);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.upload-zone-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(123, 79, 191, 0.04) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}
.upload-zone-v2:hover,
.upload-zone-v2.dragover {
  border-color: var(--purple);
  background: linear-gradient(135deg, var(--purple-subtle) 0%, rgba(232, 137, 46, 0.04) 100%);
  box-shadow: 0 0 0 4px rgba(123, 79, 191, 0.08);
}
.upload-zone-v2:hover::before,
.upload-zone-v2.dragover::before { opacity: 1; }
.upload-zone-v2.dragover {
  transform: scale(1.01);
  border-style: solid;
}

.upload-zone-v2-inner { position: relative; z-index: 1; }

.upload-zone-v2-icon {
  color: var(--purple-light);
  margin-bottom: 12px;
  opacity: 0.7;
  transition: all var(--transition);
}
.upload-zone-v2:hover .upload-zone-v2-icon {
  opacity: 1;
  transform: translateY(-4px);
  color: var(--purple);
}
.upload-zone-v2.dragover .upload-zone-v2-icon {
  opacity: 1;
  transform: translateY(-8px) scale(1.1);
  color: var(--purple);
}

.upload-zone-v2-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.upload-zone-v2-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.upload-zone-v2-subtitle .browse-link {
  color: var(--purple);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-zone-v2-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.upload-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-subtle);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.upload-badge-limit {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ===== File Preview List ===== */
.file-preview-list {
  margin-top: 0;
  transition: all var(--transition);
}
.file-preview-list.has-files {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.file-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.file-preview-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.file-preview-clear {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.file-preview-clear:hover {
  background: var(--danger-light);
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
  animation: fileSlideIn 0.25s ease both;
}
.file-preview-item:last-child { margin-bottom: 0; }
.file-preview-item:hover {
  border-color: rgba(123, 79, 191, 0.2);
  box-shadow: var(--shadow-sm);
}

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

.file-preview-thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
  overflow: hidden;
}
.file-preview-thumb.image {
  background: #EBF5FB;
}
.file-preview-thumb.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.file-preview-thumb.pdf {
  background: #FDECF0;
}
.file-preview-thumb.link {
  background: var(--purple-subtle);
}

.file-preview-details {
  flex: 1;
  min-width: 0;
}
.file-preview-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.file-preview-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 0.73rem;
  color: var(--text-muted);
}
.file-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple);
  background: var(--purple-subtle);
  padding: 1px 6px;
  border-radius: 4px;
}

.file-preview-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.file-preview-remove:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ===== Add Link Toggle & Panel ===== */
.add-link-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.add-link-toggle:hover,
.add-link-toggle.active {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--purple-subtle);
}
.add-link-icon { font-size: 1.1rem; }

.link-input-panel {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  animation: fileSlideIn 0.2s ease;
}
.link-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.link-input-row .form-input {
  flex: 1;
}

.links-preview-list {
  margin-top: 12px;
}
.link-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  animation: fileSlideIn 0.25s ease both;
}
.link-preview-icon { font-size: 1.2rem; }
.link-preview-details { flex: 1; min-width: 0; }
.link-preview-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-preview-url {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Existing Attachments (Edit Mode) ===== */
.existing-attachments {
  margin-bottom: 22px;
  padding: 16px;
  background: var(--gold-subtle);
  border: 1px solid rgba(212, 160, 23, 0.2);
  border-radius: var(--radius-md);
}
.existing-attachments .form-label {
  color: var(--amber);
  margin-bottom: 12px;
}

/* Old upload zone (keep for compat) */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--purple);
  background: var(--purple-subtle);
}
.upload-zone-icon { font-size: 2rem; margin-bottom: 8px; opacity: 0.5; }
.upload-zone p { font-size: 0.88rem; color: var(--text-secondary); }
.upload-zone .browse-link { color: var(--purple); font-weight: 600; }
.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 10px;
}
.upload-preview-icon { font-size: 1.5rem; }
.upload-preview-info { flex: 1; }
.upload-preview-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.upload-preview-size { font-size: 0.75rem; color: var(--text-muted); }
.upload-preview-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}


.form-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

/* ---- Notices List (Admin) ---- */
.notices-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.notices-list-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.notices-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-subtle);
  padding: 4px 12px;
  border-radius: 20px;
}

.admin-notice-item {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-fast);
}
.admin-notice-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--purple-subtle);
}
.admin-notice-accent {
  width: 4px;
  height: 48px;
  border-radius: 2px;
  background: var(--gradient-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.admin-notice-info { flex: 1; min-width: 0; }
.admin-notice-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.admin-notice-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-notice-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- Toast Notifications ---- */
.toast-container {
  position: fixed;
  top: 85px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  animation: toastSlideIn 0.35s ease, toastFadeOut 0.35s ease 3.65s forwards;
  min-width: 280px;
  max-width: 400px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast-icon { font-size: 1.2rem; }
.toast-message { font-size: 0.88rem; font-weight: 500; color: var(--text); flex: 1; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px;
}
@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastFadeOut {
  to { transform: translateX(100%); opacity: 0; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.4rem; letter-spacing: 2px; }
  .hero { padding: 60px 20px 40px; }
  .hero-logo { width: 90px; height: 90px; }
  .notices-grid { grid-template-columns: 1fr; }
  .navbar { padding: 0 16px; height: 60px; }
  .nav-title { font-size: 1.1rem; }
  .nav-logo { width: 36px; height: 36px; }
  .admin-header-inner { flex-direction: column; align-items: flex-start; }
  .modal-inner { padding: 24px 20px 28px; }
  .modal-title { font-size: 1.35rem; }
  .section-title { font-size: 1.6rem; }
  .create-panel-body { padding: 20px; }
  .admin-notice-item { flex-direction: column; }
  .admin-notice-accent { width: 100%; height: 3px; }
  .admin-notice-actions { width: 100%; }
  .admin-notice-actions .btn { flex: 1; justify-content: center; }
  .link-input-row { flex-direction: column; }
  .link-input-row .form-input { max-width: 100% !important; }
  .upload-zone-v2 { padding: 28px 16px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-tagline { font-size: 0.8rem; letter-spacing: 2px; }
  .card-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .attachment-type-selector { flex-direction: column; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .upload-zone-v2-badges { gap: 6px; }
  .file-preview-list.has-files { padding: 12px; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Modal Scrollbar ---- */
.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ---- Utility ---- */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
