/* Functional application pages */
.app-page { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 92px; }
.app-hero { max-width: 760px; margin-bottom: 36px; }
.app-hero h1 { margin-bottom: 15px; font-size: clamp(2.5rem, 4vw, 4rem); }
.app-hero p { font-size: 1.08rem; }
.app-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.app-card { padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow-sm); }
.app-card h2 { margin-bottom: 10px; font-size: 1.65rem; }
.app-card > p { margin-bottom: 24px; }
.app-form { display: grid; gap: 16px; }
.app-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.app-form label { display: grid; gap: 7px; color: #3d4758; font-size: .85rem; font-weight: 700; }
.app-form input, .app-form select, .app-form textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #d9dee7; border-radius: 10px; outline: 0; background: white; color: var(--ink); }
.app-form textarea { min-height: 120px; resize: vertical; }
.app-form input:focus, .app-form select:focus, .app-form textarea:focus { border-color: #8e72ee; box-shadow: 0 0 0 3px rgba(112,70,232,.11); }
.app-help { color: #707989; font-size: .81rem; line-height: 1.5; }
.app-check { display: flex !important; grid-template-columns: none !important; flex-direction: row; gap: 9px !important; align-items: flex-start; font-weight: 500 !important; }
.app-check input { width: 18px; min-height: 18px; margin-top: 2px; }
.app-alert { margin-bottom: 22px; padding: 14px 16px; border-radius: 10px; font-size: .92rem; }
.app-alert.error { color: #8b2732; background: #fff0f1; border: 1px solid #ffd4d8; }
.app-alert.success { color: #17643a; background: #edf9f2; border: 1px solid #c9ebd7; }
.app-alert.info { color: #27527f; background: #edf6ff; border: 1px solid #cfe5fa; }
.app-side-note { padding: 28px; border-radius: 18px; background: #f5f3ff; }
.app-side-note h3 { font-size: 1.3rem; }
.app-side-note ul { padding-left: 20px; margin-bottom: 0; color: var(--muted); }
.app-inline-links { display: flex; flex-wrap: wrap; gap: 11px 20px; margin-top: 20px; }
.app-inline-links a { color: var(--purple); font-size: .9rem; font-weight: 700; }

/* Events search and detail */
.events-page-hero { padding-bottom: 35px; }
.event-search-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 210px 170px auto; gap: 10px; margin: 22px 0 36px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow-sm); }
.event-search-bar input, .event-search-bar select { min-height: 48px; padding: 0 13px; border: 1px solid #dfe3ea; border-radius: 10px; background: white; }
.event-results-summary { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; color: var(--muted); font-size: .9rem; }
.event-list-v4 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.event-card-v4 { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: var(--shadow-sm); }
.event-card-v4 .event-image { display: block; aspect-ratio: 16/9; overflow: hidden; background: #edf1f6; }
.event-card-v4 .event-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.event-card-v4:hover .event-image img { transform: scale(1.025); }
.event-card-body { padding: 22px; }
.event-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; color: #70798b; font-size: .75rem; font-weight: 650; }
.event-status { padding: 5px 8px; border-radius: 999px; color: #17643a; background: #eaf8ef; }
.event-card-v4 h2 { margin-bottom: 10px; font-size: 1.24rem; line-height: 1.35; }
.event-card-v4 p { margin-bottom: 15px; font-size: .91rem; }
.event-card-meta { display: grid; gap: 7px; margin: 16px 0; color: #596476; font-size: .82rem; }
.event-card-meta span { display: flex; align-items: center; gap: 7px; }
.event-detail-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; padding: 56px 0 48px; }
.event-detail-hero img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-sm); }
.event-detail-copy h1 { margin-bottom: 18px; font-size: clamp(2.5rem, 4.4vw, 4.5rem); }
.event-detail-copy > p { font-size: 1.06rem; }
.event-facts { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin: 24px 0; }
.event-fact { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.event-fact small { display: block; color: #7a8393; font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.event-fact strong { display: block; margin-top: 3px; font-size: .9rem; }
.event-detail-layout { display: grid; grid-template-columns: 1fr 390px; gap: 46px; align-items: start; }
.event-detail-content { display: grid; gap: 36px; }
.event-detail-section { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.event-detail-section h2 { margin-bottom: 14px; font-size: 1.8rem; }
.event-detail-section ul { padding-left: 22px; color: var(--muted); }
.event-detail-section li + li { margin-top: 8px; }
.event-register-card { position: sticky; top: 110px; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow-md); }
.event-register-card h2 { font-size: 1.55rem; }

/* Dashboard */
.dashboard-top { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.dashboard-grid { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }
.dashboard-sidebar { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.dashboard-user { padding-bottom: 18px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.dashboard-user strong, .dashboard-user small { display: block; }
.dashboard-user small { margin-top: 3px; color: var(--muted); }
.dashboard-nav { display: grid; gap: 4px; }
.dashboard-nav a { padding: 10px 11px; border-radius: 9px; color: #4e586a; font-size: .88rem; font-weight: 650; }
.dashboard-nav a:hover, .dashboard-nav a.active { color: var(--purple); background: #f3f0ff; }
.dashboard-main { display: grid; gap: 22px; }
.dashboard-welcome { padding: 30px; border-radius: 18px; color: white; background: linear-gradient(120deg, #5f3dd2, #5272d9); }
.dashboard-welcome h2 { margin-bottom: 8px; font-size: 2rem; }
.dashboard-welcome p { margin: 0; color: rgba(255,255,255,.8); }
.dashboard-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.dashboard-card { min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.dashboard-card h3 { margin: 13px 0 8px; font-size: 1.05rem; }
.dashboard-card p { margin-bottom: 13px; font-size: .87rem; }
.saved-list { display: grid; gap: 10px; }
.saved-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; }

@media (max-width: 1180px) {
  .event-list-v4 { grid-template-columns: repeat(2,1fr); }
  .dashboard-cards { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 980px) {
  .app-shell, .event-detail-hero, .event-detail-layout, .dashboard-grid { grid-template-columns: 1fr; }
  .event-register-card { position: static; }
  .dashboard-sidebar { display: none; }
}

@media (max-width: 720px) {
  .app-page { width: calc(100% - 32px); padding-top: 42px; }
  .app-card { padding: 22px; }
  .app-form .field-row { grid-template-columns: 1fr; }
  .event-search-bar { grid-template-columns: 1fr; }
  .event-list-v4 { grid-template-columns: 1fr; }
  .event-detail-hero { padding-top: 35px; }
  .event-facts { grid-template-columns: 1fr; }
  .dashboard-top { align-items: flex-start; flex-direction: column; }
  .dashboard-cards { grid-template-columns: 1fr; }
}
