/* Zavier theme-owned stylesheet; visual tokens are finalized by css/theme.css. */
/* Shared shell, cards and typography: statistics-anggota.css. */
.visitor-statistics-page .visit-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) auto;
    align-items: end;
    gap: 14px;
    padding: 24px;
    margin-bottom: 24px;
    border: none;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.visit-filter-field {
    min-width: 0;
}

.visit-filter label {
    display: block;
    margin: 0 0 6px;
    font-size: .78rem;
    font-weight: 600;
}

.visit-filter input,
.visit-filter select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #b9cde1;
    border-radius: 10px;
    background: #fff;
    color: #172b43;
    font: inherit;
    font-size: .86rem;
}

.visit-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #1f5fae;
    border-radius: 10px;
    background: #1f5fae;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
}

.visit-filter button:hover {
    background: #16477f;
}

.visit-filter button svg {
    width: 18px;
    height: 18px;
}

.visit-filter :focus-visible,
.visit-data summary:focus-visible {
    outline: 3px solid #78a6d4;
    outline-offset: 2px;
}

.visitor-statistics-page .visit-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    grid-column: 1/-1;
    font-size: .75rem;
}

.visit-presets a {
    color: #1f5fae;
    text-underline-offset: 3px;
}

.visit-presets span {
    margin-left: auto;
    color: #64748b;
}

.visit-period {
    margin: 0 0 12px;
    font-size: .84rem;
    font-weight: 600;
}

.visit-period span {
    color: #64748b;
    font-weight: 400;
}

.visit-message,
.visit-chart-fallback {
    padding: 14px 16px;
    border: 1px solid #e2d1aa;
    border-radius: 10px;
    background: #fff9ed;
    color: #6d5220;
}

.visit-chart-fallback[hidden] {
    display: none;
}

.visit-insight,
.visit-coverage {
    margin: 0 0 16px;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.65;
}

.visit-insight strong,
.visit-coverage strong {
    color: #16477f;
}

.visit-chart {
    position: relative;
    min-width: 0;
    height: 320px;
}

.visit-chart-donut {
    height: 260px;
}

.visit-chart-bars {
    height: 360px;
    overflow-y: auto;
}

.visit-chart canvas {
    max-width: 100%;
}

.visit-data {
    margin-top: 16px;
    border-top: 1px solid #e6edf5;
}

.visit-data summary {
    cursor: pointer;
    padding: 12px 0;
    color: #1f5fae;
    font-size: .8rem;
    font-weight: 600;
}

.visit-table-wrap {
    overflow: auto;
    max-height: 360px;
}

.visit-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: .76rem;
}

.visit-table-wrap th,
.visit-table-wrap td {
    padding: 10px 8px;
    border-bottom: 1px solid #e6edf5;
    text-align: right;
    white-space: nowrap;
}

.visit-table-wrap th:first-child {
    text-align: left;
    white-space: normal;
    min-width: 110px;
}

.visit-table-wrap thead th {
    position: sticky;
    top: 0;
    background: #eaf2fb;
    font-weight: 600;
}

.visit-table-wrap tbody th {
    font-weight: 400;
}

.visit-table-wrap caption {
    caption-side: bottom;
    padding: 8px;
    font-size: .7rem;
    color: #64748b;
}

.visit-notes ul {
    padding-left: 18px;
    margin: 0;
    color: #64748b;
    font-size: .83rem;
    line-height: 1.8;
}

.visit-notes li+li {
    margin-top: 12px;
}

.visitor-statistics-page .member-empty h2 {
    font-size: 1.1rem;
    margin: 14px 0 6px;
}

.visitor-statistics-page .member-empty p {
    max-width: 370px;
    margin: 0;
    font-size: .85rem;
}

@media(max-width:992px) {
    .visitor-statistics-page .visit-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:768px) {
    .visitor-statistics-page .visit-filter {
        margin: 0 0 16px;
        border-radius: 10px;
        border: 1px solid #e8eef4;
        gap: 14px;
        padding: 16px;
    }

    .visit-filter input,
    .visit-filter select {
        min-height: 48px;
        font-size: 16px;
        line-height: 1.5;
    }

    .visit-filter input[type="date"] {
        appearance: none;
        -webkit-appearance: none;
    }

    .visit-filter input[type="date"]::-webkit-date-and-time-value {
        min-height: 1.5em;
        text-align: left;
    }

    .visit-filter input[type="date"]::-webkit-datetime-edit {
        min-width: 0;
        padding: 0;
    }

    .visit-filter button {
        width: 100%;
        min-height: 48px;
    }

    .visitor-statistics-page .visit-presets {
        gap: 8px;
        padding-top: 14px;
        border-top: 1px solid var(--member-border);
    }

    .visit-presets a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 8px 12px;
        border: 1px solid var(--member-border);
        border-radius: 10px;
        background: var(--member-blue-soft);
        font-size: .78rem;
        text-decoration: none;
    }

    .visit-presets span {
        margin: 4px 0 0;
        flex-basis: 100%;
        font-size: .72rem;
    }

    .visitor-statistics-page .visit-period {
        margin: 0 14px 12px;
        line-height: 1.6;
    }

    .visitor-statistics-page .visit-message,
    .visitor-statistics-page .visit-chart-fallback {
        margin: 0 0 12px;
    }

    .visitor-statistics-page .member-statistics-shell>.member-panel {
        margin: 0 0 12px;
    }

    .visit-chart-trend {
        height: 280px;
    }
}

@media(max-width:575px) {
    .visitor-statistics-page .visit-filter {
        grid-template-columns: minmax(0, 1fr);
    }

    .visit-period span {
        display: block;
    }
}

@media print {

    .visit-filter,
    .visit-chart {
        display: none !important;
    }

    .visit-data>div {
        display: block !important;
    }

    .visit-table-wrap {
        max-height: none;
        overflow: visible;
    }

    .visit-data summary {
        display: none;
    }

    .visit-table-wrap thead th {
        position: static;
    }
}
