/* ===================================================================
   MVRO Mitgliederverwaltung – Main Stylesheet
   Colors: Primary #7a0f1b · Dark #5a0b13 · Secondary #f8ecee
           Accent #c89a1c · Text #1a1a1a · Border #d2ddec · BG #f2f5fa
   =================================================================== */

/* ===================== VARIABLES ===================== */
:root {
  color-scheme: light;
  --primary: #7a0f1b;
  --primary-dark: #5a0b13;
  --secondary: #f8ecee;
  --accent: #c89a1c;
  --text: #1a1a1a;
  --border: #d2ddec;
  --bg: #f2f5fa;
  --surface: #ffffff;
  --shadow: rgba(11, 47, 90, 0.1);
  --shadow-btn: rgba(122, 15, 27, 0.2);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --t: 0.17s ease;
}

/* ===================== RESET & BASE ===================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

a {
  color: var(--primary);
}

p {
  margin: 0 0 0.6rem;
}

/* ===================== HEADER ===================== */
.site-header {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.logo img {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

/* Desktop nav */
.header-nav {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  flex-wrap: wrap;
}

.header-nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition:
    background var(--t),
    color var(--t);
}

.header-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.header-nav .profile-link-nav {
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
}

.header-nav .profile-link-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* hide upload / change-password from main nav */
.header-nav a[href="/members/upload"],
.header-nav a[href="/profile/change-password"] {
  display: none !important;
}

/* nav also used via .site-header nav (legacy) */
.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-header nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: background var(--t);
}

.site-header nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

/* Badge */
.nav-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Logout */
.logout {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.logout form {
  margin: 0;
}

.logout button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  transition: background var(--t);
}

.logout button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.desktop-logout {
  display: block;
}

/* ===================== HAMBURGER / MOBILE NAV ===================== */
.hamburger {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  margin-left: 0.75rem;
  z-index: 10001;
  border-radius: var(--radius-sm);
  transition: background var(--t);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  margin: 3px 0;
  background: #fff;
  border-radius: 2px;
  transition: all 0.28s;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 68px;
  right: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  padding: 0.6rem;
  min-width: 215px;
  z-index: 10000;
  border: 1px solid var(--border);
}

.mobile-nav a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.48rem 0.75rem;
  border-radius: var(--radius-sm);
  transition:
    background var(--t),
    color var(--t);
  margin-bottom: 0.1rem;
}

.mobile-nav a:hover {
  background: var(--secondary);
  color: var(--primary);
}

.mobile-nav .profile-link-nav {
  color: var(--primary);
  font-weight: 600;
}

.mobile-nav .nav-with-badge {
  margin-bottom: 0.1rem;
}
.mobile-nav .badge {
  margin-left: 0.5rem;
}

.mobile-nav .logout {
  display: block;
  margin-top: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.mobile-nav .logout button {
  background: var(--secondary);
  color: var(--primary);
  border: none;
  width: 100%;
  justify-content: center;
}

.mobile-nav .logout button:hover {
  background: #f0d8dc;
}

@media (max-width: 900px) {
  .site-header {
    padding: 0 1rem;
    height: 60px;
  }
  .header-nav {
    display: none !important;
  }
  .hamburger {
    display: flex;
  }
  .desktop-logout {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .logo span {
    font-size: 0.88rem;
  }
}

/* ===================== LAYOUT ===================== */
.container {
  padding: 2rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .container {
    padding: 1rem;
  }
}

/* ===================== CARDS ===================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 4px 28px var(--shadow);
  border: 1px solid rgba(11, 47, 90, 0.06);
  margin-bottom: 1.5rem;
}

/* ===================== TYPOGRAPHY ===================== */
h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.9rem;
}

h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===================== TOOLBAR ===================== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar form {
  margin: 0;
}

.toolbar .button,
.toolbar .dropdown summary.button {
  height: 40px;
  padding: 0 1.15rem;
  font-size: 0.875rem;
}

/* ===================== STATUS TABS ===================== */
.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition:
    background var(--t),
    color var(--t),
    box-shadow var(--t);
  border: 1.5px solid transparent;
}

.tab:hover {
  background: #f0d4d8;
}

.tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px var(--shadow-btn);
  border-color: var(--primary-dark);
}

/* ===================== BUTTONS ===================== */
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: #fff;
  padding: 0.52rem 1.15rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 3px 10px var(--shadow-btn);
  transition:
    filter var(--t),
    transform var(--t),
    box-shadow var(--t);
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.button:hover,
.btn:hover {
  filter: brightness(1.09);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--shadow-btn);
}

.button:active,
.btn:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

/* secondary */
.button.button-secondary,
.btn-secondary {
  background: #6c757d;
  box-shadow: none;
}
.button.button-secondary:hover,
.btn-secondary:hover {
  background: #5a6268;
  box-shadow: none;
  filter: none;
}

/* danger */
.btn-danger,
.button[style*="dc3545"],
.button[style*="#dc3545"] {
  background: #dc3545 !important;
  box-shadow: 0 3px 10px rgba(220, 53, 69, 0.22);
}
.btn-danger:hover {
  background: #b91c2c !important;
  box-shadow: 0 5px 14px rgba(220, 53, 69, 0.3);
  filter: none;
}

.btn-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.82rem;
  border-radius: 5px;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* ===================== DROPDOWN ===================== */
.dropdown {
  position: relative;
}

.dropdown summary.button {
  list-style: none;
  cursor: pointer;
}
.dropdown summary.button::-webkit-details-marker {
  display: none;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  min-width: 155px;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: 0 8px 28px var(--shadow);
  z-index: 10;
}

.dropdown[open] .dropdown-menu {
  display: flex;
}

.dropdown-menu a {
  text-decoration: none;
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition:
    background var(--t),
    color var(--t);
}

.dropdown-menu a:hover {
  background: var(--secondary);
  color: var(--primary);
}

/* ===================== FORMS ===================== */
.form {
  display: grid;
  gap: 1rem;
}

.form.grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

input,
select,
textarea {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition:
    border-color var(--t),
    box-shadow var(--t);
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 15, 27, 0.1);
}

input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
  border-color: #bdc8da;
}

select[multiple] {
  min-height: 120px;
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.55;
}

/* filter bar */
.filter-bar {
  background: linear-gradient(135deg, #fff 0%, #fdf5f6 100%);
  border: 1px solid rgba(122, 15, 27, 0.07);
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem 1.5rem;
  align-items: end;
}

.filter-group label {
  font-weight: 600;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  align-self: end;
}

.filter-actions .button {
  height: 38px;
  padding: 0 1rem;
}

/* form-group (legacy) */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
}

.form-group small {
  display: block;
  margin-top: 0.3rem;
  color: #6b7280;
  font-size: 0.82rem;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--text);
}

/* ===================== TABLES ===================== */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--secondary);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

tbody tr {
  transition: background var(--t);
}
tbody tr:hover {
  background: #fdf5f6;
}
tbody tr:last-child td {
  border-bottom: none;
}

tbody td a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
tbody td a:hover {
  text-decoration: underline;
}

/* .table alias */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: var(--secondary);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary-dark);
}

/* admin users table */
.admin-users-card {
  padding: 1.5rem 1.75rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.admin-users-table {
  width: 100%;
}

.admin-users-table th,
.admin-users-table td {
  vertical-align: top;
}

.admin-users-table td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.admin-users-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #6b7280;
}

.admin-users-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ===================== MEMBER DETAIL ===================== */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.tag-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  background: var(--secondary);
  color: var(--primary);
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.honor-box {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--secondary);
  border: 1px solid rgba(122, 15, 27, 0.14);
  font-size: 0.9rem;
}

.honor-box.eligible {
  background: #fff8e1;
  border-color: #f6c86a;
}

/* ===================== ALERTS ===================== */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  /* default: error-like */
  background: #fff0f0;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert-error {
  background: #fff0f0;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* ===================== STATUS PILLS ===================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 0.3rem;
  line-height: 1;
  white-space: nowrap;
}

.status-ok {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-wait {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

/* ===================== PERMISSIONS & INLINE CHECKS ===================== */
.inline-check {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  font-weight: 600;
  color: #1f2933;
}

.inline-check input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.inline-check input:disabled + span {
  opacity: 0.6;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.2rem;
}

/* ===================== TEAMS LEADER ===================== */
.teams-leader-form label {
  gap: 0.35rem;
}
.teams-leader-list {
  display: grid;
  gap: 0.75rem;
}

.teams-leader-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(280px, 2fr) auto;
  gap: 1rem;
  align-items: end;
}

.teams-leader-row .team-name {
  font-weight: 700;
}
.teams-leader-row .team-leader-select select {
  min-width: 260px;
}

.teams-leader-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
}

/* ===================== BIRTHDAY GRID ===================== */
.birthday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.birthday-card {
  background: #fdf5f0;
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  min-height: 220px;
  border: 1px solid #f3ddd0;
}

.birthday-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary);
  border-bottom: none;
  padding-bottom: 0;
  font-size: 0.92rem;
  text-transform: none;
  letter-spacing: 0;
}

.birthday-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.birthday-card li {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.88rem;
}

.birthday-card .day {
  font-weight: 700;
  color: var(--primary);
}
.birthday-card .age {
  text-align: right;
  font-weight: 700;
  color: var(--accent);
}
.birthday-card .empty {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.82rem;
}

/* ===================== CALENDAR GRID ===================== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.calendar-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.06);
  border: 1px solid var(--border);
}

.calendar-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: var(--primary);
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 0.4rem;
  font-size: 0.88rem;
}

.calendar-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.calendar-card li {
  display: grid;
  gap: 0.2rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.calendar-card li:last-child {
  border-bottom: none;
}

.calendar-date {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.875rem;
}

.calendar-time {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.85rem;
}
.calendar-location {
  color: #6b7280;
  font-size: 0.85rem;
}
.calendar-description {
  color: #6b7280;
  font-size: 0.85rem;
}

.calendar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.calendar-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ===================== PRINT LOGO ===================== */
.print-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
}

.print-logo img {
  height: 32px;
  width: auto;
  display: block;
}

/* ===================== HEADER ACTIONS (simplified nav) ===================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition:
    background var(--t),
    color var(--t);
  flex-shrink: 0;
}

.home-btn svg {
  width: 22px;
  height: 22px;
}

.home-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition:
    background var(--t),
    color var(--t);
  white-space: nowrap;
  overflow: hidden;
  max-width: 220px;
}

.header-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

@media (max-width: 560px) {
  .header-user span {
    display: none;
  }
  .logo span {
    display: none;
  }
}

/* ===================== DASHBOARD / TILE GRID ===================== */
.dashboard {
  padding-top: 0.5rem;
}

.dashboard-greeting {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 1.75rem;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.75rem 1rem 1.5rem;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(11, 47, 90, 0.07);
  box-shadow: 0 2px 14px var(--shadow);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition:
    transform var(--t),
    box-shadow var(--t),
    border-color var(--t);
  min-height: 148px;
  text-align: center;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(11, 47, 90, 0.14);
  border-color: rgba(122, 15, 27, 0.18);
}

.tile:active {
  transform: translateY(0);
}

.tile-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.tile-icon svg {
  width: 30px;
  height: 30px;
}

/* colour variants */
.tile-icon--primary {
  background: var(--secondary);
  color: var(--primary);
}

.tile-icon--accent {
  background: #fef5d4;
  color: #a07a10;
}

.tile-icon--neutral {
  background: #eef2f7;
  color: #4b5a6e;
}

.tile-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.3;
}

.tile-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

@media (max-width: 480px) {
  .tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.9rem;
  }
  .tile {
    min-height: 130px;
    padding: 1.25rem 0.75rem 1.1rem;
  }
  .tile-icon {
    width: 50px;
    height: 50px;
  }
  .tile-icon svg {
    width: 26px;
    height: 26px;
  }
}

/* ===================== PRINT STYLES ===================== */
@media print {
  .site-header,
  .toolbar,
  .header-nav,
  .logout,
  .button {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .card {
    box-shadow: none;
    border: none;
  }
}

@media print {
  body.print-calendar {
    font-size: 9px;
  }
  @page {
    size: A4 landscape;
    margin: 8mm;
  }
  body.print-calendar .calendar-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

@media print {
  body.print-birthdays {
    font-size: 9px;
  }
  @page {
    size: A4 landscape;
    margin: 8mm;
  }
  body.print-birthdays .card {
    padding: 0;
  }
  body.print-birthdays .print-logo {
    justify-content: center;
    margin-bottom: 0.35rem;
  }
  body.print-birthdays .print-logo img {
    height: 28px;
  }
  body.print-birthdays .birthday-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
  }
  body.print-birthdays .birthday-card {
    padding: 0.3rem 0.4rem;
    min-height: 0;
    background: #f2eadc;
  }
  body.print-birthdays .birthday-card h3 {
    margin-bottom: 0.2rem;
    font-size: 10px;
  }
  body.print-birthdays .birthday-card li {
    font-size: 8.5px;
    grid-template-columns: 1.6rem 1fr 1.2rem;
  }
}
