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

/* ── CSS kintamieji ─────────────────────────────────────────── */
:root {
  --background: hsl(210 20% 98%);
  --foreground: hsl(215 25% 15%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(215 25% 15%);
  --primary: hsl(215 60% 25%);
  --primary-foreground: hsl(0 0% 100%);
  --secondary: hsl(45 90% 55%);
  --secondary-foreground: hsl(215 60% 15%);
  --muted: hsl(210 15% 95%);
  --muted-foreground: hsl(215 15% 45%);
  --accent: hsl(140 45% 40%);
  --accent-foreground: hsl(0 0% 100%);
  --destructive: hsl(0 72% 51%);
  --destructive-foreground: hsl(0 0% 100%);
  --success: hsl(140 60% 40%);
  --success-foreground: hsl(0 0% 100%);
  --warning: hsl(45 90% 50%);
  --warning-foreground: hsl(215 60% 15%);
  --info: hsl(200 80% 50%);
  --info-foreground: hsl(0 0% 100%);
  --border: hsl(215 20% 88%);
  --input: hsl(215 20% 88%);
  --ring: hsl(215 60% 25%);
  --radius: 0.625rem;

  --sidebar-bg: hsl(215 60% 20%);
  --sidebar-fg: hsl(215 20% 95%);
  --sidebar-primary: hsl(45 90% 55%);
  --sidebar-primary-fg: hsl(215 60% 15%);
  --sidebar-accent: hsl(215 50% 30%);
  --sidebar-accent-fg: hsl(215 20% 95%);
  --sidebar-border: hsl(215 40% 30%);

  --shadow-sm: 0 1px 2px 0 hsl(215 25% 15% / .05);
  --shadow-md: 0 4px 6px -1px hsl(215 25% 15% / .1), 0 2px 4px -2px hsl(215 25% 15% / .1);
  --shadow-lg: 0 10px 15px -3px hsl(215 25% 15% / .1), 0 4px 6px -4px hsl(215 25% 15% / .1);
  --shadow-xl: 0 20px 25px -5px hsl(215 25% 15% / .1), 0 8px 10px -6px hsl(215 25% 15% / .1);
  --shadow-card: 0 1px 3px 0 hsl(215 25% 15% / .08), 0 1px 2px -1px hsl(215 25% 15% / .08);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Animacijos ─────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes pulse-subtle {
  0%, 100% { opacity: 1; }
  50%       { opacity: .7; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

.animate-fade-in      { animation: fadeIn .4s ease-out forwards; }
.animate-slide-in     { animation: slideIn .3s ease-out forwards; }
.animate-pulse-subtle { animation: pulse-subtle 2s ease-in-out infinite; }
.animate-spin         { animation: spin .7s linear infinite; }

/* ── App Layout ─────────────────────────────────────────────── */
.app-wrapper { display: flex; height: 100vh; overflow: hidden; }

/* ── ŠONINĖ JUOSTA ──────────────────────────────────────────── */
.sidebar {
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  position: relative;
  width: 18rem;
  transition: width .3s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: 5rem; }

/* Logo */
.sidebar-logo {
  padding: 1rem;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo-inner { display: flex; align-items: center; gap: .75rem; }
.sidebar-logo-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: .75rem;
  background: var(--sidebar-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--sidebar-primary-fg);
}
.sidebar-logo-icon svg { width: 1.5rem; height: 1.5rem; }
.sidebar-logo-text { overflow: hidden; }
.sidebar-logo-text h1 {
  font-weight: 700; color: var(--sidebar-fg);
  font-size: .9375rem; line-height: 1.3;
  white-space: normal; word-break: break-word;
}
.sidebar-logo-text p {
  color: hsl(215 20% 95% / .6);
  font-size: .8125rem; white-space: normal; word-break: break-word;
}

/* Collapse button */
.sidebar-collapse-btn {
  position: absolute; top: 5rem; right: -.75rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  z-index: 10; color: var(--foreground); transition: background .2s;
}
.sidebar-collapse-btn:hover { background: var(--muted); }
.sidebar-collapse-btn svg { width: .75rem; height: .75rem; transition: transform .3s; }
.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

/* Nav */
.sidebar-nav {
  flex: 1; padding: .75rem; overflow-y: auto;
  display: flex; flex-direction: column; gap: .25rem;
  scrollbar-width: thin; scrollbar-color: var(--sidebar-border) transparent;
}
.sidebar-section-label {
  padding: 1rem 1rem .5rem;
  font-size: .6875rem; font-weight: 600;
  color: hsl(215 20% 95% / .4);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-radius: .5rem;
  color: hsl(215 20% 95% / .8);
  width: 100%; transition: background .2s, color .2s;
  text-decoration: none; position: relative;
}
.nav-item:hover { background: var(--sidebar-accent); color: var(--sidebar-fg); }
.nav-item.active {
  background: var(--sidebar-primary);
  color: var(--sidebar-primary-fg);
  font-weight: 500;
}
.nav-item svg {
  width: 1.25rem; height: 1.25rem; flex-shrink: 0;
  color: hsl(215 20% 95% / .7); transition: color .2s;
}
.nav-item:hover svg, .nav-item.active svg { color: inherit; }
.nav-item-text { flex: 1; min-width: 0; overflow: hidden; }
.nav-title {
  display: block; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  font-weight: 500; font-size: .9375rem;
}
.nav-desc {
  display: block; font-size: .75rem;
  color: hsl(215 20% 95% / .5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: .0625rem;
}
.nav-item.active .nav-desc { color: hsl(215 60% 15% / .7); }
.nav-badge {
  background: var(--destructive); color: var(--destructive-foreground);
  font-size: .6875rem; font-weight: 500; padding: .125rem .5rem;
  border-radius: 9999px; flex-shrink: 0;
}

/* Collapsed state */
.collapsed .sidebar-logo-text,
.collapsed .nav-item-text,
.collapsed .nav-badge,
.collapsed .sidebar-section-label,
.collapsed .sidebar-logout-label,
.collapsed .sidebar-version { display: none !important; }

/* Sidebar bottom (logout + version) */
.sidebar-bottom {
  padding: .5rem .75rem .75rem;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.sidebar-logout-btn {
  display: flex; align-items: center; gap: .625rem;
  color: hsl(215 20% 95% / .55);
  padding: .5rem .625rem; border-radius: .5rem;
  transition: color .2s, background .2s;
  text-decoration: none; font-size: .8125rem; flex: 1;
}
.sidebar-logout-btn:hover { color: var(--sidebar-fg); background: var(--sidebar-accent); }
.sidebar-logout-btn svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.sidebar-logout-label { white-space: nowrap; }
.collapsed .sidebar-bottom { justify-content: center; }
.collapsed .sidebar-logout-btn { flex: 0; }

/* Mobile */
.mobile-header {
  display: none; position: fixed; top: 0; left: 0; right: 0;
  height: 3.5rem; background: var(--card);
  border-bottom: 1px solid var(--border);
  align-items: center; padding: 0 1rem; gap: 1rem; z-index: 40;
  box-shadow: var(--shadow-sm);
}
.mobile-hamburger {
  width: 2.5rem; height: 2.5rem; border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--foreground); transition: background .2s;
}
.mobile-hamburger:hover { background: var(--muted); }
.mobile-hamburger svg { width: 1.25rem; height: 1.25rem; }
.mobile-title { font-weight: 700; color: var(--foreground); }
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: hsl(215 25% 15% / .5);
  z-index: 30; backdrop-filter: blur(4px);
}
@media (max-width: 768px) {
  .mobile-header { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: -100%;
    z-index: 35; width: 18rem !important; transition: left .3s;
  }
  .sidebar.mobile-open { left: 0; }
  .sidebar-overlay.active { display: block; }
  .main-content { padding-top: 3.5rem; }
  .sidebar-collapse-btn { display: none; }
  .app-wrapper { flex-direction: column; }
}

/* ── MAIN CONTENT ───────────────────────────────────────────── */
.main-content { flex: 1; overflow: auto; min-width: 0; }
.main-inner {
  min-height: 100%; padding: 1.5rem;
  animation: fadeIn .4s ease-out;
}
@media (min-width: 1024px) { .main-inner { padding: 2rem; } }

/* ── PAGE HEADER ────────────────────────────────────────────── */
.page-header {
  display: flex; flex-direction: column;
  gap: 1rem; margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .page-header { flex-direction: row; align-items: center; justify-content: space-between; }
}
.page-title {
  font-size: 1.5rem; font-weight: 700;
  color: var(--foreground); line-height: 1.25;
}
.page-subtitle { color: var(--muted-foreground); font-size: .875rem; margin-top: .25rem; }
.page-meta {
  display: flex; align-items: center;
  gap: .5rem; font-size: .875rem; color: var(--muted-foreground); flex-shrink: 0;
}
.page-meta svg { width: 1rem; height: 1rem; }

/* ── STAT CARDS ─────────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.5rem;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--card); border-radius: .75rem; padding: 1.5rem;
  box-shadow: var(--shadow-card); border: 1px solid hsl(215 20% 88% / .5);
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-card-inner { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-card-left { flex: 1; }
.stat-card-title { font-size: .875rem; font-weight: 500; color: var(--muted-foreground); margin-bottom: .25rem; }
.stat-card-value {
  font-size: 1.875rem; font-weight: 700; color: var(--foreground);
  letter-spacing: -.025em; line-height: 1;
}
.stat-card-trend { display: flex; align-items: center; gap: .375rem; margin-top: .5rem; }
.trend-pos { font-size: .875rem; font-weight: 500; color: var(--success); }
.trend-neg { font-size: .875rem; font-weight: 500; color: var(--destructive); }
.trend-label { font-size: .75rem; color: var(--muted-foreground); }
.stat-icon {
  width: 3rem; height: 3rem; border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s; flex-shrink: 0;
}
.stat-card:hover .stat-icon { transform: scale(1.1); }
.stat-icon svg { width: 1.5rem; height: 1.5rem; }
.si-primary { background: hsl(215 60% 25% / .1); color: var(--primary); }
.si-success { background: hsl(140 60% 40% / .1); color: var(--success); }
.si-warning { background: hsl(45 90% 50% / .15); color: var(--warning-foreground); }
.si-info    { background: hsl(200 80% 50% / .1); color: var(--info); }
.si-default { background: var(--muted); color: var(--muted-foreground); }

/* ── CONTENT GRIDS ──────────────────────────────────────────── */
.content-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 1024px) { .content-grid { grid-template-columns: 2fr 1fr; } }
.col-span-2 { grid-column: 1 / -1; }

/* ── CARD ───────────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: .75rem;
  border: 1px solid hsl(215 20% 88% / .5); overflow: hidden;
}
.card-header { padding: 1.5rem; border-bottom: 1px solid hsl(215 20% 88% / .5); }
.card-header h3 { font-weight: 600; color: var(--foreground); }
.card-header p { font-size: .875rem; color: var(--muted-foreground); margin-top: .125rem; }
.card-body { padding: 1.5rem; }
.card-footer {
  padding: .75rem 1.5rem;
  background: hsl(210 15% 95% / .3);
  border-top: 1px solid hsl(215 20% 88% / .5);
}

/* ── QUICK ACTIONS ──────────────────────────────────────────── */
.quick-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.qa-btn {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 1rem; border-radius: .75rem;
  transition: transform .2s, box-shadow .2s; text-align: center;
}
.qa-btn:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.qa-btn:active { transform: scale(.98); }
.qa-btn svg { width: 1.5rem; height: 1.5rem; margin-bottom: .5rem; }
.qa-title { font-weight: 500; font-size: .875rem; display: block; }
.qa-desc  { font-size: .6875rem; opacity: .8; margin-top: .125rem; display: block; }
.qa-primary   { background: var(--primary); color: var(--primary-foreground); }
.qa-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.qa-accent    { background: var(--accent); color: var(--accent-foreground); }
.qa-muted     { background: var(--muted); color: var(--foreground); border: 1px solid var(--border); }

/* ── TABLE ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); }
thead th {
  padding: .75rem 1rem; text-align: left;
  font-size: .75rem; font-weight: 600;
  color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .05em;
}
tbody tr { border-bottom: 1px solid hsl(215 20% 88% / .5); transition: background .15s; }
tbody tr:hover { background: hsl(210 15% 95% / .3); }
tbody tr:last-child { border-bottom: none; }
td { padding: 1rem; color: var(--foreground); vertical-align: middle; }
.td-avatar { display: flex; align-items: center; gap: .75rem; }
.avatar {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: hsl(215 60% 25% / .1); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .875rem; flex-shrink: 0;
}
.avatar-name { font-weight: 500; display: block; }
.avatar-sub  { font-size: .8125rem; color: var(--muted-foreground); display: block; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .25rem .625rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 500; line-height: 1; white-space: nowrap;
}
.badge svg { width: .75rem; height: .75rem; }
.badge-draft     { background: var(--muted); color: var(--muted-foreground); }
.badge-submitted { background: hsl(200 80% 50% / .15); color: var(--info); }
.badge-reviewing { background: hsl(45 90% 50% / .15); color: var(--warning-foreground); }
.badge-approved  { background: hsl(140 60% 40% / .15); color: var(--success); }
.badge-rejected  { background: hsl(0 72% 51% / .15); color: var(--destructive); }
.badge-primary   { background: hsl(215 60% 25% / .1); color: var(--primary); }
.badge-green     { background: hsl(140 60% 40% / .15); color: var(--success); }
.badge-yellow    { background: hsl(45 90% 50% / .15); color: var(--warning-foreground); }
.badge-red       { background: hsl(0 72% 51% / .15); color: var(--destructive); }
.badge-blue      { background: hsl(200 80% 50% / .15); color: var(--info); }
.badge-gray      { background: var(--muted); color: var(--muted-foreground); }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .625rem 1.25rem;
  border-radius: var(--radius); font-size: .9375rem; font-weight: 500;
  cursor: pointer; transition: all .2s; border: 1px solid transparent;
  line-height: 1; white-space: nowrap; font-family: inherit;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn-sm  { padding: .375rem .75rem; font-size: .8125rem; }
.btn-lg  { padding: .875rem 1.75rem; font-size: 1rem; height: 3rem; }
.btn-xl  { padding: 1rem 2rem; font-size: 1.0625rem; height: 3.25rem; width: 100%; justify-content: center; }
.btn-icon { padding: .5rem; width: 2.25rem; height: 2.25rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), hsl(215 60% 35%));
  color: var(--primary-foreground); box-shadow: var(--shadow-md);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, hsl(215 60% 22%), hsl(215 60% 30%));
  box-shadow: var(--shadow-lg);
}
.btn-secondary { background: var(--muted); color: var(--foreground); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: hsl(210 15% 92%); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover:not(:disabled) { background: var(--muted); }
.btn-danger { background: hsl(0 72% 51% / .1); color: var(--destructive); border-color: hsl(0 72% 51% / .2); }
.btn-danger:hover:not(:disabled) { background: var(--destructive); color: white; border-color: var(--destructive); }
.btn-success {
  background: linear-gradient(135deg, hsl(140 45% 35%), hsl(140 45% 50%));
  color: white;
}

/* ── FORMS ──────────────────────────────────────────────────── */
.form-grid-1 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .form-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-full { grid-column: 1 / -1; }
label { font-size: .875rem; font-weight: 500; color: var(--foreground); display: block; }
.label-req::after { content: ' *'; color: var(--destructive); }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: .75rem 1rem;
  background: var(--background); border: 2px solid hsl(215 20% 88% / .6);
  border-radius: var(--radius); font-size: .9375rem; color: var(--foreground);
  transition: border-color .2s, box-shadow .2s; outline: none; line-height: 1.5;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(215 60% 25% / .15);
}
input::placeholder, textarea::placeholder { color: var(--muted-foreground); opacity: .8; }
textarea { resize: vertical; min-height: 5rem; }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem;
}
.input-wrap { position: relative; }
.input-icon-left {
  position: absolute; left: .875rem; top: 50%; transform: translateY(-50%);
  color: var(--muted-foreground); pointer-events: none;
}
.input-icon-left svg { width: 1.25rem; height: 1.25rem; }
.input-with-icon { padding-left: 2.75rem !important; }
.form-hint { font-size: .8125rem; color: var(--muted-foreground); }
.form-error { font-size: .8125rem; color: var(--destructive); display: flex; align-items: center; gap: .25rem; }
.form-section { border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: .5rem; }
.form-section-title {
  font-size: .8125rem; font-weight: 600; color: var(--muted-foreground);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.form-section-title svg { width: 1rem; height: 1rem; }
.checkbox-wrap { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.checkbox-wrap input[type=checkbox] {
  width: 1rem; height: 1rem; padding: 0; border: 2px solid var(--border);
  border-radius: .25rem; cursor: pointer; accent-color: var(--primary); flex-shrink: 0;
}
.checkbox-label { font-size: .875rem; color: var(--muted-foreground); cursor: pointer; }

/* OTP inputs */
.otp-row { display: flex; justify-content: center; gap: .5rem; }
.otp-input {
  width: 3rem; height: 3.5rem; text-align: center;
  font-size: 1.5rem; font-weight: 700; padding: 0;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--background); color: var(--foreground);
  transition: border-color .2s, box-shadow .2s;
}
.otp-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px hsl(215 60% 25% / .15); }
.otp-input.filled { border-color: hsl(215 60% 25% / .5); }

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: hsl(215 25% 15% / .5);
  backdrop-filter: blur(4px); z-index: 50;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card); border-radius: 1rem; box-shadow: var(--shadow-xl);
  width: 100%; max-width: 36rem; max-height: 90vh;
  display: flex; flex-direction: column; animation: scaleIn .2s ease;
}
.modal-lg { max-width: 48rem; }
.modal-xl { max-width: 60rem; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-title { font-size: 1.125rem; font-weight: 600; color: var(--foreground); }
.modal-close {
  width: 2rem; height: 2rem; border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--muted); color: var(--foreground); }
.modal-close svg { width: 1.25rem; height: 1.25rem; }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: .75rem; flex-shrink: 0;
}

/* ── ALERTS ─────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .875rem 1.25rem; border-radius: var(--radius);
  font-size: .875rem; border: 1px solid transparent;
}
.alert svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; margin-top: .0625rem; }
.alert-error   { background: hsl(0 72% 51% / .08); border-color: hsl(0 72% 51% / .2); color: var(--destructive); }
.alert-success { background: hsl(140 60% 40% / .08); border-color: hsl(140 60% 40% / .2); color: var(--success); }
.alert-warning { background: hsl(45 90% 50% / .08); border-color: hsl(45 90% 50% / .2); color: var(--warning-foreground); }
.alert-info    { background: hsl(200 80% 50% / .08); border-color: hsl(200 80% 50% / .2); color: var(--info); }

/* ── TOAST ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: .5rem; max-width: 24rem;
}
.toast {
  padding: .75rem 1rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,.15);
  opacity: 1; transition: opacity .3s;
}
.toast.ts-success { background: #16a34a; color: #fff; }
.toast.ts-error   { background: #dc2626; color: #fff; }
.toast.ts-warning { background: #d97706; color: #fff; }

/* ── LOGIN PAGE ─────────────────────────────────────────────────── */
.login-body { margin: 0; padding: 0; }
.login-page { min-height: 100vh; display: flex; }

/* LEFT — форма входа */
.login-left {
  flex: 1; display: flex; align-items: center;
  justify-content: center; padding: 2rem;
  background: var(--background);
}
.login-left-inner { width: 100%; max-width: 26rem; }

.login-logo-wrap { text-align: center; margin-bottom: 2rem; }
.login-logo-icon {
  width: 4.5rem; height: 4.5rem; border-radius: 1rem;
  background: hsl(45 90% 55%);
  color: hsl(215 60% 15%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.login-logo-icon svg { width: 2.25rem; height: 2.25rem; }
.login-logo-wrap h1 { font-size: 1.5rem; font-weight: 700; color: var(--foreground); }
.login-logo-wrap p  { color: var(--muted-foreground); margin-top: .25rem; }

.login-form { display: flex; flex-direction: column; gap: 1.5rem; }
.login-footer-txt { text-align: center; font-size: .75rem; color: var(--muted-foreground); margin-top: 2rem; line-height: 1.8; }
.login-footer-txt a { color: var(--primary); }
.login-footer-txt a:hover { text-decoration: underline; }

/* OTP */
.otp-info-box { text-align: center; padding: 1.25rem; background: var(--muted); border-radius: var(--radius); }
.otp-info-icon {
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--primary); color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .75rem;
}
.otp-info-icon svg { width: 1.5rem; height: 1.5rem; }
.otp-info-box h3 { font-size: 1.0625rem; font-weight: 600; color: var(--foreground); }
.otp-info-box p  { font-size: .875rem; color: var(--muted-foreground); margin-top: .25rem; }
.otp-email { font-size: .875rem; font-weight: 600; color: var(--foreground); margin-top: .125rem; }
.otp-row { display: flex; justify-content: center; gap: .5rem; }
.otp-input {
  width: 3rem; height: 3.5rem; text-align: center;
  font-size: 1.5rem; font-weight: 700;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--background); color: var(--foreground);
  transition: border-color .15s, box-shadow .15s;
}
.otp-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px hsl(215 60% 25% / .15); outline: none; }
.otp-input.filled { border-color: hsl(215 60% 25% / .5); }

/* RIGHT — часы и приветствие */
.login-right { display: none; width: 50%; position: relative; overflow: hidden; }
@media (min-width: 1024px) { .login-right { display: flex; } }

.login-right-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 25%, hsl(215 60% 35% / .7) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, hsl(220 50% 18% / .6) 0%, transparent 50%),
    linear-gradient(160deg, hsl(215 55% 22%) 0%, hsl(220 45% 12%) 100%);
}
.deco-circle-1 {
  position: absolute; border-radius: 50%;
  width: 28rem; height: 28rem; top: -6rem; right: -6rem;
  background: hsl(215 60% 50% / .07);
  border: 1px solid hsl(215 60% 70% / .06);
}
.deco-circle-2 {
  position: absolute; border-radius: 50%;
  width: 18rem; height: 18rem; bottom: -4rem; left: -4rem;
  background: hsl(220 50% 40% / .06);
}
.deco-dot-1 {
  position: absolute; border-radius: 50%;
  width: 5rem; height: 5rem; bottom: 5rem; right: 4rem;
  background: hsl(215 60% 55% / .08);
}
.deco-dot-2 {
  position: absolute; border-radius: 50%;
  width: 2.5rem; height: 2.5rem; bottom: 10rem; right: 9rem;
  background: hsl(215 60% 65% / .07);
}

.login-right-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 3rem;
}

/* Часы и приветствие */
.login-greeting-wrap { text-align: center; color: white; user-select: none; }

.login-greeting-time {
  font-size: 5.5rem; font-weight: 200; line-height: 1;
  letter-spacing: -.04em;
  color: hsl(0 0% 100% / .9);
  font-variant-numeric: tabular-nums;
}
.login-greeting-time .colon {
  opacity: .4;
  animation: colon-blink 1s step-end infinite;
  display: inline-block; margin: 0 .03em;
}
.login-greeting-time .sec {
  font-size: .42em; vertical-align: .25em;
  opacity: .45; font-weight: 300;
}
@keyframes colon-blink { 0%,100% { opacity: .4; } 50% { opacity: .1; } }

.login-greeting-date {
  margin-top: .875rem;
  font-size: .9375rem; font-weight: 400;
  color: hsl(0 0% 100% / .4);
  letter-spacing: .01em;
}

.login-greeting-divider {
  width: 2.5rem; height: 1px;
  background: hsl(0 0% 100% / .15);
  margin: 2rem auto;
}

.login-greeting-org {
  font-size: 1.125rem; font-weight: 600;
  color: hsl(0 0% 100% / .7);
  letter-spacing: -.01em;
}
.login-greeting-tagline {
  margin-top: .375rem;
  font-size: .75rem; font-weight: 400;
  color: hsl(0 0% 100% / .28);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ── Naujausi prašymai (dashboard) ─────────────────────────────── */
.req-item {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.req-item:last-child { border-bottom: none; }

.req-icon {
  flex-shrink: 0;
  width: 2.25rem; height: 2.25rem;
  border-radius: 8px;
  background: var(--primary-light, hsl(215 60% 55% / .1));
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}

.req-content { flex: 1; min-width: 0; }

.req-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .25rem;
}

.req-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--foreground);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.req-type {
  font-size: .75rem;
  color: var(--muted-foreground);
  display: block;
}

.req-date {
  font-size: .75rem;
  color: var(--muted-foreground);
  margin: 0;
}
