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

:root {
  --primary: #4361ee;
  --primary-hover: #3751d6;
  --primary-light: #eef2ff;
  --secondary: #7209b7;
  --accent: #f72585;
  --accent-light: #fde8f2;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --dark: #0f172a;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-focus: #4361ee;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition: all 0.2s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header */
.app-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 20px;
}

.nav-container {
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1.5px solid rgba(67, 97, 238, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.15);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

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

.brand-icon img,
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-btn:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.nav-btn.active {
  color: var(--primary);
  background-color: var(--primary-light);
  border-color: rgba(67, 97, 238, 0.2);
}

/* Main Container */
.main-wrapper {
  flex: 1;
  max-width: 1050px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* Hero / Header Card */
.hero-banner {
  background: linear-gradient(135deg, #2b3990 0%, #4361ee 50%, #7209b7 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 0.92rem;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.4;
}

/* Layout Grid for Form + Preview */
.grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .grid-layout {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.card-title svg {
  color: var(--primary);
}

/* Form Styles */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

@media (min-width: 500px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

label .req {
  color: var(--danger);
}

label .tip {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background-color: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  outline: none;
}

.form-control.has-icon {
  padding-left: 42px;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.form-control:disabled, .form-control[readonly] {
  background-color: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.9;
}

textarea.form-control {
  resize: vertical;
  min-height: 85px;
  line-height: 1.5;
}

.char-counter {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 3px;
}

/* Status Alert / Notification Box */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 10px;
}

.alert.show {
  display: flex;
}

.alert-success {
  background-color: var(--success-light);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-warning {
  background-color: var(--warning-light);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-danger {
  background-color: var(--danger-light);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
  background-color: var(--primary-light);
  color: #1e3a8a;
  border: 1px solid rgba(67, 97, 238, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3751d6);
  color: white;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #2a41ba);
  box-shadow: 0 6px 16px rgba(67, 97, 238, 0.4);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  background-color: #f1f5f9;
  border-color: var(--text-light);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Yearbook Card Preview */
.preview-sticky {
  position: sticky;
  top: 85px;
}

.yearbook-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 16px 16px;
}

.yearbook-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.yb-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.yb-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.yb-meta {
  flex: 1;
  min-width: 0;
}

.yb-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--dark);
  word-break: break-word;
  line-height: 1.3;
}

.yb-badge-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.yb-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 12px;
  background-color: var(--primary-light);
  color: var(--primary);
}

.yb-badge-secondary {
  background-color: var(--accent-light);
  color: var(--accent);
}

.yb-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 14px 0;
}

.yb-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.84rem;
}

.yb-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
}

.yb-info-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.yb-info-content {
  flex: 1;
  word-break: break-word;
}

.yb-info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.yb-quote-box {
  margin-top: 16px;
  background: #f8fafc;
  border-left: 3.5px solid var(--secondary);
  padding: 12px 14px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}

.yb-quote-text {
  font-size: 0.86rem;
  font-style: italic;
  color: #334155;
  line-height: 1.45;
}

.yb-quote-text::before {
  content: '“';
  font-size: 1.4rem;
  color: var(--secondary);
  line-height: 0;
  margin-right: 4px;
  vertical-align: -4px;
}

.yb-quote-text::after {
  content: '”';
  font-size: 1.4rem;
  color: var(--secondary);
  line-height: 0;
  margin-left: 4px;
  vertical-align: -6px;
}

/* Class Cards Grid (when no class is selected) */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.class-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.class-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.class-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.class-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
}

.class-card-badge {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 4px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.class-card-actions {
  display: flex;
  gap: 8px;
}

/* Modal Popup */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--dark);
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.45;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  background: var(--dark);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Table Styles (for Rekapitulasi) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

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

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

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

.badge-status.pending {
  background-color: #f1f5f9;
  color: var(--text-muted);
}

/* Quote helper buttons */
.quote-templates {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.quote-chip {
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.quote-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(67, 97, 238, 0.3);
}

/* Footer */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: white;
  margin-top: auto;
}

/* Student Header Minimalist */
.student-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.student-header-inner {
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.student-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Admin Tabs for Class-by-Class View */
.class-tabs-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--border);
}

.class-tab {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.class-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.class-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.class-tab-badge {
  padding: 2px 6px;
  font-size: 0.7rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
}

.class-tab.active .class-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* Quick summary cards in class recap */
.class-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.class-stat-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.class-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  margin: 2px 0;
}

.class-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   PHOTO UPLOAD & YEARBOOK POLAROID PREVIEW STYLES
   ========================================================================== */

.file-upload-zone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
}

.file-upload-zone:hover, .file-upload-zone.dragover {
  border-color: var(--primary);
  background: #f0f4ff;
  transform: translateY(-1px);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.file-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.file-upload-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 2px;
}

.file-upload-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--dark);
}

.file-upload-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-preview-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 10;
  text-align: left;
}

.file-preview-mini img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.file-mini-details {
  flex: 1;
  min-width: 0;
}

.file-mini-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-mini-size {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-remove-mini {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-remove-mini:hover {
  background: #fecaca;
  color: #dc2626;
  transform: scale(1.08);
}

/* Polaroid Photo Frame in Yearbook Preview */
.yb-photo-frame {
  margin: 14px 0 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  position: relative;
}

.yb-photo-wrapper {
  position: relative;
  width: 100%;
  padding-top: 110%; /* 1:1.1 aspect ratio portrait */
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f1f5f9;
}

.yb-photo-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.yb-photo-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  color: var(--text-muted);
  padding: 16px;
  text-align: center;
}

.yb-photo-placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 6px;
  opacity: 0.8;
}

.yb-photo-caption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.3px;
}

/* Admin Table Thumbnail */
.table-foto-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-foto-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #f1f5f9;
  flex-shrink: 0;
}

.table-foto-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.table-foto-no-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.btn-drive-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0284c7;
  text-decoration: none;
  transition: var(--transition);
}

.btn-drive-link:hover {
  background: #bae6fd;
  color: #0369a1;
}

/* Photo Modal Viewer */
.photo-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-modal-overlay.show {
  display: flex;
}

.photo-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalFadeIn 0.2s ease-out;
}

.photo-modal-img {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  background: #0f172a;
  display: block;
}

.photo-modal-body {
  padding: 18px 20px;
}

.photo-modal-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
}

.photo-modal-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}


/* --- Profil Siswa di Samping Nama (Yearbook Profile Design) --- */
.yb-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.yb-profile-frame {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  border: 3px solid #ffffff;
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.25);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yb-profile-frame:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 24px -4px rgba(79, 70, 229, 0.35);
}

.yb-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yb-avatar-placeholder {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-transform: uppercase;
}

.yb-profile-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: white;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.yb-profile-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 5px;
  text-transform: uppercase;
}

.table-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.table-foto-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #f1f5f9;
  flex-shrink: 0;
}

.table-foto-thumb:hover {
  transform: scale(1.18);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  border-color: var(--primary);
}

.table-foto-no-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1.5px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #94a3b8;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .yb-profile-frame {
    width: 76px;
    height: 76px;
    border-radius: 16px;
  }
}

/* ==========================================================================
   SISTEM VOTING ANGKATAN 2026 STYLES
   ========================================================================== */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #374151;
  border: 1.5px solid #d1d5db;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  width: 100%;
  max-width: 360px;
}

.btn-google:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

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

.vote-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

.vote-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vote-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  background: #e2e8f0;
}

.vote-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 18px 0 24px;
}

.vote-option-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vote-option-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.1);
}

.vote-option-card.selected {
  border-color: var(--primary);
  background: linear-gradient(145deg, #f8faff 0%, #eff6ff 100%);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2), 0 10px 24px rgba(67, 97, 238, 0.15);
}

.vote-option-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vote-option-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: #eff6ff;
  border: 1px solid #dbeafe;
}

.vote-option-card:nth-child(2) .vote-option-icon {
  background: #faf5ff;
  border-color: #f3e8ff;
}

.vote-badge-option {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-opsi-1 {
  background: #dbeafe;
  color: #1e40af;
}

.badge-opsi-2 {
  background: #f3e8ff;
  color: #6b21a8;
}

.vote-option-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}

.vote-option-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

.vote-radio-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.vote-option-card.selected .vote-radio-check {
  color: var(--primary);
}

.vote-receipt-card {
  background: #ffffff;
  border: 2px solid #bbf7d0;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.1);
  margin-bottom: 24px;
}

.vote-dual-bar {
  display: flex;
  height: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
  margin: 12px 0 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vote-bar-seg1 {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  overflow: hidden;
}

.vote-bar-seg2 {
  background: linear-gradient(90deg, #a855f7, #c084fc);
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  overflow: hidden;
}

/* ========================================================= */
/* MODAL ANIMASI RODA BERPUTAR (SPINNING WHEEL MODAL)       */
/* ========================================================= */
.wheel-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInWheel 0.3s ease-out;
}

@keyframes fadeInWheel {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wheel-modal-content {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 24px 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-header {
  margin-bottom: 14px;
}

.wheel-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
}

.wheel-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.wheel-stage {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 10px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-pointer-container {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.3));
}

.wheel-pointer {
  font-size: 28px;
  color: #ef4444;
  line-height: 1;
  animation: pointerPulse 1s ease-in-out infinite alternate;
}

@keyframes pointerPulse {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(2px) scale(1.08); }
}

.wheel-disc {
  width: 310px;
  height: 310px;
  border-radius: 50%;
  position: relative;
  transition: transform 4.5s cubic-bezier(0.15, 0.95, 0.25, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.wheel-result-box {
  width: 100%;
  animation: popInResult 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popInResult {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.wheel-congratulations {
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.08), rgba(247, 37, 133, 0.08));
  border: 2px solid rgba(67, 97, 238, 0.25);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 4px;
}

.confetti-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 4px;
}

.wheel-congratulations h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}

.wheel-team-result {
  font-size: 1.55rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 6px 0;
  letter-spacing: 0.5px;
}

.wheel-lock-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.wheel-close-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  transition: all 0.2s ease;
  line-height: 1;
}

.wheel-close-corner:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: scale(1.08);
}

