/* ═══════════════════════════════════════
   IRRSINN-KALENDER — SHARED STYLES
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

/* ── VARIABLES ── */
:root {
  --bg:           #020408;
  --bg2:          #040c10;
  --surface:      #050d14;
  --surface2:     #071218;
  --border:       #0f3344;
  --border-hi:    #1a5570;

  --cyan:         #00f5ff;
  --pink:         #ff006e;
  --green:        #00ff88;
  --purple:       #bf00ff;
  --red:          #ff2244;

  --text:         #c8e8f0;
  --muted:        #3a7080;
  --muted2:       #255060;

  --crossed-bg:   #001a10;
  --vacation-bg:  #001428;
  --school-bg:    #160028;

  --glow-cyan:    0 0 10px rgba(0,245,255,0.5), 0 0 30px rgba(0,245,255,0.2);
  --glow-pink:    0 0 10px rgba(255,0,110,0.5), 0 0 30px rgba(255,0,110,0.2);
  --glow-green:   0 0 10px rgba(0,255,136,0.5), 0 0 30px rgba(0,255,136,0.2);
}

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 5rem;
  overflow-x: hidden;
}

/* Scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 245, 255, 0.015) 2px,
    rgba(0, 245, 255, 0.015) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* Vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.82) 100%);
  pointer-events: none;
  z-index: 999;
}

/* ── BACKGROUND EFFECTS ── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,245,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-l {
  position: fixed;
  left: -200px;
  top: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,245,255,0.035) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-r {
  position: fixed;
  right: -200px;
  bottom: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,0,110,0.035) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── LAYOUT WRAPPER ── */
.wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 880px;
}

/* ── PANEL ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  width: 100%;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  box-shadow: 0 0 20px rgba(0,245,255,0.04);
  position: relative;
}

.panel-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title::before {
  content: '▸';
  color: var(--pink);
}

/* ── BUTTONS ── */
.btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  transition: all 0.15s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  transform: translateX(-100%);
  transition: transform 0.2s;
}

.btn:hover::before { transform: translateX(0); }
.btn:active         { transform: scale(0.97); }

.btn-cyan {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  box-shadow: 0 0 12px rgba(0,245,255,0.2);
}
.btn-cyan:hover { box-shadow: 0 0 22px rgba(0,245,255,0.4); }

.btn-pink {
  background: transparent;
  color: var(--pink);
  border: 1px solid var(--pink);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  box-shadow: 0 0 12px rgba(255,0,110,0.2);
}
.btn-pink:hover { box-shadow: 0 0 22px rgba(255,0,110,0.4); }

.btn-muted {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-hi);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.btn-muted:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── FORM FIELDS ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 155px;
}

.field label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.field input,
.field textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--cyan);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 0 100%);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0,245,255,0.15);
}

.field textarea { resize: none; height: 52px; }

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) hue-rotate(180deg);
  opacity: 0.4;
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  width: 100%;
  border: 1px solid var(--border-hi);
  background: var(--surface);
  flex-wrap: wrap;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  box-shadow: 0 0 20px rgba(0,245,255,0.06);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border-right: 1px solid var(--border);
  flex: 1;
  min-width: 80px;
}

.stat-value {
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 0 10px rgba(0,245,255,0.5);
}

.stat-label {
  color: var(--muted);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── PROGRESS BAR ── */
.progress-wrap  { width: 100%; margin-bottom: 1.5rem; }

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.progress-labels span:last-child { color: var(--pink); opacity: 0.7; }

.progress-bg {
  width: 100%;
  height: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  box-shadow: 0 0 8px rgba(0,245,255,0.5);
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  bottom: -2px;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 8px var(--cyan), 0 0 20px var(--cyan);
}

/* ── CALENDAR ── */
.month-block { margin-bottom: 2rem; }

.month-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.75;
}

.month-label::before {
  content: '▸';
  color: var(--pink);
  font-size: 0.65rem;
}

.weekday-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 3px;
}

.weekday-labels span {
  text-align: center;
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted2);
  padding: 2px 0;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.day-cell {
  aspect-ratio: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
  user-select: none;
  clip-path: polygon(0 0, calc(100% - 3px) 0, 100% 3px, 100% 100%, 3px 100%, 0 calc(100% - 3px));
}

.day-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.day-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.48rem, 1.3vw, 0.65rem);
  color: var(--muted2);
  position: absolute;
  top: 3px;
  left: 4px;
  line-height: 1;
}

/* Day states */
.day-cell.today-cell {
  border-color: var(--cyan);
  background: rgba(0,245,255,0.04);
  box-shadow: 0 0 10px rgba(0,245,255,0.2);
  animation: pulse-today 3s ease-in-out infinite;
}
.day-cell.today-cell .day-num { color: var(--cyan); }

@keyframes pulse-today {
  0%,100% { box-shadow: 0 0 10px rgba(0,245,255,0.2); }
  50%      { box-shadow: 0 0 18px rgba(0,245,255,0.38); }
}

.day-cell.future  { opacity: 0.15; cursor: not-allowed; }

.day-cell.past-un { background: rgba(255,34,68,0.03); border-color: rgba(255,34,68,0.12); }
.day-cell.past-un .day-num { color: rgba(255,34,68,0.5); }

.day-cell.crossed  { background: var(--crossed-bg);  border-color: #003320; }
.day-cell.crossed  .day-num { color: rgba(0,255,136,0.4); }

.day-cell.vacation { background: var(--vacation-bg); border-color: #002450; }
.day-cell.vacation .day-num { color: rgba(0,245,255,0.5); }

.day-cell.school   { background: var(--school-bg);   border-color: #2a0050; }
.day-cell.school   .day-num { color: rgba(191,0,255,0.5); }

/* Day markers */
.x-mark { display: none; position: absolute; inset: 0; }
.day-cell.crossed .x-mark { display: block; }
.x-mark::before,
.x-mark::after {
  content: '';
  position: absolute;
  top: 50%; left: 18%;
  width: 64%; height: 1.5px;
  background: var(--green);
  box-shadow: 0 0 5px rgba(0,255,136,0.7);
  border-radius: 1px;
}
.x-mark::before { transform: translateY(-50%) rotate(45deg); }
.x-mark::after  { transform: translateY(-50%) rotate(-45deg); }

.v-mark {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.65rem, 1.6vw, 0.9rem);
  filter: drop-shadow(0 0 3px rgba(0,245,255,0.5));
}
.day-cell.vacation .v-mark { display: flex; }

.s-mark {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.6rem, 1.4vw, 0.85rem);
  filter: drop-shadow(0 0 3px rgba(191,0,255,0.5));
}
.day-cell.school .s-mark { display: flex; }

/* ── LEGEND ── */
.legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ldot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  clip-path: polygon(0 0, calc(100% - 3px) 0, 100% 3px, 100% 100%, 3px 100%, 0 calc(100% - 3px));
}

.ldot.c { background: var(--crossed-bg);  border: 1px solid var(--green);  box-shadow: 0 0 5px rgba(0,255,136,0.4); }
.ldot.v { background: var(--vacation-bg); border: 1px solid var(--cyan);   box-shadow: 0 0 5px rgba(0,245,255,0.4); }
.ldot.s { background: var(--school-bg);   border: 1px solid var(--purple); box-shadow: 0 0 5px rgba(191,0,255,0.4); }

/* ── END BANNER ── */
.end-banner {
  text-align: center;
  padding: 2rem;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.1rem, 3.5vw, 1.8rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  display: none;
  border: 1px solid var(--cyan);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  background: linear-gradient(135deg, rgba(0,245,255,0.05), rgba(255,0,110,0.05));
  box-shadow: 0 0 40px rgba(0,245,255,0.2);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(90deg, var(--cyan), var(--pink), var(--cyan));
  background-size: 200%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ── RESPONSIVE ── */
@media (max-width: 500px) {
  .days-grid    { gap: 2px; }
  .panel        { padding: 1rem; }
  .stat         { padding: 0.6rem 0.6rem; min-width: 68px; }
}
