@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&display=swap");

:root {
    --sidebar-width: 290px;
    --sidebar-collapsed-width: 86px;
}

html,
body {
    height: 100%;
}

/* =========================
   APP LAYOUT
========================= */
.app {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    width: var(--sidebar-width);
    position: sticky;
    top: 0;
    height: 100vh;
    background: #fff;
    overflow-y: auto;
    z-index: 20;
    transition: width .18s ease, transform .18s ease;
}

.sidebar-header {
    padding: 12px 12px 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sidebar-toggle {
    align-self: flex-end;
    border-radius: 10px;
    padding: 6px 10px;
    line-height: 1;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.sidebar-logo {
    width: 150px;
    max-width: 100%;
    height: auto;
    display: block;
    transition: width .18s ease;
}

.sidebar-title {
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

.sidebar .nav-link {
    border-radius: 12px;
    padding: 10px 12px;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .nav-link:hover {
    background: rgba(0, 0, 0, .04);
}

.sidebar .nav-link.active {
    background: rgba(13, 110, 253, .12);
    color: #0d6efd;
    font-weight: 700;
}

.nav-ico {
    width: 26px;
    text-align: center;
    flex: 0 0 26px;
}

.nav-text {
    white-space: nowrap;
}

.app.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.app.sidebar-collapsed .sidebar .nav-text {
    display: none;
}

.app.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: 12px;
}

.app.sidebar-collapsed .sidebar .nav-ico {
    width: auto;
    flex: 0 0 auto;
}

.app.sidebar-collapsed .sidebar .sidebar-logo {
    width: 52px;
}

.app.sidebar-collapsed .sidebar .sidebar-title {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 15;
}

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-105%);
        box-shadow: 18px 0 50px rgba(0, 0, 0, .18);
    }

    .app.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .app.sidebar-open .sidebar-overlay {
        display: block;
    }

    .sidebar-logo {
        width: 140px;
    }
}

/* =========================
   MAIN CONTENT
========================= */
.main {
    flex: 1;
    background: #f6f7fb;
}

.main-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* =========================
   DASHBOARD CARDS
========================= */
.page-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.page-title h2 {
    margin: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
}

.stat-card .stat-body {
    padding: 14px;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-label {
    font-size: 12px;
    letter-spacing: .3px;
    font-weight: 800;
    color: #6c757d;
    text-transform: uppercase;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(13, 110, 253, .10);
}

.stat-value {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.1;
    margin-top: 10px;
}

.stat-hint {
    color: #6c757d;
    font-size: 13px;
    margin-top: 6px;
}

.panel-card {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
}

.panel-card .panel-body {
    padding: 16px;
}

/* =========================
   DASHBOARD SPLIT (Köszöntő + Hírek)
========================= */
.dash-split {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 12px;
}

@media (max-width: 992px) {
    .dash-split {
        grid-template-columns: 1fr;
    }
}

.dash-card-title {
    font-weight: 900;
    color: #111827;
    margin-bottom: 10px;
}

/* Kapitányi köszöntő */
.captain-box {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

@media (max-width: 576px) {
    .captain-box {
        flex-direction: column;
    }
}

.captain-img {
    flex: 0 0 180px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .10);
    background: #fff;
}

.captain-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 180px;
}

.captain-text {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(13, 110, 253, .04), rgba(0, 0, 0, 0));
    padding: 14px;
}

.captain-hand {
    font-family: "Caveat", cursive;
    font-size: 26px;
    line-height: 1.2;
    color: #111827;
}

.captain-sign {
    margin-top: 10px;
    font-weight: 800;
    color: #6c757d;
}

/* =========================
   DIRECTORY PROFILE BLOCK
========================= */
.directory-profile {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .07);
}

.directory-profile-inner {
    display: flex;
    gap: 18px;
    padding: 16px;
    align-items: flex-start;
}

.directory-avatar {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .10);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    background: #fff;
}

.directory-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.directory-meta {
    flex: 1;
    min-width: 0;
}

.directory-name {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
    color: #111827;
    word-break: break-word;
}

.directory-row {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px dashed rgba(0, 0, 0, .08);
}

.directory-row:first-of-type {
    border-top: none;
}

.directory-label {
    width: 160px;
    color: #6c757d;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .3px;
    text-transform: uppercase;
    flex: 0 0 160px;
}

.directory-value {
    flex: 1;
    font-weight: 700;
    color: #111;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

@media (max-width: 576px) {
    .directory-profile-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .directory-label {
        width: auto;
        flex: 0 0 auto;
    }

    .directory-row {
        flex-direction: column;
        gap: 6px;
        text-align: left;
        width: 100%;
    }

    .directory-name {
        font-size: 22px;
        margin-bottom: 8px;
    }
}

/* =========================
   MEMBER LIST
========================= */
.directory-search {
    min-width: 260px;
}

.member-item {
    padding: 0;
}

.member-details {
    width: 100%;
}

.member-details>summary {
    list-style: none;
}

.member-details>summary::-webkit-details-marker {
    display: none;
}

.member-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.member-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, .10);
    flex: 0 0 38px;
}

.member-main {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-weight: 900;
    color: #111827;
    line-height: 1.15;
}

.member-display {
    font-weight: 700;
    color: #6c757d;
    margin-left: 6px;
}

.member-caret {
    color: #6c757d;
    font-weight: 900;
    transition: transform .15s ease;
}

details[open] .member-caret {
    transform: rotate(180deg);
}

.member-body {
    padding: 0 14px 14px 14px;
}

.member-k {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}

.member-k-label {
    font-size: 12px;
    font-weight: 900;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 6px;
}

.member-k-val {
    font-weight: 800;
    color: #111;
}

/* =========================
   LOGIN LAYOUT
========================= */
.login-body {
    margin: 0;
    background: #f8f9fa;
}

.login-layout {
    display: flex;
    min-height: 100vh;
}

.login-left {
    width: 70%;
    position: relative;
    overflow: hidden;
    background-image: url("/assets/img/slide-2.png");
    background-size: cover;
    background-position: center;
    box-shadow: inset -20px 0 40px rgba(0, 0, 0, .18);
}

.login-left::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, .35);
}

.login-right {
    width: 30%;
    min-width: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: transparent;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    padding: 26px 22px;
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .12);
}

.login-button-box {
    border: 1px solid rgba(0, 0, 0, .08);
    background: rgba(13, 110, 253, .04);
    border-radius: 14px;
    padding: 14px;
}

.login-safe-text {
    margin-top: 10px;
    text-align: center;
    font-weight: 800;
    color: #dc3545;
}

@media (max-width: 991px) {
    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
        min-width: unset;
    }
}

/* =========================
   REPORT PAGE
========================= */
.report-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
}

@media (max-width: 992px) {
    .report-split {
        grid-template-columns: 1fr;
    }
}

#pResults .list-group-item {
    padding: 10px 12px;
}

/* ===== Help carousel (Reports left) ===== */
.help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.help-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-counter {
    font-weight: 900;
    color: #6c757d;
    font-size: 12px;
    letter-spacing: .4px;
}

.help-carousel {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(13, 110, 253, .06), rgba(255, 255, 255, 1));
    padding: 22px 14px 38px 14px;
    /* alul hely a golyóknak */
    position: relative;
}

.help-slide {
    min-height: 200px;
}

.help-title {
    font-weight: 900;
    font-size: 18px;
    margin-bottom: 6px;
    color: #111827;
}

.help-indicators {
    margin-bottom: 0;
}

.help-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    opacity: .35;
}

.help-indicators .active {
    opacity: 1;
}

.help-arrow {
    width: 12%;
    opacity: 1;
}

.help-arrow .carousel-control-prev-icon,
.help-arrow .carousel-control-next-icon {
    filter: none;
}

.help-hint {
    opacity: .9;
}

/* ===== Reports: left help text styling ===== */
.report-help .report-help-title {
    font-weight: 900;
    font-size: 15px;
    margin-bottom: 6px;
    color: #111827;
}

.report-help .report-help-section p {
    margin-bottom: 8px;
}

.report-help ul {
    padding-left: 18px;
}