/* ============================================================
   CinaŽas Park — Global Styles
   Aesthetic: Industrial-Fresh / sporty park management
   Font: Barlow Condensed (headers) + Nunito (body)
   Colors: deep forest green + amber accent + off-white
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Nunito:wght@400;600;700&display=swap');

:root {
  --green:      #1a6b3c;
  --green-dark: #0f4526;
  --green-light:#2d8a52;
  --amber:      #f0a500;
  --amber-light:#ffd166;
  --red:        #e03e3e;
  --bg:         #f4f6f2;
  --card:       #ffffff;
  --border:     #d8e0d4;
  --text:       #1c2b1e;
  --muted:      #6b7f6e;
  --sidebar-w:  240px;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(26,107,60,.10);
  --shadow-lg:  0 6px 30px rgba(26,107,60,.16);
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
}

/* ── Typography ─────────────────────────────────────── */
h1,h2,h3,h4 { font-family:'Barlow Condensed',sans-serif; font-weight:700; letter-spacing:.5px; }
h1 { font-size:2.2rem; }
h2 { font-size:1.7rem; }
h3 { font-size:1.3rem; }
a  { color:var(--green); text-decoration:none; }
a:hover { color:var(--green-light); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 20px; border-radius:var(--radius);
  font-family:'Nunito',sans-serif; font-weight:700; font-size:14px;
  cursor:pointer; border:none; transition:all .18s;
}
.btn-primary   { background:var(--green); color:#fff; }
.btn-primary:hover { background:var(--green-light); color:#fff; }
.btn-amber     { background:var(--amber); color:var(--text); }
.btn-amber:hover { background:var(--amber-light); }
.btn-danger    { background:var(--red); color:#fff; }
.btn-danger:hover { filter:brightness(1.1); }
.btn-outline   { background:transparent; border:2px solid var(--green); color:var(--green); }
.btn-outline:hover { background:var(--green); color:#fff; }
.btn-sm        { padding:5px 13px; font-size:13px; }
.btn-full      { width:100%; justify-content:center; }

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

/* ── Forms ───────────────────────────────────────────── */
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-weight:700; margin-bottom:5px; font-size:13px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; }
.form-control {
  width:100%; padding:10px 14px;
  border:1.5px solid var(--border); border-radius:var(--radius);
  font-family:'Nunito',sans-serif; font-size:15px; color:var(--text);
  background:#fff; transition:border-color .15s;
}
.form-control:focus { outline:none; border-color:var(--green); box-shadow:0 0 0 3px rgba(26,107,60,.12); }
select.form-control { cursor:pointer; }

/* ── Alerts ──────────────────────────────────────────── */
.alert { padding:12px 18px; border-radius:var(--radius); margin-bottom:16px; font-weight:600; font-size:14px; }
.alert-success { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.alert-danger  { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; }
.alert-info    { background:#d1ecf1; color:#0c5460; border:1px solid #bee5eb; }
.alert-warning { background:#fff3cd; color:#856404; border:1px solid #ffeeba; }

/* ── Sidebar layout ──────────────────────────────────── */
.layout { display:flex; min-height:100vh; }

.sidebar {
  width:var(--sidebar-w); background:var(--green-dark);
  display:flex; flex-direction:column;
  position:fixed; top:0; left:0; height:100vh;
  z-index:200; transition:transform .28s ease;
}
.sidebar-logo {
  padding:24px 20px 16px;
  border-bottom:1px solid rgba(255,255,255,.1);
  font-family:'Barlow Condensed',sans-serif;
  font-size:1.5rem; font-weight:900; color:#fff;
  letter-spacing:1px;
}
.sidebar-logo span { color:var(--amber); }
.sidebar-user {
  padding:14px 20px; border-bottom:1px solid rgba(255,255,255,.1);
  font-size:13px; color:rgba(255,255,255,.7);
}
.sidebar-user strong { display:block; color:#fff; font-size:14px; }
.sidebar-user .badge-role {
  display:inline-block; font-size:10px; padding:2px 8px;
  border-radius:20px; background:var(--amber); color:var(--text);
  font-weight:700; text-transform:uppercase; letter-spacing:.5px; margin-top:3px;
}
.sidebar-nav { flex:1; padding:12px 0; overflow-y:auto; }
.sidebar-nav a {
  display:flex; align-items:center; gap:10px;
  padding:11px 20px; color:rgba(255,255,255,.75);
  font-weight:600; font-size:14px; transition:all .15s;
  border-left:3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color:#fff; background:rgba(255,255,255,.08);
  border-left-color:var(--amber);
}
.sidebar-nav a svg { flex-shrink:0; }
.sidebar-section {
  padding:8px 20px 4px; font-size:10px; color:rgba(255,255,255,.35);
  text-transform:uppercase; letter-spacing:1px; font-weight:700;
}
.sidebar-footer {
  padding:16px 20px; border-top:1px solid rgba(255,255,255,.1);
}

.main-content {
  margin-left:var(--sidebar-w);
  flex:1; padding:28px 32px;
  max-width:100%;
}
.topbar {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:28px;
}
.topbar-title { font-family:'Barlow Condensed',sans-serif; font-size:1.9rem; font-weight:900; }
.hamburger {
  display:none; background:none; border:none; cursor:pointer;
  color:var(--green); padding:4px;
}

/* ── Stat cards ──────────────────────────────────────── */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:16px; margin-bottom:24px; }
.stat-card {
  background:var(--card); border-radius:var(--radius);
  padding:20px; border:1px solid var(--border);
  box-shadow:var(--shadow); position:relative; overflow:hidden;
}
.stat-card::before {
  content:''; position:absolute; top:0; left:0;
  width:4px; height:100%; background:var(--green);
}
.stat-card.amber::before { background:var(--amber); }
.stat-card.red::before   { background:var(--red); }
.stat-val { font-family:'Barlow Condensed',sans-serif; font-size:2.4rem; font-weight:900; color:var(--green); line-height:1; }
.stat-card.amber .stat-val { color:var(--amber); }
.stat-card.red   .stat-val { color:var(--red); }
.stat-lbl { font-size:12px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.5px; margin-top:4px; }

/* ── Table ───────────────────────────────────────────── */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
thead th {
  background:var(--green-dark); color:#fff;
  padding:11px 14px; font-family:'Barlow Condensed',sans-serif;
  font-size:14px; text-align:left; letter-spacing:.5px;
  font-weight:600;
}
tbody tr { border-bottom:1px solid var(--border); transition:background .12s; }
tbody tr:hover { background:#f0f5ee; }
tbody td { padding:11px 14px; font-size:14px; }
.badge {
  display:inline-block; padding:3px 10px; border-radius:20px;
  font-size:12px; font-weight:700;
}
.badge-active  { background:#d4edda; color:#155724; }
.badge-pending { background:#fff3cd; color:#856404; }
.badge-blocked { background:#f8d7da; color:#721c24; }
.badge-admin   { background:var(--amber-light); color:var(--text); }
.badge-instructor { background:#d1ecf1; color:#0c5460; }
.badge-open    { background:#fff3cd; color:#856404; }
.badge-done    { background:#d4edda; color:#155724; }

/* ── Calendar grid ───────────────────────────────────── */
.cal-wrap { overflow-x:auto; }
.cal-table { border-collapse:collapse; min-width:700px; width:100%; }
.cal-table th {
  background:var(--green-dark); color:#fff;
  padding:9px 6px; font-size:12px; text-align:center;
  font-family:'Barlow Condensed',sans-serif; letter-spacing:.5px;
}
.cal-table td {
  border:1px solid var(--border); width:36px; height:40px;
  text-align:center; vertical-align:middle; cursor:default;
  font-size:13px; font-weight:700; color:var(--muted);
}
.cal-table .day-full  { background:#2d8a52; color:#fff; cursor:pointer; }
.cal-table .day-half  { background:var(--amber); color:var(--text); cursor:pointer; }
.cal-table .day-today {
  outline: 3px solid #2563eb;
  outline-offset: -3px;
}
.cal-table .day-click { cursor:pointer; }
.cal-table .day-click:hover { background:#e8f4ed; }
.cal-user-name { font-size:13px; font-weight:700; white-space:nowrap; padding:8px 10px; }
.cal-month-nav { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.cal-month-nav span { font-family:'Barlow Condensed',sans-serif; font-size:1.4rem; font-weight:700; }

/* ── Attendance clock ─────────────────────────────────── */
.clock-box {
  text-align:center; padding:36px 24px;
  background:var(--card); border-radius:var(--radius);
  border:1px solid var(--border); box-shadow:var(--shadow-lg);
  max-width:400px; margin:0 auto;
}
.clock-time { font-family:'Barlow Condensed',sans-serif; font-size:3.5rem; font-weight:900; color:var(--green); }
.clock-date { font-size:13px; color:var(--muted); margin-bottom:24px; }
.clock-status { font-size:14px; font-weight:700; margin-bottom:20px; }
.clock-status.in  { color:var(--green); }
.clock-status.out { color:var(--red); }

/* ── Tasks ───────────────────────────────────────────── */
.task-card {
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius); padding:18px 20px;
  margin-bottom:12px; box-shadow:var(--shadow);
  display:flex; gap:16px; align-items:flex-start;
}
.task-card.done { opacity:.65; }
.task-img { width:72px; height:72px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.task-body { flex:1; }
.task-title { font-family:'Barlow Condensed',sans-serif; font-size:1.15rem; font-weight:700; margin-bottom:4px; }
.task-desc  { font-size:13px; color:var(--muted); margin-bottom:8px; }
.task-meta  { font-size:12px; color:var(--muted); }
.task-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }

/* ── Auth pages ──────────────────────────────────────── */
.auth-page {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #4aab70 100%);
  padding:20px;
}
.auth-box {
  background:#fff; border-radius:16px; padding:40px 36px;
  width:100%; max-width:420px; box-shadow:var(--shadow-lg);
}
.auth-logo { font-family:'Barlow Condensed',sans-serif; font-size:2rem; font-weight:900; color:var(--green); text-align:center; margin-bottom:4px; }
.auth-logo span { color:var(--amber); }
.auth-sub  { text-align:center; color:var(--muted); font-size:13px; margin-bottom:28px; }
.auth-tabs { display:flex; border-bottom:2px solid var(--border); margin-bottom:24px; }
.auth-tab  { flex:1; text-align:center; padding:10px; font-weight:700; font-size:14px; color:var(--muted); cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-2px; transition:all .15s; }
.auth-tab.active { color:var(--green); border-bottom-color:var(--green); }
.auth-switch { text-align:center; font-size:13px; margin-top:16px; }

/* ── Profile ─────────────────────────────────────────── */
.profile-box { max-width:480px; }
.profile-name { font-family:'Barlow Condensed',sans-serif; font-size:1.6rem; font-weight:900; }
.profile-email { color:var(--muted); font-size:14px; }

/* ── Overlay for mobile sidebar ──────────────────────── */
.overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:199; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform:translateX(-100%); }
  .sidebar.open { transform:translateX(0); }
  .overlay.open { display:block; }
  .hamburger { display:block; }
  .main-content { margin-left:0; padding:18px 14px; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .auth-box { padding:28px 20px; }
  .task-card { flex-direction:column; }
  .task-img { width:100%; height:180px; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns:1fr; }
}

/* ── Utility ──────────────────────────────────────────── */
.mt-1{margin-top:4px} .mt-2{margin-top:8px} .mt-3{margin-top:16px} .mt-4{margin-top:24px}
.mb-1{margin-bottom:4px} .mb-2{margin-bottom:8px} .mb-3{margin-bottom:16px} .mb-4{margin-bottom:24px}
.flex{display:flex} .items-center{align-items:center} .gap-2{gap:8px} .gap-3{gap:12px}
.flex-wrap{flex-wrap:wrap} .justify-between{justify-content:space-between}
.text-muted{color:var(--muted)} .text-sm{font-size:13px} .text-center{text-align:center}
.w-full{width:100%} .hidden{display:none !important}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media(max-width:600px){.grid-2{grid-template-columns:1fr}}


/* grafikas instruktoriai 
/* ── Instructor schedule: day number + shift label ─────────── */

.schedule-view-table td {
  height: 54px;
  padding: 0;
}

.schedule-cell {
  width: 100%;
  height: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.schedule-date {
  font-size: 16px;
  font-weight: 900;
}

.schedule-shift {
  font-size: 13px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: inherit;
  line-height: 1;
}

.schedule-view-table .day-half .schedule-shift {
  background: rgba(255, 255, 255, .35);
}

.schedule-view-table .day-full,
.schedule-view-table .day-half {
  cursor: default;
}

.schedule-view-table .day-full .schedule-date,
.schedule-view-table .day-full .schedule-shift {
  color: #fff;
}

.schedule-view-table .day-half .schedule-date,
.schedule-view-table .day-half .schedule-shift {
  color: var(--text);
}

/* ── Clickable dashboard stat cards ───────────────────── */

.stat-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}

.stat-link:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-link:hover .stat-lbl {
  color: var(--green-dark);
}

/* ── Clickable stat cards ───────────────────────────── */

.stat-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}

.stat-link:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-link:hover .stat-lbl {
  color: var(--green-dark);
}

/* ── Full task view ───────────────────────────────────── */

.task-card {
  cursor: pointer;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.task-view-card {
  max-width: 1100px;
}

.task-view-image-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbf6;
  padding: 12px;
  text-align: center;
}

.task-view-image {
  max-width: 100%;
  max-height: 520px;
  border-radius: var(--radius);
  object-fit: contain;
}

.task-view-desc {
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.task-info-list {
  display: grid;
  gap: 10px;
  font-size: 15px;
}

.task-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.task-info-list strong {
  color: var(--muted);
}

@media (max-width: 700px) {
  .task-info-list div {
    display: block;
  }

  .task-view-image {
    max-height: 360px;
  }
}

/* ── Image fullscreen modal ─────────────────────────── */

.clickable-image {
  cursor: zoom-in;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-modal.open {
  display: flex;
}

.image-modal-img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}

.image-modal-close {
  position: fixed;
  top: 18px;
  right: 28px;
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 700px) {
  .image-modal {
    padding: 10px;
  }

  .image-modal-img {
    max-width: 100vw;
    max-height: 88vh;
  }

  .image-modal-close {
    top: 12px;
    right: 18px;
    font-size: 36px;
  }
}

/* ── Clickable task cards ───────────────────────────── */

.task-card {
  cursor: pointer;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ── Full task view ───────────────────────────────────── */

.task-view-card {
  max-width: 1100px;
}

.task-view-image-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbf6;
  padding: 12px;
  text-align: center;
}

.task-view-image {
  max-width: 100%;
  max-height: 520px;
  border-radius: var(--radius);
  object-fit: contain;
}

.task-view-desc {
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.task-info-list {
  display: grid;
  gap: 10px;
  font-size: 15px;
}

.task-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.task-info-list strong {
  color: var(--muted);
}

/* ── Image fullscreen modal ─────────────────────────── */

.clickable-image {
  cursor: zoom-in;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-modal.open {
  display: flex;
}

.image-modal-img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}

.image-modal-close {
  position: fixed;
  top: 18px;
  right: 28px;
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 700px) {
  .task-info-list div {
    display: block;
  }

  .task-view-image {
    max-height: 360px;
  }

  .image-modal {
    padding: 10px;
  }

  .image-modal-img {
    max-width: 100vw;
    max-height: 88vh;
  }

  .image-modal-close {
    top: 12px;
    right: 18px;
    font-size: 36px;
  }
}

/* ── Mobile schedule calendar fix ───────────────────── */

@media (max-width: 700px) {
  .cal-wrap {
    overflow-x: visible;
    width: 100%;
  }

  .cal-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
  }

  .cal-table th {
    padding: 8px 2px;
    font-size: 11px;
  }

  .cal-table td {
    width: auto;
    height: 58px;
    padding: 0;
    font-size: 15px;
  }

  .schedule-view-table td {
    height: 58px;
  }

  .schedule-cell {
    min-height: 58px;
    gap: 3px;
  }

  .schedule-date {
    font-size: 17px;
  }

  .cal-month-nav {
    justify-content: center;
  }

  .cal-month-nav span {
    font-size: 1.25rem;
    font-weight: 900;
  }

  .cal-month-nav .btn {
    padding: 7px 12px;
  }
}

@media (max-width: 700px) {
  .cal-wrap + .text-muted,
  .card .text-muted.text-sm {
    line-height: 1.4;
  }

  .card {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .main-content {
    padding: 20px 14px;
  }

  .card {
    padding: 16px 14px;
  }

  .cal-table td {
    height: 52px;
    font-size: 14px;
  }

  .schedule-date {
    font-size: 16px;
  }
}



/* ── Profile stats mobile layout ───────────────────── */

@media (max-width: 700px) {
  .profile-box + hr + .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }

  .profile-box + hr + .stats-grid .stat-card {
    padding: 16px;
  }

  .profile-box + hr + .stats-grid .stat-val {
    font-size: 2rem;
  }

  .profile-box + hr + .stats-grid .stat-lbl {
    font-size: 11px;
  }
}
@media (max-width: 700px) {
  .profile-box + hr + .stats-grid .stat-card:nth-child(3) {
    grid-column: 1 / -1;
  }
}

/* ── Long text fix for tasks ───────────────────────── */

.task-card,
.task-body,
.task-title,
.task-desc,
.task-view-card,
.task-view-desc,
.task-info-list,
.card {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.task-title,
.task-view-card h2 {
  line-height: 1.15;
  white-space: normal;
}

.task-desc,
.task-view-desc {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.task-card {
  overflow: hidden;
}

.task-body {
  min-width: 0;
}

.task-img {
  flex-shrink: 0;
}

/* Kad užduoties pilname lange mygtukas nesuspaustų teksto */
.task-view-card > .flex.justify-between {
  align-items: flex-start;
}

.task-view-card h2 {
  min-width: 0;
  max-width: 100%;
}

/* ── Mobile task layout fix ───────────────────────── */

@media (max-width: 700px) {
  .task-card {
    display: block;
    padding: 18px;
  }

  .task-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    margin-bottom: 14px;
  }

  .task-body {
    width: 100%;
  }

  .task-title {
    font-size: 1.25rem;
    line-height: 1.15;
  }

  .task-desc {
    font-size: 14px;
    line-height: 1.45;
  }

  .task-meta {
    display: block;
  }

  .task-meta span {
    display: block;
    margin-bottom: 5px;
  }

  .task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .task-view-card {
    padding: 18px;
    overflow: hidden;
  }

  .task-view-card .flex.justify-between {
    display: block;
  }

  .task-view-card .btn {
    margin-top: 12px;
  }

  .task-view-desc {
    font-size: 15px;
    line-height: 1.55;
  }

  .task-info-list div {
    display: block;
  }

  .task-info-list span {
    display: block;
    margin-top: 3px;
  }
}

@media (max-width: 700px) {
  .grid-2 {
    grid-template-columns: 1fr !important;
  }
}