/* ================================================= */
/* ROOT / THEME */
/* ================================================= */

:root {
  --color-primary: #b30000;
  --color-primary-dark: #7f1d1d;
  --color-primary-mid: #dc2626;
  --color-primary-deep: #991b1b;

  --color-success-dark: #14532d;
  --color-success-mid: #16a34a;
  --color-success-deep: #166534;

  --color-bg: #f8f8f8;
  --color-bg-soft: #ffffff;
  --color-text: #222;
  --color-muted: #777;
  --color-border: #ddd;
  --color-border-soft: #f0f0f0;

  --color-dashboard-top: #b2d4e7;
  --color-dashboard-mid: #dff1fb;
  --color-dashboard-bottom: #ffffff;

  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-strong: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(255, 255, 255, 0.4);

  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-panel: 0 6px 20px rgba(0, 0, 0, 0.1);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 22px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;

  --transition-fast: 0.18s ease;
  --transition-mid: 0.22s ease;
  --transition-slow: 0.3s ease;
}

/* ================================================= */
/* GLOBAL */
/* ================================================= */

html {
  min-height: 100vh;
}

body {
  font-family: "Ubuntu";
  padding: 20px;
  padding-bottom: 60px;
  background: var(--color-bg);
  margin: 0;
  color: var(--color-text);
}

.no-scroll {
  overflow: hidden;
  height: 100svh;
}

.hidden {
  display: none !important;
}

.wrapper {
  max-width: 1600px;
  margin: 0 auto;
}

h1 {
  font-family: "Ubuntu Mono";
}

h2 {
  margin-top: 0;
  color: var(--color-primary);
}

/* ================================================= */
/* SHARED PANEL / CARD SYSTEM */
/* ================================================= */

.block,
.view-block,
.form-block {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 26px;

  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);

  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow),
    background var(--transition-slow);
}

.form-block {
  min-width: 90%;
  background: var(--color-bg-soft);
}

/* ================================================= */
/* DASHBOARD / INDEX */
/* ================================================= */

.dashboard,
.index-container {
  max-width: 700px;
  margin: 60px auto 0 auto;
  background: linear-gradient(
    to bottom,
    var(--color-dashboard-top) 0%,
    var(--color-dashboard-mid) 50%,
    var(--color-dashboard-bottom) 85%
  );
  padding: 35px;
  border-radius: 16px;
  box-shadow: var(--shadow-panel);
  text-align: center;
}

.dashboard {
  font-weight: 300;
  font-size: 20px;
}

.index-title {
  text-align: center;
  font-size: 30px;
  margin-bottom: 35px;
  color: var(--color-primary);
  font-weight: bold;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
  align-items: stretch;
}

.logo {
  margin-top: 20px;
  height: 250px;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
}

/* ================================================= */
/* APP BUTTONS – MODERN PREMIUM */
/* ================================================= */

.app-card {
  --card-bg-1: var(--color-primary-dark);
  --card-bg-2: var(--color-primary-mid);
  --card-bg-3: var(--color-primary-deep);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-glow: rgba(220, 38, 38, 0.22);

  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;

  padding: 28px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);

  color: #ffffff;
  text-decoration: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 14px;
  font-weight: 700;

  background: linear-gradient(
    160deg,
    var(--card-bg-1) 0%,
    var(--card-bg-2) 52%,
    var(--card-bg-3) 100%
  );

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.22),
    0 2px 10px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    transform var(--transition-mid),
    box-shadow var(--transition-mid),
    border-color var(--transition-mid),
    background var(--transition-mid);
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.06) 18%,
    rgba(255, 255, 255, 0) 45%
  );
  pointer-events: none;
}

.app-card::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  top: -45px;
  right: -35px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  pointer-events: none;
  opacity: 0.9;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
}

.app-card:active {
  transform: translateY(-1px) scale(0.995);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.22),
    inset 0 2px 10px rgba(0, 0, 0, 0.18);
}

.app-card:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.1),
    0 0 0 8px rgba(220, 38, 38, 0.22),
    0 18px 38px rgba(0, 0, 0, 0.26);
}

.app-card {
  --card-bg-1: #7f1d1d;
  --card-bg-2: #dc2626;
  --card-bg-3: #991b1b;
  --card-glow: rgba(220, 38, 38, 0.25);
}

.app-card-gray {
  --card-bg-1: #1f2937;
  --card-bg-2: #374151;
  --card-bg-3: #111827;
  --card-glow: rgba(107, 114, 128, 0.2);
}

.app-card-green {
  --card-bg-1: #14532d;
  --card-bg-2: #16a34a;
  --card-bg-3: #166534;
  --card-glow: rgba(34, 197, 94, 0.22);
}

.app-icon {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition:
    transform var(--transition-mid),
    opacity var(--transition-mid);
  z-index: 1;
}

.app-card:hover .app-icon {
  transform: translateY(-2px) scale(1.06);
  opacity: 1;
}

.app-card span {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
  z-index: 1;
  max-width: 180px;
}

.app-card small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: none;
  color: rgba(255, 255, 255, 0.78);
  z-index: 1;
}

/* ================================================= */
/* INDEX BUTTONS */
/* ================================================= */

.index-btn {
  margin-top: 30px;
  width: 100%;
  padding: 15px;
  font-size: 16px;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  background: linear-gradient(
    145deg,
    #7a1111 0%,
    var(--color-primary) 45%,
    #8f0000 100%
  );
  box-shadow:
    0 3px 0 #7a0000,
    0 12px 20px rgba(0, 0, 0, 0.18);
}

.index-btn:hover {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.25),
    0 2px 0 #7a0000,
    0 6px 12px rgba(0, 0, 0, 0.15);
}

.index-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #7a0000,
    0 6px 12px rgba(0, 0, 0, 0.18);
}

/* ================================================= */
/* TABLES */
/* ================================================= */

.view-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 20px 0;
}

.view-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--color-border);
}
.table-wrapper {
  width: 100%;
  overflow: auto;
  max-height: calc(100vh - 180px);
  -webkit-overflow-scrolling: touch;
  max-height: 1000px;
}

.table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  white-space: nowrap;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border-soft);
  text-align: left;
}

.table td {
  cursor: pointer;
}

.table th {
  background: #f9fafc;
  position: sticky;
  top: 0;
  z-index: 5;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #555;
}

.table tr {
  transition: background var(--transition-fast);
}

.table tr:hover {
  background: #eefaf2;
}

/* ================================================= */
/* FILTER BAR */
/* ================================================= */

.filter-bar {
  margin: 20px 0;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar select {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 14px;
}

/* ================================================= */
/* FORMS */
/* ================================================= */

label {
  display: flex;
  margin: 8px 0 4px;
  font-size: 14px;
  text-align: left !important;
  align-items: center;
  gap: 5px;
}

.form-block label {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  transition: var(--transition-mid);
}

.form-block input {
  padding: 9px;
  margin-bottom: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
}

input:focus,
select:focus,
textarea:focus,
.form-block input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(179, 0, 0, 0.12);
}

#prisotni {
  font-size: 20px;
}

#prisotni option {
  padding: 6px 10px;
  background: #fff;
  color: #222;
}

#prisotni option:checked {
  background: #b30000;
  color: #fff;
}

#prisotni option:hover {
  background: #f3d6d6;
}

textarea {
  resize: vertical;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #eee !important;
  color: #777 !important;
  border-color: #ccc !important;
}

/* ================================================= */
/* CUSTOM CHECKBOX / TOGGLE */
/* ================================================= */

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 56px;
  height: 24px;
  background: #e5e5e5;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
  vertical-align: middle;
  margin-bottom: 0;
}

input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 1px;
  left: 2px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

input[type="checkbox"]:checked::before {
  left: 32px;
}

/* ================================================= */
/* ACTION BUTTONS – MODERN / UNIFIED STYLE */
/* ================================================= */

.btn-submit,
.btn-draft,
.btn-export,
.btn-small,
.top-btn,
.btn-save {
  --btn-bg-1: #7f1d1d;
  --btn-bg-2: #dc2626;
  --btn-bg-3: #991b1b;
  --btn-glow: rgba(220, 38, 38, 0.2);

  position: relative;
  overflow: hidden;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;

  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.2px;

  background: linear-gradient(
    160deg,
    var(--btn-bg-1) 0%,
    var(--btn-bg-2) 52%,
    var(--btn-bg-3) 100%
  );
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    filter var(--transition-fast);
}

.btn-submit::before,
.btn-draft::before,
.btn-export::before,
.btn-small::before,
.top-btn::before,
.btn-save::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 22%,
    rgba(255, 255, 255, 0) 55%
  );
  pointer-events: none;
}

.btn-submit:hover,
.btn-draft:hover,
.btn-export:hover,
.btn-small:hover,
.top-btn:hover,
.btn-save:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.22),
    0 4px 14px var(--btn-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-submit:active,
.btn-draft:active,
.btn-export:active,
.btn-small:active,
.top-btn:active,
.btn-save:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.18),
    inset 0 2px 8px rgba(0, 0, 0, 0.18);
}

.btn-submit:focus-visible,
.btn-draft:focus-visible,
.btn-export:focus-visible,
.btn-small:focus-visible,
.top-btn:focus-visible,
.btn-save:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.08),
    0 0 0 6px var(--btn-glow),
    0 14px 28px rgba(0, 0, 0, 0.22);
}

/* ================================================= */
/* MAIN BUTTON VARIANTS */
/* ================================================= */

.btn-submit {
  width: 100%;
  margin-top: 30px;
  --btn-bg-1: #7f1d1d;
  --btn-bg-2: #dc2626;
  --btn-bg-3: #991b1b;
  --btn-glow: rgba(220, 38, 38, 0.18);
}

.btn-draft {
  width: 100%;
  margin-top: 30px;
  --btn-bg-1: #14532d;
  --btn-bg-2: #16a34a;
  --btn-bg-3: #166534;
  --btn-glow: rgba(34, 197, 94, 0.18);
}

.btn-export {
  margin-top: 30px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 180px;
  --btn-bg-1: #14532d;
  --btn-bg-2: #16a34a;
  --btn-bg-3: #166534;
  --btn-glow: rgba(34, 197, 94, 0.18);
}

.btn-small {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  --btn-bg-1: #7f1d1d;
  --btn-bg-2: #dc2626;
  --btn-bg-3: #991b1b;
  --btn-glow: rgba(220, 38, 38, 0.16);
}

.top-btn {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  --btn-bg-1: #7f1d1d;
  --btn-bg-2: #dc2626;
  --btn-bg-3: #991b1b;
  --btn-glow: rgba(220, 38, 38, 0.16);
}

.btn-save {
  margin-top: 30px;
  width: 100%;
  --btn-bg-1: #7f1d1d;
  --btn-bg-2: #dc2626;
  --btn-bg-3: #991b1b;
  --btn-glow: rgba(220, 38, 38, 0.2);
}

.btn-profile {
  --btn-bg-1: #1d4ed8;
  --btn-bg-2: #2563eb;
  --btn-bg-3: #1e40af;
  --btn-glow: rgba(37, 99, 235, 0.22);
}

/* ================================================= */
/* TOP BUTTONS LAYOUT */
/* ================================================= */

.top-buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

/* ================================================= */
/* ICONS */
/* ================================================= */

.back-icon {
  width: 18px;
  height: 18px;
  margin-right: 2px;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.wave-icon {
  width: 20px;
  height: 20px;
  margin-right: 2px;
  flex-shrink: 0;
}

/* ================================================= */
/* FOOTER */
/* ================================================= */

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 10px;
  color: var(--color-muted);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

footer a {
  text-decoration: none;
}

/* ================================================= */
/* PROFILE WRAPPER */
/* ================================================= */

.profile-wrapper {
  max-width: 600px;
  margin: 80px auto;
  text-align: center;
}

/* ================================================= */
/* BACK LINK */
/* ================================================= */

.btn-back {
  display: inline-block;
  margin-bottom: 25px;
  text-decoration: none;
  background: linear-gradient(
    145deg,
    #7a1111 0%,
    var(--color-primary) 45%,
    #8f0000 100%
  );
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-back:hover {
  text-decoration: underline;
}

/* ================================================= */
/* SUCCESS MESSAGE */
/* ================================================= */

.success-msg {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;

  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;

  color: #14532d;

  background: linear-gradient(
    180deg,
    rgba(220, 252, 231, 0.95) 0%,
    rgba(187, 247, 208, 0.95) 100%
  );

  border: 1px solid rgba(22, 163, 74, 0.25);

  box-shadow:
    0 6px 18px rgba(22, 163, 74, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.success-msg::before {
  content: "✔";
  margin-right: 8px;
  font-weight: 700;
}

/* ================================================= */
/* CLAN / CELL LAYOUT */
/* ================================================= */

.clan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
}

.clan-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  flex-shrink: 0;
}

.clan-label {
  font-size: 10px;
  margin-bottom: 4px;
  text-align: center;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clan-name {
  flex-grow: 1;
  font-weight: bold;
  padding-left: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.km-input {
  height: 38px;
  text-align: center;
  padding: 4px 4px;
  margin-bottom: 0;
  box-sizing: border-box;
}

/* ================================================= */
/* CALENDAR LIST */
/* ================================================= */

.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 30px;
  text-align: left;
}

.calendar-list-item {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;

  padding: 18px 20px;
  border-radius: var(--radius-lg);
  text-align: left;
  color: var(--color-text);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(248, 249, 250, 0.98) 100%
  );

  border: 1px solid rgba(0, 0, 0, 0.06);

  transition:
    transform var(--transition-mid),
    box-shadow var(--transition-mid),
    border-color var(--transition-mid);
}

.calendar-list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.08);
}

.calendar-list-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.12) 20%,
    rgba(255, 255, 255, 0) 50%
  );
}

.calendar-list-item::after {
  display: none;
}

.calendar-list-header {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.calendar-list-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
  margin: 0;
}

.calendar-list-date {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(160deg, #1d587f 0%, #2693dc 52%, #1b7199 100%);
  padding: 7px 10px;
  border-radius: 10px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 6px 14px rgba(0, 0, 0, 0.14);
}

.calendar-list-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.calendar-list-location,
.calendar-list-description {
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text);
}

.calendar-list-location {
  font-weight: 600;
}

.calendar-list-actions {
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.calendar-list-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(160deg, #7f1d1d 0%, #dc2626 52%, #991b1b 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 8px 18px rgba(0, 0, 0, 0.16);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.calendar-list-link:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 12px 22px rgba(0, 0, 0, 0.2);
}

.calendar-empty {
  margin-top: 30px;
  padding: 18px 20px;
  border-radius: 16px;
  text-align: center;
  font-weight: 600;
  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 22px rgba(0, 0, 0, 0.06);
}

@media (max-width: 900px) {
  .calendar-list-item {
    padding: 16px 16px;
    border-radius: 16px;
  }

  .calendar-list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .calendar-list-title {
    font-size: 16px;
  }

  .calendar-list-date {
    font-size: 12px;
    padding: 6px 9px;
  }

  .calendar-list-location,
  .calendar-list-description {
    font-size: 13px;
  }

  .calendar-list-link {
    width: 100%;
    justify-content: center;
  }
}

/* ================================================= */
/* MOBILE */
/* ================================================= */

@media (max-width: 900px) {
  html {
    background: linear-gradient(
      to bottom,
      var(--color-dashboard-top) 0%,
      var(--color-dashboard-mid) 50%,
      var(--color-dashboard-bottom) 85%
    );
  }

  body {
    padding: 15px;
    padding-bottom: 70px;
    background: transparent;
  }

  .dashboard {
    margin: 50px 10px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    max-width: 700px;
  }

  .logo {
    max-height: 160px !important;
    padding: 0 10px;
  }

  .app-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .app-card {
    padding: 12px 10px;
    font-size: 14px;
    min-height: 122px;
    box-shadow: none;
  }

  .app-card span {
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: 0.5px;
  }

  .app-icon {
    width: 48px;
    height: 48px;
  }

  .back-icon {
    vertical-align: middle;
    filter: brightness(0) invert(1);
  }

  .wave-icon {
    vertical-align: middle;
  }

  .top-buttons {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 6px);
    right: 10px;
    gap: 8px;
    z-index: 9999;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: calc(100vw - 20px);
  }

  .top-btn {
    padding: 7px 12px;
    font-size: 13px;
  }

  .clan-row {
    display: grid;
    grid-template-columns: 15% 50% 15% 15%;
    font-size: 13px;
  }

  .clan-cell {
    width: 0;
    min-width: 40px;
  }

  .km-input {
    width: 45px;
    font-size: 12px;
  }

  .table {
    min-width: 700px;
  }

  .form-block {
    min-width: 80%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
  }

  .view-block {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
  }

  .btn-edit,
  .btn-delete,
  .btn-view {
    padding: 8px 8px;
    border-radius: 8px;
    font-size: 6px;
  }
}

@media (max-width: 1200px) {
  .dashboard {
    max-width: 900px;
  }
}

/* ================================================= */
/* LIQUID GLASS OVERRIDES */
/* dodaj na konec obstoječega CSS */
/* ================================================= */

:root {
  --glass-bg: rgba(255, 255, 255, 0.46);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.42);

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 18px 42px rgba(0, 0, 0, 0.12);
  --shadow-panel: 0 14px 36px rgba(0, 0, 0, 0.1);
}

/* Ozadje naj ostane čisto, brez preveč "mat" občutka */
html {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.75) 0%,
      rgba(255, 255, 255, 0) 35%
    ),
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(255, 255, 255, 0) 28%
    ),
    linear-gradient(
      to bottom,
      var(--color-dashboard-top) 0%,
      var(--color-dashboard-mid) 48%,
      var(--color-dashboard-bottom) 100%
    );
}

body {
  background: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ================================================= */
/* GLASS PANELS */
/* ================================================= */

.block,
.view-block,
.form-block,
.dashboard,
.index-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.52) 0%,
    rgba(255, 255, 255, 0.34) 100%
  );
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 -1px 0 rgba(255, 255, 255, 0.08) inset,
    var(--shadow-soft);
}

.block::before,
.view-block::before,
.form-block::before,
.dashboard::before,
.index-container::before,
.table-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.block::after,
.view-block::after,
.form-block::after,
.dashboard::after,
.index-container::after,
.table-wrapper::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -120px;
  right: -80px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.24) 0%,
    rgba(255, 255, 255, 0) 72%
  );
}

.dashboard,
.index-container {
  border-radius: 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 -1px 0 rgba(255, 255, 255, 0.1) inset,
    var(--shadow-panel);
}

/* ================================================= */
/* TABLE */
/* ================================================= */

.table-wrapper {
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.58) 0%,
    rgba(255, 255, 255, 0.42) 100%
  );
}

.table {
  background: transparent;
}

.table th {
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.32) inset;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.table tbody tr {
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ================================================= */
/* INPUTS */
/* ================================================= */

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 2px 10px rgba(0, 0, 0, 0.03);
}

input:focus,
select:focus,
textarea:focus,
.form-block input:focus {
  border-color: rgba(179, 0, 0, 0.3);
  box-shadow:
    0 0 0 4px rgba(179, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 8px 18px rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.84);
}

/* ================================================= */
/* BUTTONS */
/* ================================================= */

.btn-submit,
.btn-draft,
.btn-export,
.btn-small,
.top-btn,
.btn-save {
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 10px 22px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-submit::before,
.btn-draft::before,
.btn-export::before,
.btn-small::before,
.top-btn::before,
.btn-save::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.08) 24%,
    rgba(255, 255, 255, 0) 68%
  );
}

.btn-submit:hover,
.btn-draft:hover,
.btn-export:hover,
.btn-small:hover,
.top-btn:hover,
.btn-save:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 16px 30px rgba(0, 0, 0, 0.2),
    0 4px 14px var(--btn-glow);
}

/* ================================================= */
/* TOP BAR BUTTONS */
/* ================================================= */

.top-buttons {
  z-index: 40;
}

.top-btn {
  background: linear-gradient(
    160deg,
    var(--btn-bg-1) 0%,
    var(--btn-bg-2) 52%,
    var(--btn-bg-3) 100%
  );
}

/* ================================================= */
/* FOOTER */
/* ================================================= */

footer {
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.24) inset;
}

/* ================================================= */
/* MOBILE */
/* ================================================= */

@media (max-width: 700px) {
  .dashboard,
  .index-container,
  .block,
  .view-block,
  .form-block,
  .table-wrapper {
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }

  .dashboard,
  .index-container {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  .dashboard::before,
  .dashboard::after,
  .index-container::before,
  .index-container::after {
    display: none !important;
    content: none !important;
  }
}

/* ================================================= */
/* LOGIN PAGE */
/* ================================================= */

.login-page {
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-shell {
  width: 100%;
  max-width: 460px;
  display: flex;
  justify-content: center;
}

.login-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 34px 28px 30px;
  border-radius: 30px;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.68) 0%,
    rgba(255, 255, 255, 0.48) 100%
  );
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);

  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 18px 45px rgba(0, 0, 0, 0.14);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.1) 24%,
    rgba(255, 255, 255, 0) 60%
  );
}

.login-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -110px;
  right: -70px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 72%
  );
}

.login-logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-logo {
  width: 120px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

.login-header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 24px;
}

.login-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.login-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #5f6b75;
}

.login-form {
  position: relative;
  z-index: 1;
}

.login-form label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #3e4a54;
}

.login-form input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  margin-bottom: 16px;
  border-radius: 14px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 3px 12px rgba(0, 0, 0, 0.04);

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    background var(--transition-fast);
}

.login-form input::placeholder {
  color: #8a96a0;
}

.login-form input:focus {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(179, 0, 0, 0.28);
  box-shadow:
    0 0 0 4px rgba(179, 0, 0, 0.1),
    0 10px 22px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.login-btn {
  margin-top: 8px;
  height: 54px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

@media (max-width: 900px) {
  .login-page {
    padding: 18px;
    padding-top: 28px;
  }

  .login-shell {
    max-width: 100%;
  }

  .login-card {
    padding: 22px 18px 20px;
    border-radius: 24px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .login-logo {
    width: 100px;
  }

  .login-title {
    font-size: 30px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .login-form input {
    height: 50px;
    border-radius: 12px;
  }

  .login-btn {
    height: 52px;
    border-radius: 14px;
  }

  .index-container {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    margin-top: 20px !important;
    padding: 0 !important;
  }

  .index-container::before,
  .index-container::after {
    display: none !important;
    content: none !important;
  }

  .index-container h1 {
    margin-bottom: 50px;
  }
}

.login-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #8b1e1e;
  background: rgba(255, 235, 235, 0.9);
  border: 1px solid rgba(179, 0, 0, 0.12);
}

.hidden {
  display: none !important;
}

.top-btn i {
  font-size: 16px;
  color: #ffffff;
}

.top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  font-size: 15px;
  background-color: var(--color-bg-soft);
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fafafa;
  border-bottom: 2px solid #ddd;
}

.table th,
.table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.table td:first-child {
  font-weight: bold;
  color: #b30000;
  width: 60px;
}

.table td:nth-child(2) {
  font-weight: 600;
}

.table td:nth-child(7) {
  text-align: left;
}

.ik-da {
  color: green;
  font-weight: bold;
  font-size: 16px;
}

.ik-ne {
  color: #b30000;
  font-weight: bold;
  font-size: 16px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.detail-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.table tr.selected {
  background-color: rgba(34, 197, 94, 0.12);
}

.table tr:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.table tr.selected:hover {
  background-color: rgba(34, 197, 94, 0.18);
}

@media (max-width: 900px) {
  .table th,
  .table td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .btn-small span {
    display: none;
    padding: 8px 12px;
  }

  .detail-icon {
    width: 20px;
    height: 20px;
  }
}

.activity-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  border-radius: 18px;
}

.activity-table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0 10px;
  font-size: 15px;
}

.activity-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;

  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #555;

  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.activity-table thead th:first-child {
  border-radius: 12px 0 0 12px;
}

.activity-table thead th:last-child {
  border-radius: 0 12px 12px 0;
  text-align: center;
}

.activity-table tbody tr {
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.activity-table tbody tr:hover td {
  transform: translateY(-1px);
  background-color: rgba(34, 197, 94, 0.18);
}

.activity-table td {
  padding: 14px 16px;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.92);
}

.activity-table tbody td:first-child {
  border-radius: 14px 0 0 14px;
}

.activity-table tbody td:last-child {
  border-radius: 0 14px 14px 0;
  text-align: right;
  font-weight: 700;
  color: #b30000;
  white-space: nowrap;
}

.activity-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.activity-user-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.9;
}

.activity-user-name {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  color: #1f2937;
  line-height: 1.3;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.activity-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

@media (max-width: 768px) {
  .activity-page-header {
    align-items: stretch;
  }

  .activity-table {
    min-width: 100%;
    font-size: 14px;
  }

  .activity-table thead th,
  .activity-table td {
    padding: 12px 12px;
  }

  .activity-user-icon {
    width: 34px;
    height: 34px;
  }

  .activity-user-name {
    font-size: 14px;
  }
}

.geoqr-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px;
}

.geoqr-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

.geoqr-subtitle {
  margin: 0 0 18px 0;
  color: #555;
}

.geoqr-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.geoqr-layout-hidden {
  display: none;
}

.geoqr-generate-btn {
  width: auto;
  margin-top: 10px;
  display: inline-block;
}

.geoqr-result-row {
  display: grid;
  grid-template-columns: 160px 1fr 110px;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid #edf4ed;
}

.geoqr-result-label {
  font-weight: 700;
  color: #b30000;
}

.geoqr-result-value {
  word-break: break-word;
}

.geoqr-result-value a {
  color: #1565c0;
  text-decoration: underline;
}

.geoqr-copy-btn {
  --btn-bg-1: #7f1d1d;
  --btn-bg-2: #dc2626;
  --btn-bg-3: #991b1b;
  --btn-glow: rgba(220, 38, 38, 0.2);

  position: relative;
  overflow: hidden;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;

  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.2px;

  background: linear-gradient(
    160deg,
    var(--btn-bg-1) 0%,
    var(--btn-bg-2) 52%,
    var(--btn-bg-3) 100%
  );
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    filter var(--transition-fast);
}

.geoqr-copy-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 22%,
    rgba(255, 255, 255, 0) 55%
  );
  pointer-events: none;
}

.geoqr-copy-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.14);
}

.geoqr-copy-btn:active {
  transform: translateY(0);
}

.geoqr-copy-btn:focus-visible {
  outline: none;
}

.geoqr-qr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.geoqr-qr-box {
  text-align: center;
}

.geoqr-qr-box h3 {
  margin-top: 0;
  color: #b30000;
}

.geoqr-placeholder {
  min-height: 210px;
  border: 2px solid #dfe8df;
  border-radius: 12px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  padding: 10px;
}

.geoqr-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.geoqr-error-box {
  margin-top: 12px;
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ef9a9a;
  border-radius: 10px;
  padding: 10px 12px;
}

.geoqr-map-preview-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.geoqr-map-frame {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

.geoqr-copy-success {
  background: linear-gradient(
    145deg,
    #034b06 0%,
    #09860d 50%,
    #3e9641 85%
  ) !important;
}

@media (max-width: 1100px) {
  .geoqr-layout {
    grid-template-columns: 1fr;
  }

  .geoqr-qr-grid {
    grid-template-columns: 1fr;
  }

  .geoqr-result-row {
    grid-template-columns: 1fr;
  }

  .geoqr-actions {
    display: grid;
    justify-items: center;
  }
  .geoqr-page {
    padding: 0px;
  }
}

.block {
  background: rgba(255, 255, 255, 1);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  transition: var(--transition-mid);
}

/* ================================================= */
/* DASHBOARD HOME */
/* ================================================= */

.dashboard-home {
  max-width: 1100px;
  margin: 60px auto 0;
  padding: 24px;
  text-align: left;
  box-sizing: border-box;
}

.dashboard-home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dashboard-home-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.dashboard-home-logo-desktop {
  height: 96px;
  margin-top: 0;
  flex-shrink: 0;
}

.dashboard-home-title-wrap {
  min-width: 0;
}

.dashboard-home-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  color: var(--color-primary);
  display: none;
}

.dashboard-home-user {
  text-align: right;
  flex-shrink: 0;
}

.dashboard-home-greeting {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-home-greeting-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}

.dashboard-home-greeting-name {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
}

.dashboard-home-section {
  margin-top: 10px;
}

.dashboard-grid {
  margin-top: 0;
}

.dashboard-logo-wrapper {
  display: none;
}

/* ================================================= */
/* TABLET / MOBILE */
/* ================================================= */

@media (max-width: 700px) {
  html,
  body {
    min-height: 100%;
  }

  body {
    overflow-y: auto !important;
    height: auto !important;
    padding: 14px 14px 90px 14px;
  }

  .dashboard-home {
    margin: 0;
    padding: 56px 0 0 0;
    min-height: auto;
    max-width: 100%;
  }

  .dashboard-home-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .dashboard-home-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: auto;
    flex-shrink: 0;
  }

  .dashboard-logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .dashboard-home-logo {
    height: 180px !important;
    width: auto;
    margin-top: 0;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
  }

  .dashboard-home-logo-desktop {
    display: none;
  }
  .dashboard-home-title {
    display: none;
  }

  .dashboard-home-user {
    width: auto;
    margin: 0;
    text-align: left;
    flex: 1;
    min-width: 0;
  }

  .dashboard-home-greeting {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .dashboard-home-greeting-label {
    font-size: 10px;
    letter-spacing: 0.4px;
  }

  .dashboard-home-greeting-name {
    font-size: 16px;
    line-height: 1.1;
    word-break: break-word;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 0;
  }

  .dashboard-grid .app-card {
    min-height: 134px;
    padding: 14px 12px;
    border-radius: 18px;
    gap: 10px;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .top-buttons {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: 10px;
    z-index: 999;
    gap: 8px;
  }

  .top-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
  }

  .top-btn i {
    font-size: 16px;
  }
}

/* ================================================= */
/* SMALL PHONES */
/* ================================================= */

@media (max-width: 480px) {
  body {
    padding: 12px 12px 80px 12px;
  }

  .dashboard-home {
    padding-top: 52px;
  }

  .dashboard-home-header {
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .dashboard-home-logo {
    height: 52px;
  }

  .dashboard-home-title {
    font-size: 22px;
  }

  .dashboard-home-greeting-name {
    font-size: 17px;
  }

  .dashboard-grid {
    gap: 10px;
  }
}

@media (max-width: 700px) {
  .dashboard-grid .app-card,
  .app-grid .app-card,
  .app-card {
    min-height: clamp(66px, 11.5svh, 104px) !important;
    padding: clamp(8px, 1.6svh, 14px) !important;
    gap: clamp(6px, 1.2svh, 12px) !important;
  }

  .app-icon {
    width: clamp(26px, 5svh, 38px) !important;
    height: clamp(26px, 5svh, 38px) !important;
  }

  .app-card span {
    font-size: clamp(11px, 2.1svh, 14px) !important;
    line-height: 1.15;
  }

  .app-card small {
    font-size: clamp(9px, 1.7svh, 12px) !important;
  }
}

.top-user-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 40;
}

.top-user-toggle {
  --btn-bg-1: #7f1d1d;
  --btn-bg-2: #dc2626;
  --btn-bg-3: #991b1b;
  --btn-glow: rgba(220, 38, 38, 0.16);

  position: relative;
  overflow: hidden;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  cursor: pointer;

  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.4px;

  background: linear-gradient(
    160deg,
    var(--btn-bg-1) 0%,
    var(--btn-bg-2) 52%,
    var(--btn-bg-3) 100%
  );

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);

  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    filter var(--transition-fast);
}

.top-user-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.08) 24%,
    rgba(255, 255, 255, 0) 68%
  );
}

.top-user-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 16px 30px rgba(0, 0, 0, 0.2),
    0 4px 14px var(--btn-glow);
}

.top-user-toggle:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.18),
    inset 0 2px 8px rgba(0, 0, 0, 0.18);
}

.top-user-toggle:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.08),
    0 0 0 6px var(--btn-glow),
    0 14px 28px rgba(0, 0, 0, 0.22);
}

.top-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 10px;

  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.82) 100%
  );

  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);

  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 14px 36px rgba(0, 0, 0, 0.14);

  display: none;
}

.top-user-menu.active .top-user-dropdown {
  display: block;
}

.top-user-info {
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 6px;
}

.top-user-info strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  color: #111827;
}

.top-user-link {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 12px;

  text-decoration: none;
  color: #222;
  font-size: 14px;
  font-weight: 600;

  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.top-user-link:hover {
  background: rgba(179, 0, 0, 0.06);
  transform: translateX(1px);
}

.top-user-link i {
  width: 16px;
  text-align: center;
  color: var(--color-primary);
}

@media (max-width: 700px) {
  .top-user-menu {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: 10px;
    z-index: 999;
  }

  .top-user-toggle {
    width: 42px;
    height: 42px;
  }

  .top-user-dropdown {
    min-width: 200px;
    top: calc(100% + 8px);
  }
}

/* ================================================= */
/* DELETE MODAL */
/* ================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;

  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  overflow: hidden;

  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.36);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.82) 100%
  );

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;

  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);

  animation: modalIn 0.22s ease;
}

.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.08) 24%,
    rgba(255, 255, 255, 0) 60%
  );
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content {
  position: relative;
  z-index: 1;
  padding: 24px 22px 20px;
}

.modal-icon-wrap {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(160deg, #7f1d1d 0%, #dc2626 52%, #991b1b 100%);

  box-shadow:
    0 10px 24px rgba(220, 38, 38, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.modal-icon-wrap i {
  color: #fff;
  font-size: 22px;
}

.modal-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 24px;
  line-height: 1.15;
  color: var(--color-primary);
}

.modal-text {
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}

.modal-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-btn {
  min-width: 120px;
}

.modal-btn-cancel {
  --btn-bg-1: #374151;
  --btn-bg-2: #4b5563;
  --btn-bg-3: #1f2937;
  --btn-glow: rgba(75, 85, 99, 0.16);
}

.modal-btn-delete {
  --btn-bg-1: #7f1d1d;
  --btn-bg-2: #dc2626;
  --btn-bg-3: #991b1b;
  --btn-glow: rgba(220, 38, 38, 0.18);
}

.modal-close-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;

  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.68);
  color: #374151;
  font-size: 16px;

  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.modal-close-x:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.03);
}

@media (max-width: 600px) {
  .modal-content {
    padding: 22px 16px 16px;
  }

  .modal-title {
    font-size: 21px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-btn {
    width: 100%;
  }
}
