:root {
    --primary: #e11d2e;
    --primary-dark: #b51222;
    --primary-soft: #fff1f2;
    --background: #f6f8fb;
    --surface: #ffffff;
    --sidebar: #ffffff;
    --sidebar-text: #475569;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at 100% 0, rgb(225 29 46 / 4%), transparent 24rem),
        var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-layout {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 260px;
    padding: 22px 16px;
    border-right: 1px solid #e2e8f0;
    background: var(--sidebar);
    box-shadow: 8px 0 28px rgb(15 23 42 / 4%);
    color: var(--text);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 25px;
    color: inherit;
    text-decoration: none;
}

.sidebar-brand-logo {
    display: block;
    width: 138px;
    max-height: 52px;
    object-fit: contain;
    object-position: left center;
}

.sidebar-brand-subtitle {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
}

.sidebar-brand small {
    display: block;
    margin-top: 3px;
    color: #9ca3af;
}

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    place-items: center;
    background: var(--primary);
    font-weight: bold;
}

.sidebar-menu {
    display: grid;
    gap: 7px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border-radius: 10px;
    color: var(--sidebar-text);
    text-decoration: none;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary);
    color: white;
}

.menu-icon {
    width: 22px;
    text-align: center;
}

.main-content {
    min-height: calc(100vh - 60px);
    margin-left: 260px;
    padding: 30px;
}

.mobile-header {
    display: none;
}

.mobile-brand-logo {
    width: 132px;
    height: 40px;
    object-fit: contain;
    object-position: left center;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-card,
.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 5px 20px rgb(15 23 42 / 5%);
}

.dashboard-card {
    padding: 22px;
    border-left: 5px solid var(--primary);
}

.dashboard-card.success {
    border-left-color: var(--success);
}

.dashboard-card.warning {
    border-left-color: var(--warning);
}

.dashboard-card.danger {
    border-left-color: var(--danger);
}

.card-label {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
}

.card-number {
    font-size: 32px;
}

.panel {
    padding: 20px;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
}

.button.primary {
    background: var(--primary);
    color: white;
}

.button.primary:hover {
    background: var(--primary-dark);
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 13px;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge.active {
    background: #d1fae5;
    color: #065f46;
}

.badge.passive {
    background: #fee2e2;
    color: #991b1b;
}

.empty-state,
.error-page {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
}

.footer {
    margin-left: 260px;
    padding: 20px 30px;
    color: var(--muted);
    font-size: 13px;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .mobile-header {
        position: sticky;
        top: 0;
        z-index: 30;
        display: flex;
        min-height: 60px;
        align-items: center;
        gap: 15px;
        padding: 10px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
    }

    .menu-button {
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 9px;
        background: var(--primary);
        color: white;
        font-size: 22px;
    }

    .sidebar {
        width: min(82vw, 290px);
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.visible {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        background: rgb(0 0 0 / 50%);
    }

    .main-content,
    .footer {
        margin-left: 0;
    }

    .main-content {
        padding: 20px 15px;
    }

    .footer {
        padding: 18px 15px;
    }
}

@media (max-width: 620px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-header .button {
        width: 100%;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 14px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 10px;
    }

    td {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 10px;
        padding: 9px 5px;
        border: 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: bold;
    }
}

.login-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 8% 5%, rgb(225 29 46 / 14%), transparent 30rem),
        radial-gradient(circle at 92% 88%, rgb(148 163 184 / 15%), transparent 28rem),
        linear-gradient(145deg, #ffffff, #f4f6fa);
}

.login-container {
    display: grid;
    min-height: 100vh;
    padding: 20px;
    place-items: center;
}

.login-card {
    width: min(100%, 430px);
    padding: 32px;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 20px;
    background: rgb(255 255 255 / 98%);
    box-shadow: 0 24px 70px rgb(15 23 42 / 14%);
}

.setup-card {
    width: min(100%, 560px);
}

.login-logo {
    display: block;
    width: min(100%, 250px);
    height: 84px;
    margin: 0 auto 18px;
    object-fit: contain;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    color: #172033;
    font-size: 24px;
}

.login-description {
    margin: 10px 0 25px;
    color: var(--muted);
    text-align: center;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(225 29 46 / 12%);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.login-button {
    width: 100%;
    min-height: 50px;
}

.alert {
    margin: 20px 0;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 14px;
}

.alert.danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
}

.sidebar-user {
    position: absolute;
    right: 16px;
    bottom: 20px;
    left: 16px;
    padding: 14px;
    border-top: 1px solid #e2e8f0;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
}

.sidebar-user small {
    margin-top: 4px;
    color: #64748b;
}

.logout-button {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    background: transparent;
    color: #be123c;
    cursor: pointer;
}

.logout-button:hover {
    background: #fff1f2;
    color: #9f1239;
}

.session-guard[hidden],
.session-guard [hidden] {
    display: none !important;
}

.session-guard {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    padding: 20px;
    place-items: center;
}

.session-guard-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 58%);
    backdrop-filter: blur(3px);
}

.session-guard-dialog {
    position: relative;
    width: min(100%, 470px);
    padding: 28px;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgb(15 23 42 / 28%);
    text-align: center;
}

.session-guard-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 15px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 24px;
}

.session-guard-dialog h2 {
    margin: 0 0 9px;
    color: #172033;
    font-size: 22px;
}

.session-guard-dialog p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.session-guard-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.session-guard-actions form {
    margin: 0;
}

@media (max-width: 520px) {
    .session-guard-dialog {
        padding: 24px 18px;
    }

    .session-guard-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .session-guard-actions .button,
    .session-guard-actions form {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .login-card {
        padding: 25px 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}


.form-panel {
    max-width: 900px;
}

.form-group textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    resize: vertical;
}

.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(79 70 229 / 15%);
}

.form-note {
    margin: 0 0 20px;
    padding: 12px;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
}

.form-buttons,
.table-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

.button.small {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 13px;
}

.button.secondary {
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
}

.button.danger {
    background: var(--danger);
    color: white;
}

.button.success {
    background: var(--success);
    color: white;
}

.form-group select {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
}

.checkbox-group {
    display: flex;
    align-items: center;
    padding-top: 25px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
}

.error-list {
    margin: 0;
    padding-left: 20px;
}

.qr-print-area {
    display: flex;
    justify-content: center;
}

.qr-card {
    width: min(100%, 540px);
    padding: 30px;
    border: 3px solid #111827;
    border-radius: 16px;
    background: white;
    text-align: center;
}

.qr-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
}

.qr-site {
    margin-top: 8px;
    color: var(--muted);
    font-size: 18px;
}

.qr-image {
    display: block;
    width: min(100%, 420px);
    height: auto;
    margin: 20px auto;
}

.qr-card h2 {
    margin: 12px 0;
    font-size: 25px;
}

.qr-point-code {
    margin-bottom: 18px;
    font-size: 17px;
}

.qr-instruction {
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

@media print {
    .sidebar,
    .mobile-header,
    .footer,
    .no-print {
        display: none !important;
    }

    body,
    .main-content {
        margin: 0;
        padding: 0;
        background: white;
    }

    .qr-print-area {
        min-height: 100vh;
        align-items: center;
    }

    .qr-card {
        box-shadow: none;
        break-inside: avoid;
    }
}

.user-password-link {
    display: block;
    margin-top: 12px;
    color: #c7d2fe;
    font-size: 13px;
    text-decoration: none;
}

.user-password-link:hover {
    color: white;
    text-decoration: underline;
}

.alert.warning {
    background: #fef3c7;
    color: #92400e;
}

.table-note {
    display: block;
    margin-top: 5px;
    color: #d97706;
    font-size: 12px;
}

.badge.role {
    background: #e0e7ff;
    color: #3730a3;
}

/* =========================================================
   KULLANICILAR MODULU
   Liste, filtre, işlem düğmeleri ve mobil kart görünümü
   ========================================================= */

body .main-content .users-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
}

body .main-content .users-toolbar h1 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: clamp(26px, 2.2vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

body .main-content .users-toolbar p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

body .main-content .users-toolbar > .button {
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgb(79 70 229 / 16%);
    font-size: 14px;
    font-weight: 700;
}

body .main-content .users-filter-card {
    position: relative;
    padding: 14px;
    margin: 0 0 16px;
    overflow: hidden;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgb(15 23 42 / 4%);
}

body .main-content .users-filter-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #818cf8 62%, #c7d2fe);
    content: "";
}

body .main-content .users-filter-grid.users-filter-grid-compact {
    display: grid;
    grid-template-columns: minmax(250px, 2.1fr) repeat(3, minmax(145px, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

body .main-content .users-filter-grid .form-group {
    min-width: 0;
    margin: 0;
}

body .main-content .users-filter-grid label {
    display: block;
    margin: 0 0 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body .main-content .users-filter-grid input,
body .main-content .users-filter-grid select {
    width: 100%;
    min-height: 40px;
    padding: 7px 11px;
    border: 1px solid #d7dee9;
    border-radius: 9px;
    outline: 0;
    background: #f8fafc;
    color: #172033;
    font-size: 13px;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

body .main-content .users-filter-grid input::placeholder {
    color: #94a3b8;
}

body .main-content .users-filter-grid input:hover,
body .main-content .users-filter-grid select:hover {
    border-color: #b8c2d1;
    background: #fff;
}

body .main-content .users-filter-grid input:focus,
body .main-content .users-filter-grid select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgb(79 70 229 / 12%);
}

body .main-content .users-filter-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: nowrap;
}

body .main-content .users-filter-actions .button {
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

body .main-content .users-filter-actions .button:not(.primary) {
    border: 1px solid #d7dee9;
    background: #fff;
    color: #475569;
}

body .main-content .users-filter-actions .button:not(.primary):hover {
    border-color: #b8c2d1;
    background: #f8fafc;
    color: #0f172a;
}

body .main-content .users-card {
    padding: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #dfe5ee;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 28px rgb(15 23 42 / 6%);
}

body .main-content .users-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 18px;
    border-bottom: 1px solid #e8ecf2;
    background: linear-gradient(180deg, #fff, #fbfcfe);
}

body .main-content .users-list-heading h2 {
    margin: 0 0 3px;
    color: #172033;
    font-size: 16px;
    line-height: 1.3;
}

body .main-content .users-list-heading p {
    margin: 0;
    color: #7b8494;
    font-size: 12px;
}

body .main-content .users-result-count {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #dfe4ff;
    border-radius: 999px;
    background: #f2f3ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

body .main-content .users-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body .main-content .users-table {
    width: 100%;
    min-width: 990px;
    border-spacing: 0;
    border-collapse: separate;
    background: #fff;
    font-size: 13px;
}

body .main-content .users-table th,
body .main-content .users-table td {
    padding: 12px 11px;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    vertical-align: middle;
}

body .main-content .users-table th {
    background: #f7f9fc;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

body .main-content .users-table th:first-child,
body .main-content .users-table td:first-child {
    padding-left: 18px;
}

body .main-content .users-table th:last-child,
body .main-content .users-table td:last-child {
    padding-right: 18px;
}

body .main-content .users-table tbody tr {
    transition: background-color 140ms ease;
}

body .main-content .users-table tbody tr:hover {
    background: #fafbff;
}

body .main-content .users-table tbody tr:last-child td {
    border-bottom: 0;
}

body .main-content .users-table th:nth-child(1) { min-width: 215px; }
body .main-content .users-table th:nth-child(2) { min-width: 120px; }
body .main-content .users-table th:nth-child(3) { min-width: 100px; }
body .main-content .users-table th:nth-child(4) { min-width: 145px; }
body .main-content .users-table th:nth-child(5) { min-width: 145px; }
body .main-content .users-table th:nth-child(6) { min-width: 82px; }
body .main-content .users-table th:nth-child(7) { min-width: 112px; }
body .main-content .users-table th:nth-child(8) { min-width: 205px; }

body .main-content .users-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body .main-content .users-avatar {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9dcff;
    border-radius: 11px;
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
    color: #4338ca;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

body .main-content .users-person-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

body .main-content .users-person-info strong {
    max-width: 180px;
    overflow: hidden;
    color: #172033;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body .main-content .users-current-label,
body .main-content .users-password-note {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
}

body .main-content .users-current-label {
    color: #4f46e5;
}

body .main-content .users-password-note {
    color: #b45309;
}

body .main-content .users-muted {
    color: #7b8494;
    font-size: 11px;
    line-height: 1.45;
}

body .main-content .users-badge {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

body .main-content .users-badge::before {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: .75;
}

body .main-content .users-badge.active {
    border-color: #bcebd3;
    background: #ecfdf5;
    color: #047857;
}

body .main-content .users-badge.passive {
    border-color: #fecaca;
    background: #fff1f2;
    color: #be123c;
}

body .main-content .users-badge.warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #a16207;
}

body .main-content .users-badge.role {
    border-color: #d9dcff;
    background: #f2f3ff;
    color: #4338ca;
}

body .main-content .users-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

body .main-content .users-actions form {
    margin: 0;
}

body .main-content .users-actions .button {
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid #dbe1ea;
    border-radius: 8px;
    box-shadow: none;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

body .main-content .users-actions .users-button-edit {
    border-color: #d9dcff;
    background: #f7f7ff;
    color: #4338ca;
}

body .main-content .users-actions .users-button-edit:hover {
    border-color: #aeb4ff;
    background: #ededff;
}

body .main-content .users-actions .users-button-warning {
    color: #475569;
}

body .main-content .users-actions .users-button-warning:hover {
    border-color: #f2ca7c;
    background: #fff9eb;
    color: #92400e;
}

body .main-content .users-actions .users-button-danger {
    border-color: #fecaca;
    background: #fff7f7;
    color: #b91c1c;
}

body .main-content .users-actions .users-button-danger:hover {
    border-color: #fca5a5;
    background: #fee2e2;
}

body .main-content .users-empty-row:hover {
    background: #fff;
}

body .main-content .users-empty {
    padding: 42px 18px;
    color: #7b8494;
    font-size: 13px;
    text-align: center;
}

body .main-content .users-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    margin: 0;
    border-top: 1px solid #e8ecf2;
    background: #fbfcfe;
}

body .main-content .users-pagination-links {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

body .main-content .users-page-link {
    display: inline-flex;
    min-width: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border: 1px solid #dbe1ea;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

body .main-content .users-page-link:hover {
    border-color: #bcc5d3;
    background: #f8fafc;
    color: #172033;
}

body .main-content .users-page-link.current {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 5px 12px rgb(79 70 229 / 18%);
}

body .users-confirm-overlay {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgb(15 23 42 / 70%);
    backdrop-filter: blur(3px);
}

body .users-confirm-box {
    width: min(100%, 460px);
    padding: 24px;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 28px 80px rgb(0 0 0 / 30%);
}

body .users-confirm-icon {
    display: flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 13px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 22px;
    font-weight: 900;
}

body .users-confirm-box h2 {
    margin: 0 0 9px;
    color: #172033;
    font-size: 21px;
}

body .users-confirm-box p {
    margin: 0 0 11px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

body .users-confirm-person {
    padding: 12px 13px;
    margin: 14px 0;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff7f7;
}

body .users-confirm-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
    flex-wrap: wrap;
}

body .users-confirm-actions form {
    margin: 0;
}

body .users-confirm-actions .button {
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
}

body .users-confirm-actions .users-button-danger {
    border: 1px solid #dc2626;
    background: #dc2626;
    color: #fff;
}

body .users-confirm-actions .users-button-danger:hover {
    border-color: #b91c1c;
    background: #b91c1c;
}

body .main-content .users-filter-grid input:focus-visible,
body .main-content .users-filter-grid select:focus-visible,
body .main-content .users-actions .button:focus-visible,
body .main-content .users-page-link:focus-visible,
body .users-confirm-actions .button:focus-visible {
    outline: 3px solid rgb(79 70 229 / 22%);
    outline-offset: 2px;
}

@media (max-width: 1240px) {
    body .main-content .users-filter-grid.users-filter-grid-compact {
        grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(155px, 1fr));
    }

    body .main-content .users-filter-actions {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    body .main-content .users-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    body .main-content .users-toolbar > .button {
        width: 100%;
    }

    body .main-content .users-filter-card {
        padding: 14px;
        border-radius: 12px;
    }

    body .main-content .users-filter-grid.users-filter-grid-compact {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    body .main-content .users-filter-grid .users-search-field,
    body .main-content .users-filter-actions {
        grid-column: 1 / -1;
    }

    body .main-content .users-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    body .main-content .users-filter-actions .button {
        width: 100%;
    }

    body .main-content .users-card {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body .main-content .users-list-heading {
        padding: 14px;
        border: 1px solid #dfe5ee;
        border-radius: 12px;
        background: #fff;
    }

    body .main-content .users-table-wrap {
        overflow: visible;
    }

    body .main-content .users-table,
    body .main-content .users-table tbody,
    body .main-content .users-table tr,
    body .main-content .users-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    body .main-content .users-table thead {
        display: none;
    }

    body .main-content .users-table tbody tr {
        padding: 7px 13px;
        margin: 11px 0 0;
        overflow: hidden;
        border: 1px solid #dfe5ee;
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 5px 16px rgb(15 23 42 / 5%);
    }

    body .main-content .users-table tbody tr:hover {
        background: #fff;
    }

    body .main-content .users-table td,
    body .main-content .users-table td:first-child,
    body .main-content .users-table td:last-child {
        display: grid;
        grid-template-columns: 105px minmax(0, 1fr);
        gap: 10px;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid #edf0f4;
        overflow-wrap: anywhere;
    }

    body .main-content .users-table td::before {
        color: #7b8494;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .035em;
        text-transform: uppercase;
        content: attr(data-label);
    }

    body .main-content .users-table td:first-child {
        display: block;
        padding: 12px 0;
    }

    body .main-content .users-table td:first-child::before,
    body .main-content .users-table td:last-child::before {
        display: none;
    }

    body .main-content .users-table td:last-child {
        display: block;
        padding: 11px 0 7px;
        border-bottom: 0;
    }

    body .main-content .users-person-info strong {
        max-width: none;
        font-size: 14px;
    }

    body .main-content .users-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    body .main-content .users-actions > :last-child {
        grid-column: 1 / -1;
    }

    body .main-content .users-actions form,
    body .main-content .users-actions .button {
        width: 100%;
    }

    body .main-content .users-actions .button {
        min-height: 38px;
        justify-content: center;
    }

    body .main-content .users-pagination {
        align-items: stretch;
        flex-direction: column;
        padding: 13px 2px;
        border-top: 0;
        background: transparent;
    }

    body .main-content .users-pagination-links {
        justify-content: center;
    }

    body .main-content .users-empty-row {
        padding: 0;
    }

    body .main-content .users-empty-row .users-empty {
        display: block;
        padding: 30px 14px;
        border: 0;
    }

    body .main-content .users-empty-row .users-empty::before {
        display: none;
    }

    body .users-confirm-box {
        padding: 20px;
    }

    body .users-confirm-actions,
    body .users-confirm-actions form,
    body .users-confirm-actions .button {
        width: 100%;
    }
}

@media (max-width: 460px) {
    body .main-content .users-filter-grid.users-filter-grid-compact {
        grid-template-columns: 1fr;
    }

    body .main-content .users-filter-grid .users-search-field,
    body .main-content .users-filter-actions {
        grid-column: auto;
    }

    body .main-content .users-filter-actions {
        grid-template-columns: 1fr;
    }

    body .main-content .users-list-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    body .main-content .users-table td,
    body .main-content .users-table td:first-child,
    body .main-content .users-table td:last-child {
        grid-template-columns: 92px minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    body .main-content .users-table tbody tr,
    body .main-content .users-actions .button,
    body .main-content .users-filter-grid input,
    body .main-content .users-filter-grid select {
        transition: none;
    }
} 
/* =========================================================
   Rol bazlı sidebar menüsü
   ========================================================= */

.sidebar-brand {
    color: inherit;
    text-decoration: none;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-menu {
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

.sidebar-menu-section {
    display: grid;
    gap: 5px;
    margin-bottom: 18px;
}

.sidebar-menu-section + .sidebar-menu-section {
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.sidebar-menu-title {
    display: block;
    padding: 0 14px 5px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-menu-section a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.sidebar-menu-section a:hover {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-menu-section a.active {
    border-color: rgba(129, 140, 248, 0.38);
    background: linear-gradient(
        135deg,
        #4f46e5,
        #5b4df1
    );
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.24);
}

.sidebar-menu-section .menu-icon {
    display: grid;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.10);
    font-size: 14px;
    line-height: 1;
}

.sidebar-menu-section a.active .menu-icon {
    background: rgba(255, 255, 255, 0.16);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sidebar-user-info strong {
    overflow: hidden;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-username {
    overflow: hidden;
    color: #94a3b8;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-password-link {
    display: inline-flex;
    margin-top: 7px;
    color: #c7d2fe;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.user-password-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .sidebar-menu-section {
        margin-bottom: 14px;
    }

    .sidebar-menu-section + .sidebar-menu-section {
        padding-top: 13px;
    }

    .sidebar-menu-section a {
        min-height: 48px;
        font-size: 15px;
    }
}
/* =========================================================
   Sidebar yükseklik ve kullanıcı alanı düzeltmesi
   ========================================================= */

.sidebar {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
}

/*
 * Yalnızca menü bölümü kaydırılır.
 * Marka ve kullanıcı bilgileri yerinde kalır.
 */
.sidebar-menu {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
    padding-bottom: 14px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #334155;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/*
 * Eski position:absolute özelliğini etkisiz hale getirir.
 */
.sidebar-user {
    position: static;
    right: auto;
    bottom: auto;
    left: auto;
    flex-shrink: 0;
    padding: 14px 10px 4px;
    margin: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: var(--sidebar);
}

/*
 * Düşük yüksekliğe sahip masaüstü ekranlarında
 * kullanıcı alanını biraz daha kompakt gösterir.
 */
@media (max-height: 760px) and (min-width: 1101px) {
    .sidebar {
        padding-top: 15px;
        padding-bottom: 12px;
    }

    .sidebar-brand {
        padding-bottom: 15px;
    }

    .sidebar-menu-section {
        margin-bottom: 11px;
    }

    .sidebar-menu-section + .sidebar-menu-section {
        padding-top: 10px;
    }

    .sidebar-menu-section a {
        min-height: 40px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .sidebar-user {
        padding-top: 10px;
    }

    .logout-button {
        margin-top: 8px;
        padding: 8px;
    }
}
