:root{
  --bg1:#07121f;
  --bg2:#0b2a3a;
  --card: rgba(255,255,255,.10);
  --card2: rgba(255,255,255,.14);
  --stroke: rgba(255,255,255,.18);
  --text:#eaf2ff;
  --muted: rgba(234,242,255,.70);
  --primary:#3aa0ff;
  --primary2:#1d6fff;
  --danger:#ff4b4b;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(58,160,255,.25), transparent 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(29,111,255,.20), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* Subtiler Hintergrund (optional) */
body::before{
  content:"";
  position:fixed; inset:0;
  background:url('https://images.unsplash.com/photo-1482867996988-29ec3a0f1acd?q=80&w=2070') center/cover no-repeat;
  opacity:.18;
  filter:saturate(1.05) contrast(1.02);
  pointer-events:none;
  z-index:-2;
}
body::after{
  content:"";
  position:fixed; inset:0;
  background: radial-gradient(900px 500px at 20% 80%, rgba(255,255,255,.08), transparent 60%);
  pointer-events:none;
  z-index:-1;
}

a{color:inherit; text-decoration:none}
.container{max-width:1100px; margin:24px auto; padding:0 16px}

.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(14px);
  background: rgba(6,16,26,.55);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.topbar-inner{
  max-width:1100px; margin:0 auto; padding:14px 16px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.topbar-title{
  display:flex; align-items:center; gap:10px;
  font-weight:700; letter-spacing:.2px;
}
.topbar-icon{filter: drop-shadow(0 6px 12px rgba(0,0,0,.25));}

.card{
  background: linear-gradient(180deg, var(--card2), var(--card));
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-head{
  padding:18px 18px 10px 18px;
  display:flex; flex-direction:column; gap:4px;
}
.card-head-title{font-size:18px; font-weight:700}
.card-head-sub{font-size:13px; color:var(--muted)}
.calendar{padding:10px 12px 14px 12px}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color:var(--text);
  font-weight:600;
  cursor:pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.20)}
.btn:active{transform: translateY(1px)}
.btn-primary{
  background: linear-gradient(180deg, rgba(58,160,255,.95), rgba(29,111,255,.95));
  border-color: rgba(255,255,255,.18);
}
.btn-primary:hover{filter: brightness(1.03)}
.btn-ghost{
  background: transparent;
  border-color: rgba(255,255,255,.18);
}
.icon-btn{
  width:38px; height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
}
.icon-btn:hover{background: rgba(255,255,255,.12)}

/* Auth */
.auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px 16px;
}
.auth-card{
  width:min(460px, 100%);
  background: linear-gradient(180deg, var(--card2), var(--card));
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:20px;
}
.brand{
  display:flex; align-items:center; gap:12px;
  margin-bottom:14px;
}
.brand-mark{
  width:44px; height:44px; display:grid; place-items:center;
  border-radius:14px;
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
}
.brand-title{font-weight:800; font-size:18px}
.brand-sub{color:var(--muted); font-size:13px}

.auth-form{display:flex; flex-direction:column; gap:12px; margin-top:12px}
.hint{margin-top:12px; color:var(--muted); font-size:12px}

/* Fields */
.field{display:flex; flex-direction:column; gap:6px}
.field > span{font-size:12px; color:var(--muted)}
.field input{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  color:var(--text);
  outline:none;
}
.field input::placeholder{color: rgba(234,242,255,.45)}
.field input:focus{
  border-color: rgba(58,160,255,.55);
  box-shadow: 0 0 0 4px rgba(58,160,255,.14);
}

.alert{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
}
.alert-error{
  border-color: rgba(255,75,75,.35);
  background: rgba(255,75,75,.10);
}

/* Modal */
.modal{
  position:fixed; inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);

  z-index: 9999;
}
.modal-content{
  width:min(560px, 100%);
  background: linear-gradient(180deg, rgba(16,34,48,.95), rgba(9,18,30,.92));
  border:1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-bottom:10px;
}
.modal-title{font-size:16px; font-weight:800}
.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top:10px;
}
@media (max-width: 560px){
  .grid-2{grid-template-columns: 1fr}
}

.date-preview{color: var(--muted); font-size:12px}
.modal-buttons{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:14px;
}

/* FullCalendar Tune */
.fc{
  --fc-border-color: rgba(255,255,255,.12);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(255,255,255,.06);
  --fc-today-bg-color: rgba(58,160,255,.14);
}
.fc .fc-toolbar-title{
  font-size:16px;
  font-weight:800;
}
.fc .fc-button{
  border-radius:12px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.07) !important;
  color: var(--text) !important;
  padding:8px 10px !important;
}
.fc .fc-button:hover{background: rgba(255,255,255,.12) !important;}
.fc .fc-button-primary:not(:disabled).fc-button-active{
  background: rgba(58,160,255,.22) !important;
}
.fc .fc-daygrid-day-number{color: rgba(234,242,255,.85)}
.fc .fc-col-header-cell-cushion{color: rgba(234,242,255,.85)}
.fc-event{
  border: none !important;
  border-radius: 10px !important;
  padding: 2px 6px !important;
  background: rgba(58,160,255,.85) !important;
}
.fc-event-title{font-weight:700}

/* Flatpickr alt input inherits field styling */
.flatpickr-alt{width:100%}

/* Small UI helpers */
.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-size:12px;
  font-weight:700;
  margin-left:10px;
}
.topbar-actions{display:flex; gap:10px; align-items:center}

.btn-danger{
  background: rgba(255,75,75,.18);
  border-color: rgba(255,75,75,.35);
}
.btn-danger:hover{background: rgba(255,75,75,.24)}
.select{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
}
.table{
  width:100%;
  border-collapse: collapse;
  font-size:13px;
}
.table th, .table td{
  text-align:left;
  padding:10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.table th{
  color: rgba(234,242,255,.85);
  font-weight:800;
  font-size:12px;
  letter-spacing:.2px;
}
