:root {
  --bg-main: #050509;
  --bg-elevated: rgba(15, 15, 25, 0.96);
  --bg-glass: rgba(18, 18, 30, 0.92);
  --accent-gold: #f5c25b;
  --accent-gold-soft: rgba(245, 194, 91, 0.18);
  --accent-red: #ff4b4b;
  --accent-green: #51e3a6;
  --accent-yellow: #ffd75e;
  --text-main: #f7f7ff;
  --text-muted: #9ea4c2;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.8);
  --transition-fast: 0.2s ease-out;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #151520 0, #020208 50%, #000000 100%);
  color: var(--text-main);
  font-family: var(--font-main);
}

body {
  min-height: 100vh;
}

/* SPLASH */

.splash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #151520 0, #010106 50%, #000000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-inner {
  padding: 28px 24px 22px;
  border-radius: 24px;
  border: 1px solid rgba(245, 194, 91, 0.4);
  background: radial-gradient(circle at top, rgba(245, 194, 91, 0.1), rgba(8, 8, 16, 0.96));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.95);
  max-width: 420px;
  width: calc(100% - 28px);
}

.splash-logo {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-gold);
  box-shadow: 0 0 22px rgba(245, 194, 91, 0.7);
  margin-bottom: 10px;
}

.splash-brand {
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.splash-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 3px;
}

.splash-divider {
  margin: 12px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 194, 91, 0.7), transparent);
}

.splash-log {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.splash-line {
  margin-bottom: 3px;
}

.splash-line .ok {
  color: var(--accent-green);
}

.splash-footer {
  margin-top: 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-gold);
}

/* APP SHELL */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(90deg, rgba(10, 10, 18, 0.96), rgba(10, 8, 4, 0.96));
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-gold);
  box-shadow: 0 0 18px rgba(245, 194, 91, 0.45);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-role {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-gold-soft);
  background: radial-gradient(circle at top, rgba(245, 194, 91, 0.22), transparent 65%);
  color: var(--accent-gold);
}

.header-btn {
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* WEATHER WIDGET */

.weather-widget {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 194, 91, 0.6);
  background: radial-gradient(circle at top, rgba(245, 194, 91, 0.15), rgba(10, 10, 18, 0.96));
  font-size: 11px;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.weather-main .dot,
.weather-sub .dot {
  opacity: 0.6;
}

.weather-sub {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* MAIN */

.app-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
}

/* LOGIN CARD */

.glass {
  background: var(--bg-glass);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  padding: 22px 18px;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-title {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-subtitle {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.field-label {
  font-size: 11px;
  margin-bottom: 4px;
  color: var(--text-muted);
  display: block;
}

.field-input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.03), rgba(5, 5, 12, 0.96));
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: var(--transition-fast);
}

.field-input::placeholder {
  color: #5a627f;
}

.field-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1px rgba(245, 194, 91, 0.4);
}

/* BUTTONS */

.primary-btn {
  border: none;
  background: linear-gradient(135deg, #f5c25b, #f8e7a5);
  color: #201804;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(245, 194, 91, 0.4);
  margin-top: 16px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(245, 194, 91, 0.55);
  filter: brightness(1.04);
}

.wide {
  width: 100%;
}

/* APP LAYOUT */

.app-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hidden {
  display: none !important;
}

/* BOTTOM NAV (MOBILE) */

.bottom-nav {
  display: flex;
  justify-content: space-around;
  flex-wrap: nowrap;
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 6, 10, 0.96);
  backdrop-filter: blur(18px);
  padding: 6px 4px;
  position: sticky;
  bottom: 0;
  z-index: 15;
  overflow-x: auto;
}

.nav-btn {
  flex: 1;
  margin: 0 2px;
  background: transparent;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  padding: 6px 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-btn.active {
  border-color: var(--accent-gold);
  background: radial-gradient(circle at top, var(--accent-gold-soft), transparent 70%);
  color: var(--accent-gold);
}

/* VIEWS */

.views-container {
  flex: 1;
  padding: 14px 14px 70px;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.view-title {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.view-subtitle {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* CARDS */

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 10px 10px 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
}

.card.wide {
  grid-column: 1 / -1;
}

.card-title {
  margin: 0 0 4px;
  font-size: 13px;
}

.card-value {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-gold);
}

.card-desc {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
}

/* FORMS */

.form-grid {
  margin-top: 6px;
}

.form-row {
  margin-bottom: 10px;
}

.two-cols {
  display: flex;
  gap: 8px;
}

textarea.field-input {
  resize: vertical;
}

/* LISTS */

.list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(8, 8, 14, 0.95);
  margin-bottom: 6px;
}

.item-title {
  font-size: 13px;
}

.item-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid;
}

.badge.green {
  color: var(--accent-green);
  border-color: rgba(81, 227, 166, 0.8);
}

.badge.yellow {
  color: var(--accent-yellow);
  border-color: rgba(255, 215, 94, 0.8);
}

.badge.red {
  color: var(--accent-red);
  border-color: rgba(255, 75, 75, 0.8);
}

/* FOOTER */

.app-footer {
  font-size: 10px;
  text-align: center;
  color: var(--text-muted);
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 5, 10, 0.96);
}

/* TABLE */

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 11px;
}

.table th,
.table td {
  border: 1px solid var(--border-subtle);
  padding: 6px 8px;
  text-align: left;
}

.table th {
  background: rgba(20, 20, 30, 0.9);
  font-weight: 500;
}

/* SMALL BUTTONS */

.row-actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sm.edit {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}

.btn-sm.delete {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-sm:hover {
  filter: brightness(1.05);
}

/* RESPONSIVE */

@media (min-width: 768px) {
  .app-main {
    padding: 26px;
  }

  .views-container {
    width: 100%;
    max-width: 960px;
    margin-inline: auto;
    padding-bottom: 80px;
  }

  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .card.wide {
    grid-column: 1 / -1;
  }

  .weather-widget {
    min-width: 190px;
  }
}


.login-hint{margin-top:10px;padding:10px 12px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(0,0,0,.25);color:#a4a6b5;font-size:12px;line-height:1.5}

.period-output{margin-top:14px;border:1px solid rgba(255,255,255,.12);border-radius:18px;background:rgba(0,0,0,.25);padding:14px;overflow:auto}

.secondary-btn{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);color:#ececf2;padding:12px 14px;border-radius:14px;cursor:pointer}
.secondary-btn:hover{border-color:rgba(215,179,90,.35)}
