/* ============================================
   RENSYYU ABSEN — Light & Clean + Sakura Theme
   ============================================ */

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

:root {
  /* Sakura Palette */
  --sakura-100: #fff0f5;
  --sakura-200: #ffd6e7;
  --sakura-300: #ffb3ce;
  --sakura-400: #ff85b3;
  --sakura-500: #f06292;
  --sakura-600: #e91e8c;
  --sakura-700: #c2185b;

  /* Primary = Sakura Pink */
  --primary:       #e91e8c;
  --primary-light: #f48fb1;
  --primary-dark:  #c2185b;
  --primary-pale:  #fce4ec;
  --primary-glow:  rgba(233,30,140,0.18);

  /* Accent = Soft Green (matcha) */
  --accent:        #81c784;
  --accent-light:  #c8e6c9;
  --accent-pale:   #f1f8e9;

  /* Neutral */
  --bg:            #fafafa;
  --bg-secondary:  #f5f5f5;
  --surface:       #ffffff;
  --surface-hover: #fdf6f9;
  --border:        #ede0e8;
  --border-light:  #f3e8ef;

  /* Text */
  --text-primary:   #2d1b2e;
  --text-secondary: #6d4c6e;
  --text-muted:     #a08ca2;
  --text-white:     #ffffff;

  /* Status */
  --success:     #4caf50;
  --success-bg:  #f1f8e9;
  --success-border: #c8e6c9;
  --warning:     #ff9800;
  --warning-bg:  #fff8e1;
  --warning-border: #ffe0b2;
  --danger:      #f44336;
  --danger-bg:   #fce4ec;
  --danger-border: #ffcdd2;
  --info:        #2196f3;
  --info-bg:     #e3f2fd;
  --info-border: #bbdefb;

  /* Shadows — soft */
  --shadow-xs: 0 1px 3px rgba(140,60,100,0.06);
  --shadow-sm: 0 2px 8px rgba(140,60,100,0.08);
  --shadow-md: 0 4px 20px rgba(140,60,100,0.12);
  --shadow-lg: 0 8px 40px rgba(140,60,100,0.14);

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --transition: all 0.2s ease;
  --font-body:  'Inter', 'Noto Sans JP', sans-serif;
  --font-jp:    'Noto Sans JP', sans-serif;
  --sidebar-w:  248px;
}

*, *::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-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--sakura-300); border-radius: 3px; }

/* ── Sakura Petals (decorative) ── */
.sakura-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.sakura-bg::before {
  content: '🌸';
  position: absolute;
  top: -60px; right: 5%;
  font-size: 280px;
  opacity: 0.04;
  transform: rotate(15deg);
  pointer-events: none;
}
.sakura-bg::after {
  content: '🌸';
  position: absolute;
  bottom: -80px; left: -40px;
  font-size: 240px;
  opacity: 0.03;
  transform: rotate(-20deg);
  pointer-events: none;
}

/* ════════════════════════════════════════
   AUTH PAGES
   ════════════════════════════════════════ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
}

.auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--surface);
  position: relative;
  z-index: 1;
}

.auth-right {
  width: 460px;
  background: linear-gradient(160deg, #fce4ec 0%, #f8bbd0 40%, #fce4ec 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.auth-right::before {
  content: '桜';
  font-family: var(--font-jp);
  position: absolute;
  font-size: 320px;
  color: rgba(194,24,91,0.06);
  line-height: 1;
  pointer-events: none;
  right: -60px; bottom: -40px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-md);
}

.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .jp-title {
  font-family: var(--font-jp);
  font-size: 40px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.auth-logo .sakura-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 6px 0 4px;
}
.auth-logo .sakura-strip span { font-size: 16px; }
.auth-logo .en-title {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  font-family: var(--font-body);
}
.auth-tab.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* ── Form Elements ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary-light);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: white; color: var(--text-primary); }
textarea.form-control { resize: vertical; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Icon input */
.input-wrapper { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 15px; pointer-events: none;
}
.input-wrapper .form-control { padding-left: 38px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary-dark);
  box-shadow: 0 2px 10px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: white;
  border-color: #388e3c;
}
.btn-success:hover { background: #388e3c; transform: translateY(-1px); }

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: #d32f2f;
}
.btn-danger:hover { background: #d32f2f; transform: translateY(-1px); }

.btn-warning {
  background: var(--warning);
  color: white;
  border-color: #f57c00;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-pale);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-sm  { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg  { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px 18px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-brand .brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-jp);
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.brand-text .jp-name {
  font-family: var(--font-jp);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  display: block;
}
.brand-text .en-name {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sidebar-user {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--sakura-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
  border: 2px solid var(--sakura-200);
}
.user-info .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.user-info .user-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.sidebar-nav { flex: 1; padding: 12px 10px; }
.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 10px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover {
  background: var(--sakura-100);
  color: var(--primary);
}
.nav-item.active {
  background: var(--primary-pale);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 16px; width: 18px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--sakura-100);
}
.sakura-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}
.sakura-petals { font-size: 16px; letter-spacing: 4px; margin-bottom: 4px; }

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  position: relative; z-index: 1;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0; z-index: 50;
}
.topbar-title h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.topbar-title p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-time {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--sakura-100);
  border: 1px solid var(--sakura-200);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.page-content { padding: 28px; flex: 1; }

/* ════════════════════════════════════════
   CARDS
   ════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-body { padding: 20px; }

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.primary::after { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.success::after { background: linear-gradient(90deg, var(--success), var(--accent)); }
.stat-card.warning::after { background: linear-gradient(90deg, var(--warning), #ffcc02); }
.stat-card.danger::after  { background: linear-gradient(90deg, var(--danger), var(--primary-light)); }
.stat-card.accent::after  { background: linear-gradient(90deg, var(--accent), #a5d6a7); }

.stat-icon { font-size: 26px; margin-bottom: 10px; display: block; }
.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ════════════════════════════════════════
   TABLE
   ════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: var(--bg-secondary);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border-light); transition: var(--transition); }
tbody tr:hover { background: var(--surface-hover); }
tbody td {
  padding: 12px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}
tbody td:first-child { color: var(--text-primary); }
tbody tr:last-child { border-bottom: none; }

/* ════════════════════════════════════════
   BADGES
   ════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.badge-success  { background: var(--success-bg);  color: var(--success); border: 1px solid var(--success-border); }
.badge-warning  { background: var(--warning-bg);  color: var(--warning); border: 1px solid var(--warning-border); }
.badge-danger   { background: var(--danger-bg);   color: var(--danger);  border: 1px solid var(--danger-border); }
.badge-info     { background: var(--info-bg);     color: var(--info);    border: 1px solid var(--info-border); }
.badge-primary  { background: var(--primary-pale);color: var(--primary); border: 1px solid var(--sakura-300); }
.badge-secondary{ background: var(--bg-secondary);color: var(--text-muted); border: 1px solid var(--border); }

/* ════════════════════════════════════════
   UPLOAD AREA
   ════════════════════════════════════════ */
.upload-area {
  border: 2px dashed var(--sakura-300);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  background: var(--sakura-100);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-pale);
}
.upload-area input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}

/* ════════════════════════════════════════
   CALENDAR
   ════════════════════════════════════════ */
.attendance-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day-header {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 4px;
  letter-spacing: 0.5px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
  cursor: default;
}
.cal-day.empty  { opacity: 0; pointer-events: none; }
.cal-day.no-class { color: var(--text-muted); background: var(--bg-secondary); }
.cal-day.approved { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.cal-day.pending  { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.cal-day.rejected { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.cal-day.absent   { background: var(--bg-secondary); color: var(--text-muted); }
.cal-day.today    { border-color: var(--primary) !important; box-shadow: 0 0 0 2px var(--primary-glow); font-weight: 700; }
.cal-day.future   { color: var(--text-muted); opacity: 0.35; }

/* ════════════════════════════════════════
   PROGRESS BAR
   ════════════════════════════════════════ */
.progress-bar {
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  height: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.8s ease;
}
.progress-fill.success { background: linear-gradient(90deg, var(--success), var(--accent)); }
.progress-fill.warning { background: linear-gradient(90deg, var(--warning), #ffcc02); }
.progress-fill.danger  { background: linear-gradient(90deg, var(--danger), var(--primary-light)); }

/* ════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
  border: 1px solid;
}
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: #2e7d32; }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger-border);  color: #c62828; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: #e65100; }
.alert-info    { background: var(--info-bg);    border-color: var(--info-border);    color: #1565c0; }

/* ════════════════════════════════════════
   MODAL
   ════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(45,27,46,0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(8px);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
}

/* ════════════════════════════════════════
   FILTER BAR
   ════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}
.search-wrapper { position: relative; flex: 1; min-width: 180px; }
.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}
.search-input { padding-left: 36px !important; }

/* ════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: 4px; }  .mt-2 { margin-top: 8px; }  .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 13px; } .text-xs { font-size: 11px; } .text-lg { font-size: 18px; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }
.text-primary-color  { color: var(--primary); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); }
.text-warning { color: var(--warning); } .text-muted  { color: var(--text-muted); }
.text-secondary-color { color: var(--text-secondary); }
.divider { height: 1px; background: var(--border-light); margin: 16px 0; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  gap: 4px;
  font-weight: 500;
}

.ss-thumb {
  width: 64px; height: 42px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.ss-thumb:hover { transform: scale(1.05); border-color: var(--primary); }

.empty-state { text-align: center; padding: 52px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.empty-state h3 { font-size: 15px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Locked Banner */
.locked-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.locked-icon { font-size: 30px; }
.locked-text h3 { font-size: 14px; font-weight: 600; color: var(--danger); }
.locked-text p  { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* Sakura Divider */
.sakura-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.sakura-divider::before, .sakura-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Ring Progress */
.pct-ring { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.pct-ring svg { transform: rotate(-90deg); }
.pct-ring .pct-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
  color: var(--primary);
}
.pct-ring .pct-text span { font-size: 9px; color: var(--text-muted); font-weight: 500; }

/* ════════════════════════════════════════
   SAKURA DECORATIONS
   ════════════════════════════════════════ */
.sakura-banner {
  background: linear-gradient(135deg, var(--primary-pale), var(--sakura-100));
  border: 1px solid var(--sakura-200);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.sakura-banner-left h2 { font-size: 20px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.sakura-banner-left .date-sub { font-size: 13px; color: var(--text-secondary); display:flex; align-items:center; gap:8px; }

/* ════════════════════════════════════════
   PRINT
   ════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .filter-bar, .no-print,
  .mobile-header, .bottom-nav { display: none !important; }
  .main-content { margin-left: 0 !important; padding-bottom: 0 !important; }
  body { background: white !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ════════════════════════════════════════
   MOBILE HEADER (hamburger bar)
   ════════════════════════════════════════ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.mobile-brand .brand-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 15px;
}
.mobile-brand .brand-name {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}
.hamburger {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.hamburger:hover { background: var(--primary-pale); border-color: var(--primary-light); }
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(45,27,46,0.4);
  z-index: 150;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ════════════════════════════════════════
   BOTTOM NAVIGATION (mobile)
   ════════════════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(140,60,100,0.08);
}
.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  min-width: 56px;
}
.bnav-item.active { color: var(--primary); }
.bnav-item.active .bnav-icon { background: var(--primary-pale); }
.bnav-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}
.bnav-badge {
  position: absolute;
  top: 4px; right: 8px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  min-width: 16px;
  text-align: center;
}

/* ════════════════════════════════════════
   REVIEW CARDS (admin swipe-style)
   ════════════════════════════════════════ */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.review-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.review-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}
.review-img-wrap img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.4s ease;
}
.review-img-wrap:hover img { transform: scale(1.03); }
.review-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(45,27,46,0.5) 0%, transparent 50%);
  pointer-events: none;
}
.review-img-badges {
  position: absolute;
  top: 10px; left: 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.review-img-info {
  position: absolute;
  bottom: 10px; left: 12px; right: 12px;
}
.review-img-name {
  font-size: 14px; font-weight: 700;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.review-img-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}
.review-thumb-strip {
  display: flex; gap: 5px;
  padding: 8px 10px;
  background: var(--bg-secondary);
  overflow-x: auto;
  scrollbar-width: none;
}
.review-thumb-strip::-webkit-scrollbar { display: none; }
.review-thumb {
  width: 50px; height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: var(--transition);
}
.review-thumb:hover,
.review-thumb.active { border-color: var(--primary); }

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border-light);
}
.btn-approve {
  background: var(--success);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center;
  justify-content: center; gap: 6px;
}
.btn-approve:hover { background: #388e3c; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(76,175,80,0.3); }
.btn-reject-trigger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center;
  justify-content: center; gap: 6px;
}
.btn-reject-trigger:hover { background: var(--danger); color: white; }

.reject-panel {
  display: none;
  padding: 14px;
  border-top: 1px solid var(--border-light);
  background: var(--danger-bg);
  animation: slideDown 0.2s ease;
}
.reject-panel.open { display: block; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* Batch toolbar */
.batch-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════
   MOBILE TOUCH TARGETS
   ════════════════════════════════════════ */
@media (hover: none) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .nav-item { padding: 12px 14px; }
  .form-control { font-size: 16px; } /* prevent iOS zoom */
}

/* ════════════════════════════════════════
   TABLET (max 1024px)
   ════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
  .page-content { padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════
   MOBILE (max 768px)
   ════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Sidebar becomes drawer */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    z-index: 300;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  /* Main content fills screen */
  .main-content {
    margin-left: 0 !important;
    padding-top: 56px;        /* space for mobile header */
    padding-bottom: 72px;     /* space for bottom nav */
  }

  /* Show mobile header + bottom nav */
  .mobile-header { display: flex; }
  .bottom-nav    { display: block; }

  /* Hide desktop topbar on mobile */
  .topbar { display: none; }

  /* Content padding */
  .page-content { padding: 16px 14px; }

  /* Auth */
  .auth-wrapper { flex-direction: column; }
  .auth-right   { display: none; }
  .auth-left    { padding: 24px 16px; flex: 1; }
  .auth-card    { border: none; box-shadow: none; padding: 24px 0; }

  /* Grids → 1 column */
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; gap: 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Stat cards smaller */
  .stat-card { padding: 14px; }
  .stat-value { font-size: 24px; }
  .stat-icon  { font-size: 22px; margin-bottom: 8px; }

  /* Cards */
  .card-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .card-body   { padding: 14px; }

  /* Tables → horizontal scroll */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }

  /* Review cards → full width stack */
  .review-card { border-radius: var(--radius-lg); }

  /* Filter bar */
  .filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-bar form { flex-direction: column !important; }

  /* Topbar right items */
  .topbar-right { gap: 8px; }
  .topbar-time  { display: none; }

  /* Modal full-screen on mobile */
  .modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-top: auto;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  /* PR form grid */
  .form-grid-2 { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════
   SMALL MOBILE (max 480px)
   ════════════════════════════════════════ */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-card  { padding: 20px 0; }
  .batch-toolbar { flex-direction: column; align-items: stretch; }
  .bnav-item  { padding: 6px 8px; min-width: 48px; }
}

