/* ═══════════════════════════════════════════════════════════════════════
   Egységes belső oldal-design – a Services/Index oldal mintájára.
   Használat:
     <div class="app-page">                 (keskeny oldalhoz: app-page app-narrow)
         <div class="app-header">
             <div class="app-header-inner">
                 <div>
                     <h1><i class="bi bi-..."></i>Cím</h1>
                     <p>Alcím</p>
                     <div class="app-stats"><div class="app-stat">…</div></div>
                 </div>
                 <div class="app-header-actions">
                     <a class="btn-app-primary">…</a> <a class="btn-app-ghost">…</a>
                 </div>
             </div>
         </div>
         …tartalom…
     </div>
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Page ── */
.app-page {
    background: #f8fafc;
    min-height: 100vh;
    /* egyetlen elemmel középre zárt tartalom; a szélesség oldalanként állítható:
       <div class="app-page" style="--app-max:860px"> */
    --app-max: 1300px;
    padding: 2rem max(1rem, calc((100% - var(--app-max)) / 2));
}
.app-page.app-narrow { --app-max: 900px; }
.app-page.app-wide { --app-max: 1640px; }

/* ── Header ── */
.app-header {
    background: linear-gradient(135deg, #2e7d32 0%, #388E3C 60%, #00897b 100%);
    border-radius: 20px;
    padding: 2rem 2rem 1.6rem;
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.app-header::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    pointer-events: none;
}
.app-header::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 20%;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    pointer-events: none;
}
.app-header-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 768px) {
    .app-header-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.app-header h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; margin: 0; color: #fff; }
.app-header h1 > i { font-size: 1.5rem; vertical-align: middle; margin-right: .5rem; }
.app-header p { color: rgba(255,255,255,.72); font-size: .88rem; margin: .3rem 0 0; }
.app-header-back {
    display: inline-flex; align-items: center; gap: .3rem;
    color: rgba(255,255,255,.75); font-size: .8rem; font-weight: 600;
    text-decoration: none; margin-bottom: .35rem;
}
.app-header-back:hover { color: #fff; }
.app-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ── Stat pills ── */
.app-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.app-stat { display: flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.12); border-radius: 99px; padding: .3rem .9rem; font-size: .78rem; font-weight: 600; }
.app-stat i { font-size: .9rem; }

/* ── Header buttons ── */
.btn-app-primary {
    background: #fff;
    color: #2e7d32;
    border: none;
    border-radius: 10px;
    padding: .55rem 1.1rem;
    font-weight: 700;
    font-size: .85rem;
    transition: all .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
}
.btn-app-primary:hover { background: #e8f5e9; color: #1b5e20; transform: translateY(-1px); }
.btn-app-ghost {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.35);
    border-radius: 10px;
    padding: .55rem 1.1rem;
    font-weight: 600;
    font-size: .85rem;
    transition: all .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.btn-app-ghost:hover { background: rgba(255,255,255,.25); color: #fff; }
.app-header .form-select, .app-header .form-control { border: none; border-radius: 10px; font-size: .85rem; }

/* ── Empty state ── */
.app-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 20px;
    border: 2px dashed #e2e8f0;
}
.app-empty > i { font-size: 3.5rem; color: #cbd5e1; display: block; margin-bottom: 1rem; }
.app-empty h4, .app-empty h5 { color: #475569; font-weight: 700; }
.app-empty p { color: #94a3b8; font-size: .9rem; }

/* ── Régi (Bootstrap / site.css) elemek ugyanabban a stílusban ── */
.app-page .custom-card,
.app-page .card {
    background: #fff;
    border: 1.5px solid #f1f5f9;
    border-radius: 18px;
    box-shadow: none;
}
.app-page .custom-card:hover,
.app-page .card:hover {
    transform: none;
    border-color: #e2e8f0;
    box-shadow: 0 6px 24px rgba(46,125,50,.08) !important;
}
/* a saját háttérszínnel (bg-*) jelölt kártyafejléceket békén hagyjuk */
.app-page .card > .card-header:not([class*="bg-"]) {
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}
.app-page .card > .card-header { border-radius: 16px 16px 0 0; }
.app-page .card > .card-footer:not([class*="bg-"]) { background: #fafafa; border-top: 1px solid #f1f5f9; }

.app-page .table { margin-bottom: 0; font-size: .88rem; color: #374151; --bs-table-hover-bg: #f8fafc; --bs-table-striped-bg: #fafbfc; }
.app-page .table > thead > tr > th {
    font-size: .71rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #fff;
    border-bottom: 2px solid #f1f5f9;
    padding: .6rem .75rem;
    white-space: nowrap;
}
.app-page .table > tbody > tr > td { padding: .65rem .75rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.app-page .table > tbody > tr:last-child > td { border-bottom: none; }

.app-page .btn-custom {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .55rem 1.1rem;
    font-weight: 700;
    font-size: .85rem;
    box-shadow: none;
}
.app-page .btn-custom:hover { background: linear-gradient(135deg, #43a047, #2e7d32); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(46,125,50,.2); }
.app-page .btn-custom.btn-lg { padding: .7rem 1.6rem; font-size: .95rem; }
.app-page .btn-outline-custom {
    background: #fff;
    color: #2e7d32;
    border: 1.5px solid #a5d6a7;
    border-radius: 10px;
    font-weight: 600;
    font-size: .85rem;
}
.app-page .btn-outline-custom:hover { background: #e8f5e9; color: #1b5e20; transform: none; box-shadow: none; }
.app-page .text-accent { color: #4CAF50 !important; }

.app-page .form-control,
.app-page .form-select { border-radius: 10px; border-color: #e2e8f0; }
.app-page .form-control:focus,
.app-page .form-select:focus { border-color: #4CAF50; box-shadow: 0 0 0 .2rem rgba(76,175,80,.15); }
.app-page .input-group > .input-group-text { background: #f8fafc; border-color: #e2e8f0; border-radius: 10px 0 0 10px; }
.app-page .form-label { font-size: .84rem; font-weight: 600; color: #374151; }
.app-page .alert { border-radius: 12px; }

@media (max-width: 575px) {
    .app-page { padding-top: 1rem; }
    .app-header { padding: 1.4rem 1.2rem 1.2rem; border-radius: 16px; }
    .app-header h1 { font-size: 1.4rem; }
    .app-header h1 > i { font-size: 1.2rem; }
}
