/* Üye Rapor Paneli – #000 / #ede4da tema */
:root {
    --bg-page: #ede4da;
    --bg-card: #e5ddd3;
    --bg-input: #ddd4ca;
    --border: #c9bfb4;
    --text: #000;
    --text-muted: #3d3833;
    --accent: #000;
    --accent-hover: #333;
    --success: #1a6b1a;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    overflow-x: hidden;
    margin: 0;
    width: 100%;
    max-width: 100vw;
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
@media (max-width: 480px) {
    .site-header { padding: 0.5rem 0.75rem; }
    .logo-img { height: 28px; }
    .nav-link { padding: 0.4rem 0.6rem; font-size: 0.875rem; }
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
}

.logo-img {
    display: block;
    height: 32px;
    width: auto;
    color: var(--text);
}

.logo:hover .logo-img {
    opacity: 0.85;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-input);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.08);
}
.nav-logout { margin-left: auto; }

/* Main */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 1.5rem 1rem;
    min-width: 0;
}
@media (max-width: 768px) {
    .main {
        padding: 1rem 0.75rem;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
}

/* Page title */
.page-title {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}
@media (max-width: 480px) {
    .page-title { font-size: 1.25rem; margin-bottom: 1rem; }
}

/* Cards grid (dashboard) */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 380px) {
    .cards { grid-template-columns: 1fr; }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    min-width: 0;
}

.card-title {
    margin: 0 0 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.card-value {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
    overflow-wrap: break-word;
}
@media (max-width: 480px) {
    .card-value { font-size: 1.5rem; }
}

/* Section */
.section {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}

.section-title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 900px) {
    .charts-row { grid-template-columns: 1fr; }
}
.chart-section { margin-bottom: 0; }
.chart-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 260px;
    box-shadow: var(--shadow);
}
.chart-wrap--center { display: flex; justify-content: center; align-items: center; }
@media (max-width: 480px) {
    .chart-wrap { min-height: 220px; padding: 0.75rem; max-width: 100%; }
}

/* Table */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

table.data-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

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

table.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-input);
    white-space: nowrap;
}

table.data-table tr:last-child td {
    border-bottom: none;
}

table.data-table tr:hover td {
    background: rgba(0, 0, 0, 0.04);
}

table.data-table td {
    vertical-align: middle;
}

/* Responsive: küçük ekranda tablo yerine kart listesi */
@media (max-width: 768px) {
    .table-wrap {
        overflow-x: visible;
    }

    .table-wrap table.data-table {
        display: block;
        width: 100%;
        table-layout: auto;
    }

    .table-wrap table.data-table thead {
        display: none;
    }

    .table-wrap table.data-table tbody {
        display: block;
        width: 100%;
    }

    .table-wrap table.data-table tr {
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        box-sizing: border-box;
    }

    .table-wrap table.data-table tr:hover td {
        background: transparent;
    }

    .table-wrap table.data-table td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.35rem 0;
        border-bottom: none;
        width: 100%;
        box-sizing: border-box;
    }

    .table-wrap table.data-table td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .table-wrap table.data-table td[data-label=""]::before {
        display: none;
    }

    .table-wrap table.data-table tr td.empty-state {
        display: block;
        text-align: center;
        padding: 1rem;
    }

    .table-wrap table.data-table td:last-child {
        border-bottom: none;
    }
}

/* Forms */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1 1 120px;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 0;
    box-sizing: border-box;
}
@media (max-width: 600px) {
    .form-row { flex-direction: column; align-items: stretch; }
    .form-group { flex: 1 1 auto; }
    .form-row .btn { width: 100%; }
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: #ede4da;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.8125rem;
}

.btn-danger {
    background: #b33;
    color: #fff;
}

.btn-danger:hover {
    background: #c44;
}

.form-inline {
    display: inline;
}

.form-inline button {
    cursor: pointer;
}

.td-action {
    white-space: nowrap;
}

/* Flash mesajları */
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.flash--success {
    background: rgba(26, 107, 26, 0.15);
    color: var(--success);
    border: 1px solid rgba(26, 107, 26, 0.3);
}

.flash--error {
    background: rgba(180, 60, 60, 0.15);
    color: #b33;
    border: 1px solid rgba(180, 60, 60, 0.3);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.filters-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .filters-bar { padding: 0.75rem; width: 100%; max-width: 100%; }
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.5rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-right: auto;
}

.pagination-links {
    display: flex;
    gap: 0.25rem;
}

.pagination-links a,
.pagination-links span {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    background: var(--bg-input);
    border: 1px solid var(--border);
}

.pagination-links a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ede4da;
}

.pagination-links span.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
@media (max-width: 480px) {
    .pagination { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .pagination-info { margin-right: 0; text-align: center; }
    .pagination-links { justify-content: center; flex-wrap: wrap; }
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Info box (paket açıklamaları) */
.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.info-box-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.info-box-desc {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.package-legend {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text);
}
.package-legend li {
    margin-bottom: 0.35rem;
}
.package-legend li:last-child {
    margin-bottom: 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Badge for status */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    background: var(--bg-input);
}

.badge-active {
    background: rgba(63, 185, 80, 0.2);
    color: var(--success);
}
