@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --cx-bg-1: #2b4a91;
    --cx-bg-2: #1a3369;
    --cx-bg-3: #0e1c3f;
    --cx-panel-solid: #1c356b;
    --cx-input-bg: #12244a;
    --cx-panel-border: rgba(255, 255, 255, 0.12);
    --cx-accent: #4fa8e8;
    --cx-accent-deep: #2f5fc4;
    --cx-accent-bright: #7cc4f5;
    --cx-accent-dim: rgba(79, 168, 232, 0.35);
    --cx-sidebar-bg: #101f42;
    --cx-sidebar-bg-2: #0b1730;
    --cx-text: #f3f6fc;
    --cx-text-muted: #9db1d9;
    --cx-danger: #ff6b6b;
    --cx-success: #4ade80;
    --cx-sidebar-w: 258px;
    --cx-sidebar-w-collapsed: 78px;
    --cx-font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --cx-font-display: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--cx-bg-2);
    color: var(--cx-text);
    font-family: var(--cx-font-body);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--cx-accent);
    text-decoration: none;
}

    a:hover {
        color: var(--cx-accent-bright);
    }

/* ---------- Shared background treatment ---------- */

.cx-auth-body {
    background-color: #0a1730;
    background-image:
        radial-gradient(circle at 22% 28%, rgba(255,255,255,0.9) 0, rgba(255,255,255,0.9) 1.4px, transparent 1.6px),
        radial-gradient(circle at 68% 18%, rgba(255,255,255,0.7) 0, rgba(255,255,255,0.7) 1.2px, transparent 1.4px),
        radial-gradient(circle at 85% 62%, rgba(255,255,255,0.8) 0, rgba(255,255,255,0.8) 1.3px, transparent 1.5px),
        radial-gradient(circle at 40% 78%, rgba(255,255,255,0.6) 0, rgba(255,255,255,0.6) 1.1px, transparent 1.3px),
        radial-gradient(circle at 12% 70%, rgba(255,255,255,0.7) 0, rgba(255,255,255,0.7) 1.2px, transparent 1.4px),
        radial-gradient(circle at 92% 90%, rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) 1.1px, transparent 1.3px),
        radial-gradient(circle at 55% 45%, rgba(255,255,255,0.55) 0, rgba(255,255,255,0.55) 1.1px, transparent 1.3px),
        linear-gradient(115deg, rgba(45,212,191,0.10) 0%, transparent 30%, transparent 70%, rgba(79,168,232,0.14) 100%),
        radial-gradient(ellipse 900px 700px at 8% -5%, rgba(124, 196, 245, 0.22), transparent 60%),
        radial-gradient(ellipse 800px 650px at 100% 100%, rgba(47, 95, 196, 0.30), transparent 55%),
        linear-gradient(135deg, #16295c 0%, #0e1c3f 55%, #060d20 100%);
    background-size: 340px 340px, 300px 300px, 380px 380px, 260px 260px, 320px 320px, 300px 300px, 280px 280px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    position: relative;
}

    .cx-auth-body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        background-image:
            linear-gradient(115deg, transparent 48%, rgba(124,196,245,0.05) 49%, rgba(124,196,245,0.05) 50%, transparent 51%),
            linear-gradient(25deg, transparent 48%, rgba(45,212,191,0.05) 49%, rgba(45,212,191,0.05) 50%, transparent 51%);
        background-size: 480px 480px, 520px 520px;
    }

/* ---------- Auth pages (Login / ChangePassword / Error) ---------- */

.cx-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cx-auth-card {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    background: rgba(18, 36, 74, 0.72);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(94, 234, 212, 0.28);
    border-radius: 16px;
    padding: 40px 36px 32px;
    box-shadow: 0 25px 70px rgba(4, 10, 26, 0.6), 0 0 0 1px rgba(56, 224, 196, 0.08), 0 0 50px rgba(45, 212, 191, 0.12);
    text-align: center;
}

.cx-auth-brand {
    width: 150px;
    margin: 4px auto 14px;
}

    .cx-auth-brand img {
        width: 100%;
        display: block;
    }

.cx-auth-brand-text {
    font-family: var(--cx-font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

    .cx-auth-brand-text .cx-accent-word {
        color: var(--cx-accent-bright);
    }

.cx-auth-title {
    font-family: var(--cx-font-display);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: 0.5px;
}

.cx-auth-subtitle {
    color: var(--cx-text-muted);
    font-size: 13.5px;
    margin-bottom: 26px;
}

.cx-form-group {
    text-align: left;
    margin-bottom: 16px;
}

.cx-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--cx-text-muted);
    margin-bottom: 6px;
}

.cx-input {
    width: 100%;
    background: var(--cx-input-bg);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 9px;
    padding: 12px 14px;
    color: var(--cx-text);
    font-size: 14.5px;
    font-family: var(--cx-font-body);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

    .cx-input:focus {
        outline: none;
        border-color: var(--cx-accent);
        box-shadow: 0 0 0 3px rgba(79,168,232,0.25);
    }

    .cx-input::placeholder {
        color: #6c81ab;
    }

.cx-btn-auth-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(90deg, var(--cx-accent-deep), #2dd4bf);
    color: #ffffff;
    border: none;
    border-radius: 9px;
    padding: 13px 18px;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    margin-top: 6px;
    transition: filter .15s ease, transform .05s ease;
    box-shadow: 0 12px 28px rgba(47,95,196,0.4), 0 6px 20px rgba(45,212,191,0.25);
    text-decoration: none;
}

    .cx-btn-auth-primary svg {
        width: 16px;
        height: 16px;
    }

    .cx-btn-auth-primary:hover {
        filter: brightness(1.08);
        color: #ffffff;
    }

    .cx-btn-auth-primary:active {
        transform: translateY(1px);
    }

.cx-alert-error, .cx-alert-success {
    text-align: left;
    font-size: 13px;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.cx-alert-error {
    background: rgba(255,107,107,0.14);
    border-color: rgba(255,107,107,0.4);
    color: #ffc2c2;
}

.cx-alert-success {
    background: rgba(74,222,128,0.14);
    border-color: rgba(74,222,128,0.4);
    color: #c3f8d3;
}

.cx-auth-footer {
    margin-top: 26px;
    font-size: 11.5px;
    color: #6c81ab;
    letter-spacing: 0.4px;
}

.cx-muted {
    color: var(--cx-text-muted);
}

/* ---------- App shell (sidebar + content) ---------- */

.cx-app-shell {
    display: flex;
    min-height: 100vh;
}

.cx-sidebar {
    width: var(--cx-sidebar-w);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--cx-sidebar-bg) 0%, var(--cx-sidebar-bg-2) 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    transition: transform .2s ease, width .2s ease;
    overflow: hidden;
}

.cx-sidebar-header {
    padding: 18px 20px;
}

.cx-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cx-text);
}

    .cx-brand-link:hover {
        color: var(--cx-text);
    }

.cx-brand-mark {
    width: 46px;
    flex-shrink: 0;
    display: block;
}

.cx-brand-text {
    font-family: var(--cx-font-display);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

    .cx-brand-text strong {
        font-weight: 700;
    }

.cx-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--cx-panel-border);
    color: var(--cx-text);
    border-radius: 8px;
    padding: 6px 10px;
    margin: 0 20px 10px;
    cursor: pointer;
    font-size: 16px;
}

.cx-nav {
    list-style: none;
    margin: 0;
    padding: 10px 14px;
    overflow-y: auto;
    flex: 1;
}

.cx-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: 10px;
    color: var(--cx-text-muted);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 2px;
}

.cx-nav-icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.cx-nav-label-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.cx-nav-label {
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .cx-nav-item:hover:not(.cx-nav-disabled) {
        background: rgba(255,255,255,0.06);
        color: var(--cx-text);
    }

    .cx-nav-item.active {
        background: linear-gradient(90deg, var(--cx-accent-deep), var(--cx-accent));
        color: #ffffff;
        font-weight: 600;
        box-shadow: 0 8px 20px rgba(47,95,196,0.35);
    }

    .cx-nav-item.cx-nav-disabled {
        color: #56699a;
        cursor: default;
    }

.cx-nav-badge {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: rgba(255,255,255,0.08);
    color: #9db1d9;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 700;
}

.cx-sidebar-footer {
    padding: 12px 14px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.cx-sidebar-user {
    padding: 6px 14px 12px;
    line-height: 1.3;
}

    .cx-sidebar-user strong {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--cx-text);
    }

    .cx-sidebar-user span {
        font-size: 11.5px;
        color: var(--cx-text-muted);
    }

.cx-footer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--cx-text-muted);
    font-size: 13.5px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--cx-font-body);
    text-align: left;
}

    .cx-footer-item svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .cx-footer-item:hover {
        background: rgba(255,255,255,0.06);
        color: var(--cx-text);
    }

.cx-content {
    margin-left: var(--cx-sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f4f7fc;
    color: #1c2b4a;
    transition: margin-left .2s ease;
}

.cx-main {
    padding: 36px 40px;
    flex: 1;
}

.cx-page-title {
    font-family: var(--cx-font-display);
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #16233f;
}

.cx-page-subtitle {
    color: #5c6c8d;
    font-size: 14px;
    margin: 0 0 24px;
}

.cx-card {
    background: #ffffff;
    border: 1px solid #e3e9f7;
    border-radius: 14px;
    padding: 22px;
    color: #33415c;
    box-shadow: 0 4px 18px rgba(20,40,90,0.06);
}

.cx-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.cx-dashboard-card {
    background: #ffffff;
    border: 1px solid #e3e9f7;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 18px rgba(20,40,90,0.06);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

    .cx-dashboard-card:hover {
        border-color: var(--cx-accent-dim);
        box-shadow: 0 10px 26px rgba(20,40,90,0.12);
        transform: translateY(-2px);
    }

    .cx-dashboard-card h3 {
        margin: 0 0 6px;
        font-size: 14.5px;
        color: var(--cx-accent-deep);
    }

    .cx-dashboard-card p {
        margin: 0;
        font-size: 13px;
        color: #6b7a99;
    }

/* ---------- Home dashboard: stat cards ---------- */

.cx-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.cx-stat-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e3e9f7;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 18px rgba(20,40,90,0.06);
    transition: box-shadow .15s ease, transform .15s ease;
}

    .cx-stat-card:hover {
        box-shadow: 0 10px 26px rgba(20,40,90,0.12);
        transform: translateY(-2px);
    }

.cx-stat-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cx-stat-icon svg {
        width: 21px;
        height: 21px;
    }

    .cx-stat-icon.cx-blue { background: #e9f1fd; color: #2f5fc4; }
    .cx-stat-icon.cx-green { background: #e7f8ee; color: #16a34a; }
    .cx-stat-icon.cx-red { background: #fdeaef; color: #e11d48; }
    .cx-stat-icon.cx-amber { background: #fdf1e0; color: #d97706; }
    .cx-stat-icon.cx-purple { background: #f2ecfd; color: #7c3aed; }

.cx-stat-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.cx-stat-label {
    font-size: 12.5px;
    color: #6b7a99;
    font-weight: 600;
}

.cx-stat-value {
    font-family: var(--cx-font-display);
    font-size: 22px;
    font-weight: 700;
    color: #16233f;
    line-height: 1.15;
}

.cx-stat-delta {
    font-size: 11.5px;
    font-weight: 700;
    color: #16a34a;
}

    .cx-stat-delta.down {
        color: #e11d48;
    }

/* ---------- Home dashboard: chart cards ---------- */

.cx-chart-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}

.cx-chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

    .cx-chart-card-header h3 {
        margin: 0;
        font-size: 15.5px;
        font-weight: 700;
        color: #16233f;
    }

.cx-chart-period {
    border: 1px solid #e1e7f2;
    background: #f7f9fc;
    color: #5c6c8d;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: var(--cx-font-body);
}

.cx-chart-legend {
    display: flex;
    gap: 16px;
    margin: 10px 0 6px;
}

    .cx-chart-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12.5px;
        color: #5c6c8d;
        font-weight: 600;
    }

.cx-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

    .cx-legend-dot.cx-blue { background: #3b82f6; }
    .cx-legend-dot.cx-green { background: #22c55e; }
    .cx-legend-dot.cx-amber { background: #f59e0b; }
    .cx-legend-dot.cx-red { background: #ef4444; }

.cx-chart-canvas-wrap {
    position: relative;
    height: 240px;
}

.cx-donut-card .cx-chart-canvas-wrap {
    height: 160px;
    max-width: 160px;
    margin: 6px auto 0;
}

.cx-donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cx-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

    .cx-donut-center span {
        font-size: 11px;
        color: #8a97b8;
        font-weight: 600;
    }

    .cx-donut-center strong {
        font-family: var(--cx-font-display);
        font-size: 20px;
        color: #16233f;
    }

.cx-donut-legend {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .cx-donut-legend li {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12.5px;
        color: #33415c;
    }

    .cx-donut-legend li b {
        margin-left: auto;
        font-weight: 700;
        color: #16233f;
    }

    .cx-donut-legend li span {
        color: #8a97b8;
        font-size: 11.5px;
    }

/* ---------- Home dashboard: list / activity cards ---------- */

.cx-table-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    align-items: start;
}

.cx-list-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

    .cx-list-card-header h3 {
        margin: 0;
        font-size: 15.5px;
        font-weight: 700;
        color: #16233f;
    }

    .cx-list-card-header a {
        font-size: 12.5px;
        font-weight: 700;
        color: var(--cx-accent-deep);
    }

    .cx-list-card-header a:hover {
        color: var(--cx-accent-bright);
    }

.cx-overdue-badge {
    display: inline-block;
    background: #fdeaef;
    color: #e11d48;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}

.cx-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cx-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 4px;
}

.cx-activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cx-activity-icon svg {
        width: 16px;
        height: 16px;
    }

    .cx-activity-icon.cx-blue { background: #e9f1fd; color: #2f5fc4; }
    .cx-activity-icon.cx-green { background: #e7f8ee; color: #16a34a; }
    .cx-activity-icon.cx-red { background: #fdeaef; color: #e11d48; }
    .cx-activity-icon.cx-purple { background: #f2ecfd; color: #7c3aed; }

.cx-activity-text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #33415c;
}

.cx-activity-time {
    font-size: 11.5px;
    color: #8a97b8;
    flex-shrink: 0;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .cx-chart-row, .cx-table-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .cx-sidebar {
        transform: translateX(-100%);
    }

    .cx-content {
        margin-left: 0;
    }

    .cx-menu-toggle {
        display: inline-block;
    }

    body.cx-nav-open .cx-sidebar {
        transform: translateX(0);
    }
}

/* ---------- Content-area alerts + buttons (light theme) ---------- */

.cx-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.cx-page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cx-page-header-compact {
    justify-content: flex-end;
    margin-bottom: 12px;
}

.cx-alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 13.5px;
    border: 1px solid transparent;
}

.cx-alert-success {
    color: #166534;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.cx-alert-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.cx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--cx-font-body);
}

.cx-btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cx-accent-deep), var(--cx-accent));
    box-shadow: 0 8px 20px rgba(47,95,196,0.28);
}

    .cx-btn-primary:hover {
        filter: brightness(1.05);
        color: #ffffff;
    }

    .cx-btn-primary:disabled {
        opacity: .55;
        cursor: not-allowed;
        filter: none;
    }

.cx-btn-secondary {
    color: #1c2b4a;
    background: #ffffff;
    border-color: #cbd5e1;
}

    .cx-btn-secondary:hover {
        color: #16233f;
        border-color: var(--cx-accent);
    }

    .cx-btn:disabled, .cx-btn-secondary:disabled {
        opacity: .55;
        cursor: not-allowed;
        filter: none;
    }

        .cx-btn-secondary:disabled:hover {
            border-color: #cbd5e1;
            color: #1c2b4a;
        }

.cx-btn-danger {
    color: #dc2626;
    background: #fff1f2;
    border-color: #fca5a5;
}

    .cx-btn-danger:hover {
        color: #fff;
        background: #dc2626;
    }

/* ---------- Invoice list tables (Nakliye / Teminat) ---------- */

.cx-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.cx-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
    color: #1c2b4a;
}

/* Sutun genislikleri (Nakliye/Teminat liste tablolari) - hem <col> hem
   ilgili th/td'ye ayni sinif verilerek genislik + mobilde gizleme tek
   yerden yonetiliyor. */
.cx-col-date { width: 10%; }
.cx-col-invoiceno { width: 15%; }
.cx-col-ref { width: 8%; }
.cx-col-customer { width: 16%; }
.cx-col-vkn { width: 8%; }
.cx-col-vkncheck { width: 7%; }
.cx-col-dekontcheck { width: 7%; }
.cx-col-amount { width: 8%; }
.cx-col-commission { width: 8%; }
.cx-col-guaranteecheck { width: 12%; }
.cx-col-actions { width: 13%; }

    .cx-table thead th {
        background: #16233f;
        color: #fff;
        padding: 10px 8px;
        font-size: 11.5px;
        font-weight: 700;
        text-align: left;
        white-space: nowrap;
    }

        .cx-table thead th:first-child {
            border-top-left-radius: 10px;
        }

        .cx-table thead th:last-child {
            border-top-right-radius: 10px;
        }

        .cx-table thead th.cx-th-narrow {
            white-space: normal;
            line-height: 1.2;
            text-align: center;
        }

    .cx-table tbody td {
        padding: 9px 8px;
        border-bottom: 1px solid #eef2f7;
        background: #fff;
        vertical-align: middle;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cx-table tbody tr:hover td {
        background: #f0f6ff;
    }

    .cx-table tbody tr.cx-row-warning td {
        background: #fff8e1;
    }

        .cx-table tbody tr.cx-row-warning:hover td {
            background: #fef0c7;
        }

    .cx-table tbody tr.cx-row-danger td {
        background: #fdeaea;
        color: #7f1d1d;
        font-weight: 600;
    }

        .cx-table tbody tr.cx-row-danger:hover td {
            background: #fbd8d8;
        }

.cx-nowrap { white-space: nowrap; }
.cx-strong { font-weight: 700; }
.cx-center { text-align: center !important; }
.cx-right { text-align: right !important; }

.cx-customer-cell {
    max-width: 1px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cx-check {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

    .cx-check.ok {
        color: #16a34a;
        background: #dcfce7;
        border: 1px solid #bbf7d0;
    }

    .cx-check.bad {
        color: #dc2626;
        background: #fee2e2;
        border: 1px solid #fecaca;
    }

.cx-row-actions {
    white-space: nowrap;
    text-align: center;
    overflow: visible !important;
}

    .cx-row-actions form {
        display: inline-block;
        margin: 0 0 0 5px;
        vertical-align: middle;
    }

.cx-action-link {
    min-width: 44px;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11.5px;
    text-decoration: none;
    cursor: pointer;
    vertical-align: middle;
}

    .cx-action-link.detail {
        color: var(--cx-accent-deep);
        background: #eff6ff;
        border-color: #93c5fd;
    }

        .cx-action-link.detail:hover {
            color: #fff;
            background: var(--cx-accent-deep);
        }

    .cx-action-link.delete {
        color: #dc2626;
        background: #fff1f2;
        border-color: #fca5a5;
    }

        .cx-action-link.delete:hover {
            color: #fff;
            background: #dc2626;
        }

.cx-table-footer {
    display: flex;
    justify-content: space-between;
    padding: 14px 6px 0;
    color: #5c6c8d;
    font-weight: 700;
    font-size: 13px;
}

.cx-table-empty {
    text-align: center;
    padding: 30px !important;
    color: #7d8aa8;
    font-weight: 600;
}

/* ---------- Invoice detail pages ---------- */

.cx-summary-grid {
    display: grid;
    grid-template-columns: minmax(140px,1fr) minmax(110px,.75fr) minmax(160px,1fr) minmax(160px,1fr) minmax(95px,.6fr) minmax(95px,.6fr);
    gap: 10px;
    margin-bottom: 12px;
}

.cx-summary-box {
    min-width: 0;
    background: #f8fafc;
    border: 1px solid #e3e9f7;
    border-radius: 12px;
    padding: 11px 13px;
}

    .cx-summary-box span {
        display: block;
        color: #7d8aa8;
        font-size: 11px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .cx-summary-box strong {
        display: block;
        color: #16233f;
        font-size: 15.5px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.cx-summary-box-wide {
    grid-column: span 2;
}

.cx-check-actions-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

    .cx-check-actions-row .cx-check-grid {
        flex: 1 1 auto;
        margin-bottom: 0;
        min-width: 0;
    }

    .cx-check-actions-row .cx-page-actions {
        flex: 0 0 auto;
        align-items: center;
    }

.cx-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.cx-check-card {
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 4px 18px rgba(20,40,90,0.06);
    min-height: 52px;
}

    .cx-check-card.ok {
        border: 1px solid #bbf7d0;
    }

    .cx-check-card.bad {
        border: 1px solid #fecaca;
    }

.cx-check-card-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.cx-check-card.ok .cx-check-card-icon {
    color: #16a34a;
    background: #dcfce7;
}

.cx-check-card.bad .cx-check-card-icon {
    color: #dc2626;
    background: #fee2e2;
}

.cx-check-card h3 {
    margin: 0;
    color: #16233f;
    font-size: 15px;
}

.cx-check-card p {
    margin: 3px 0 0;
    color: #5c6c8d;
    line-height: 1.3;
    font-size: 13px;
}

.cx-account-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

    .cx-account-toolbar h2 {
        margin: 0;
        font-size: 16px;
        white-space: nowrap;
        color: #16233f;
        font-family: var(--cx-font-display);
        flex: 0 0 auto;
    }

    .cx-account-toolbar .cx-page-actions {
        flex-wrap: nowrap;
        flex: 0 0 auto;
    }

    .cx-account-toolbar .cx-btn {
        white-space: nowrap;
        padding: 8px 12px;
    }

.cx-account-table {
    overflow-x: auto;
}

.cx-account-head, .cx-account-row {
    display: grid;
    grid-template-columns: 108px 158px 46px 96px minmax(150px,1fr) 92px 92px 128px 34px;
    gap: 6px;
    min-width: 0;
    align-items: center;
}

.cx-account-head-noaction, .cx-account-row-noaction {
    grid-template-columns: 108px 158px 46px 96px minmax(150px,1fr) 92px 92px 128px;
    min-width: 0;
}

.cx-account-head {
    color: #7d8aa8;
    font-size: 10.5px;
    font-weight: 700;
    padding: 0 4px 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.cx-account-row {
    padding: 6px 0;
    border-top: 1px solid #eef2f7;
}

/* Masaustunde her alan (input) grid'e dogrudan katilsin diye sarmalayici
   div "yok" gibi davranir (display:contents). Mobilde (asagida) bu
   sarmalayicilar gercek kutulara donusup her alanin ustune bir etiket
   (data-label) ekler - boylece dar ekranda 9 sutunlu tabloyu yatay
   kaydirmak yerine, her satir okunabilir, etiketli bir karta donusur. */
.cx-fis-field {
    display: contents;
}

.cx-fis-input {
    width: 100%;
    min-width: 0;
    border: 1px solid transparent;
    background: transparent;
    color: #1c2b4a;
    border-radius: 8px;
    padding: 6px 6px;
    font-size: 12.5px;
    font-weight: 650;
    font-family: var(--cx-font-body);
}

    .cx-fis-input:not([readonly]) {
        background: #fffbea;
        border-color: #facc15;
    }

.cx-date-input[readonly] {
    pointer-events: none;
}

.cx-money-input {
    text-align: right;
}

.cx-row-delete {
    width: 34px;
    height: 34px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fff;
    color: #dc2626;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

    .cx-row-delete:hover {
        background: #fef2f2;
    }

.cx-account-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

    .cx-account-total div {
        background: #f8fafc;
        border: 1px solid #e3e9f7;
        border-radius: 12px;
        padding: 10px 12px;
        min-width: 148px;
    }

    .cx-account-total span {
        display: block;
        color: #7d8aa8;
        font-size: 10.5px;
        font-weight: 700;
        margin-bottom: 3px;
    }

    .cx-account-total strong {
        color: #16233f;
    }

#cxBalanceStatus.cx-balance-ok, #cxGiBalanceStatus.cx-balance-ok {
    color: #166534;
    background: #ecfdf5;
    border-color: #bbf7d0;
    font-weight: 700;
}

#cxBalanceStatus.cx-balance-error, #cxGiBalanceStatus.cx-balance-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
    font-weight: 700;
}

.cx-preview-grid {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr);
    gap: 18px;
}

.cx-preview-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cx-preview-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

    .cx-preview-title h2 {
        margin: 0;
        font-size: 17px;
        color: #16233f;
        font-family: var(--cx-font-display);
    }

    .cx-preview-title a {
        color: var(--cx-accent-deep);
        font-weight: 700;
        font-size: 13px;
        text-decoration: none;
    }

.cx-preview-frame {
    width: 100%;
    height: 640px;
    border: 1px solid #e3e9f7;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.cx-preview-frame-short {
    height: 130px;
}

.cx-preview-empty {
    height: 160px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7d8aa8;
    background: #f8fafc;
    font-weight: 600;
    font-size: 13.5px;
}

.cx-file-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

    .cx-detail-grid div {
        min-width: 0;
        background: #f8fafc;
        border: 1px solid #e3e9f7;
        border-radius: 12px;
        padding: 12px 14px;
    }

    .cx-detail-grid .cx-wide {
        grid-column: span 2;
    }

    .cx-detail-grid span {
        display: block;
        color: #7d8aa8;
        font-size: 11px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .cx-detail-grid strong {
        display: block;
        color: #16233f;
        font-size: 15.5px;
        line-height: 1.25;
        word-break: break-word;
    }

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

    .cx-summary-box-wide {
        grid-column: span 2;
    }
}

@media (max-width: 1100px) {
    .cx-preview-grid, .cx-check-grid {
        grid-template-columns: 1fr;
    }

    .cx-page-header, .cx-account-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 760px) {
    .cx-detail-grid {
        grid-template-columns: 1fr;
    }

    .cx-detail-grid .cx-wide {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .cx-summary-grid {
        grid-template-columns: 1fr;
    }

    .cx-summary-box-wide {
        grid-column: auto;
    }
}

/* ---------- Sidebar section labels + Hizli Destek widget ---------- */

.cx-nav-section-label {
    padding: 12px 14px 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #5f7099;
}

.cx-nav li:first-child.cx-nav-section-label {
    padding-top: 2px;
}

/* ---------- Floating "Hızlı Destek" support button (bottom-right, fixed) ---------- */

.cx-fab-support {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #16233f, #0b1730);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    font-family: var(--cx-font-body);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 14px 34px rgba(10,20,45,0.35);
    cursor: pointer;
    transition: filter .15s ease, transform .1s ease;
}

    .cx-fab-support svg {
        width: 18px;
        height: 18px;
        color: #5eead4;
        flex-shrink: 0;
    }

    .cx-fab-support:hover {
        filter: brightness(1.2);
        color: #ffffff;
    }

    .cx-fab-support:active {
        transform: translateY(1px);
    }

@media (max-width: 640px) {
    .cx-fab-support span {
        display: none;
    }

    .cx-fab-support {
        padding: 14px;
        right: 18px;
        bottom: 18px;
    }
}

/* ---------- Sidebar collapse (rail mode) ---------- */

.cx-nav::-webkit-scrollbar {
    width: 6px;
}

.cx-nav::-webkit-scrollbar-track {
    background: transparent;
}

.cx-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
}

.cx-nav::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.cx-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.cx-collapse-icon {
    transition: transform .2s ease;
}

body.cx-sidebar-collapsed .cx-sidebar {
    width: var(--cx-sidebar-w-collapsed);
}

body.cx-sidebar-collapsed .cx-content {
    margin-left: var(--cx-sidebar-w-collapsed);
}

body.cx-sidebar-collapsed .cx-sidebar-header {
    padding: 22px 0;
    display: flex;
    justify-content: center;
}

body.cx-sidebar-collapsed .cx-brand-link {
    gap: 0;
}

body.cx-sidebar-collapsed .cx-brand-text {
    display: none;
}

body.cx-sidebar-collapsed .cx-nav {
    padding: 10px 10px;
}

body.cx-sidebar-collapsed .cx-nav-section-label {
    display: none;
}

body.cx-sidebar-collapsed .cx-nav-item {
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 12px 0;
}

body.cx-sidebar-collapsed .cx-nav-icon {
    margin-top: 0;
}

body.cx-sidebar-collapsed .cx-nav-label-wrap {
    display: none;
}

body.cx-sidebar-collapsed .cx-footer-item {
    justify-content: center;
    padding: 10px 0;
}

body.cx-sidebar-collapsed .cx-footer-label {
    display: none;
}

body.cx-sidebar-collapsed .cx-collapse-icon {
    transform: rotate(180deg);
}

@media (max-width: 900px) {
    body.cx-sidebar-collapsed .cx-sidebar {
        width: var(--cx-sidebar-w);
    }

    body.cx-sidebar-collapsed .cx-content {
        margin-left: 0;
    }
}

/* ---------- Topbar (breadcrumb + user chip + bell) ---------- */

.cx-topbar {
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 36px;
    background: #ffffff;
    border-bottom: 1px solid #e3e9f7;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cx-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #8592ad;
    min-width: 0;
}

    .cx-breadcrumb strong {
        color: #16233f;
        font-weight: 700;
    }

.cx-breadcrumb-sep {
    color: #c3cee3;
}

.cx-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.cx-bell {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f4f7fc;
    border: 1px solid #e3e9f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c6c8d;
    cursor: pointer;
}

    .cx-bell svg {
        width: 18px;
        height: 18px;
    }

    .cx-bell:hover {
        color: var(--cx-accent-deep);
        border-color: var(--cx-accent-dim);
    }

.cx-bell-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cx-danger);
    border: 2px solid #ffffff;
}

.cx-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    border-radius: 999px;
    background: #f4f7fc;
    border: 1px solid #e3e9f7;
}

.cx-user-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cx-accent-deep), var(--cx-accent-bright));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    font-family: var(--cx-font-display);
}

.cx-user-chip-text {
    line-height: 1.25;
    min-width: 0;
}

    .cx-user-chip-text strong {
        display: block;
        font-size: 12.5px;
        color: #16233f;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 160px;
    }

    .cx-user-chip-text span {
        font-size: 10.5px;
        color: #8592ad;
    }

@media (max-width: 900px) {
    .cx-topbar {
        padding: 0 18px 0 56px;
    }

    .cx-user-chip-text {
        display: none;
    }
}

/* ---------- Login: icon inputs + password toggle + tagline ---------- */

.cx-auth-tagline {
    margin: 0 0 24px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #5eead4;
}

.cx-auth-subtitle-tight {
    margin-bottom: 4px;
}

.cx-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -6px 0 18px;
    flex-wrap: wrap;
    gap: 8px;
}

.cx-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--cx-text-muted);
    cursor: pointer;
    user-select: none;
}

    .cx-checkbox-label input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 4px;
        border: 1px solid rgba(255,255,255,0.28);
        background: var(--cx-input-bg);
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
    }

        .cx-checkbox-label input[type="checkbox"]:checked {
            background: linear-gradient(135deg, #2dd4bf, var(--cx-accent-bright));
            border-color: transparent;
        }

        .cx-checkbox-label input[type="checkbox"]:checked::after {
            content: "";
            position: absolute;
            left: 5px;
            top: 1px;
            width: 4px;
            height: 8px;
            border: solid #0e1c3f;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

.cx-forgot-row .cx-forgot-link {
    font-size: 12.5px;
}

.cx-input-icon-wrap {
    position: relative;
}

    .cx-input-icon-wrap .cx-input-icon {
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        width: 17px;
        height: 17px;
        color: #6c81ab;
        pointer-events: none;
    }

    .cx-input-icon-wrap .cx-input {
        padding-left: 40px;
    }

    .cx-input-icon-wrap .cx-input.cx-input-has-toggle {
        padding-right: 42px;
    }

.cx-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c81ab;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cx-password-toggle svg {
        width: 18px;
        height: 18px;
    }

    .cx-password-toggle:hover {
        color: var(--cx-text);
    }

    .cx-password-toggle .cx-eye-off {
        display: none;
    }

.cx-forgot-row {
    text-align: right;
    margin: -8px 0 18px;
}

.cx-forgot-link {
    font-size: 12.5px;
    color: var(--cx-text-muted);
}

    .cx-forgot-link:hover {
        color: var(--cx-accent-bright);
    }

/* ---------- List toolbar (search / filter / date range) ---------- */

.cx-list-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.cx-search-wrap {
    position: relative;
    flex: 1 1 240px;
    min-width: 220px;
}

    .cx-search-wrap svg {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        color: #8a97b8;
    }

.cx-search-input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border-radius: 9px;
    border: 1px solid #d7e0f0;
    font-size: 13.5px;
    font-family: var(--cx-font-body);
    color: #1c2b4a;
    background: #fff;
}

    .cx-search-input:focus {
        outline: none;
        border-color: var(--cx-accent);
        box-shadow: 0 0 0 3px rgba(79,168,232,0.18);
    }

.cx-date-range {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

    .cx-date-range input {
        border-radius: 9px;
        border: 1px solid #d7e0f0;
        padding: 8px 10px;
        font-size: 13px;
        font-family: var(--cx-font-body);
        color: #1c2b4a;
        background: #fff;
    }

    .cx-date-range span {
        color: #8a97b8;
        font-size: 12px;
    }

/* ---------- Pagination footer ---------- */

.cx-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px solid #eef2f7;
}

.cx-pagination-info {
    font-size: 13px;
    color: #5c6c8d;
    font-weight: 600;
}

.cx-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cx-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #d7e0f0;
    background: #fff;
    color: #33415c;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--cx-font-body);
}

    .cx-page-btn:hover:not(:disabled) {
        border-color: var(--cx-accent);
        color: var(--cx-accent-deep);
    }

    .cx-page-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.cx-page-indicator {
    font-size: 13px;
    color: #33415c;
    font-weight: 600;
    padding: 0 2px;
}

.cx-page-size-select {
    border-radius: 8px;
    border: 1px solid #d7e0f0;
    padding: 7px 8px;
    font-size: 13px;
    color: #33415c;
    background: #fff;
    font-family: var(--cx-font-body);
}

/* ---------- Improved empty state ---------- */

.cx-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 54px 20px;
    color: #8a97b8;
    text-align: center;
}

    .cx-empty-state svg {
        width: 42px;
        height: 42px;
        margin-bottom: 12px;
        color: #c3cee3;
    }

    .cx-empty-state strong {
        display: block;
        color: #5c6c8d;
        font-size: 14px;
        margin-bottom: 4px;
    }

    .cx-empty-state span {
        font-size: 12.5px;
    }

/* ---------- Login: split-screen layout (dark brand panel + light form panel) ---------- */

.cx-split-body {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fc;
}

.cx-split-shell {
    display: flex;
    min-height: 100vh;
}

.cx-split-left {
    flex: 0 0 42%;
    max-width: 560px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 64px;
    color: #ffffff;
    background-color: #0a1730;
    background-image: linear-gradient(160deg, rgba(22,41,92,0.35) 0%, rgba(10,23,48,0.15) 45%, rgba(10,23,48,0.55) 100%), url('/images/login-world-map.jpg');
    background-repeat: no-repeat;
    background-position: center bottom, center bottom;
    background-size: cover, cover;
}

.cx-split-left-inner {
    position: relative;
    z-index: 1;
}

.cx-split-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.cx-split-brand-mark {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: block;
}

.cx-split-brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cx-split-brand-main {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--cx-font-display);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    line-height: 1;
}

.cx-brand-bars {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

    .cx-brand-bars span {
        display: block;
        width: 22px;
        height: 5px;
        border-radius: 2px;
        background: #5eead4;
    }

.cx-split-brand-sub {
    font-family: var(--cx-font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 6px;
    color: #5eead4;
    padding-left: 2px;
}

.cx-split-tagline {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 32px;
    line-height: 1.3;
    margin: 0 0 16px;
}

    .cx-split-tagline .cx-accent-word {
        color: #5eead4;
    }

.cx-split-divider {
    width: 46px;
    height: 3px;
    border-radius: 2px;
    background: #5eead4;
    margin: 0 0 20px;
}

.cx-split-desc {
    font-size: 14px;
    line-height: 1.75;
    color: #9db1d9;
    max-width: 380px;
    margin: 0;
}

.cx-split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.cx-auth-card-light {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 18px;
    padding: 44px 40px 36px;
    box-shadow: 0 20px 60px rgba(15,31,64,0.10), 0 4px 18px rgba(15,31,64,0.06);
    text-align: center;
}

.cx-auth-icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eaf3fd;
    color: var(--cx-accent-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

    .cx-auth-icon-badge svg {
        width: 26px;
        height: 26px;
    }

.cx-auth-title-light {
    font-family: var(--cx-font-display);
    font-size: 22px;
    font-weight: 700;
    color: #16233f;
    margin: 0 0 4px;
    letter-spacing: 0.3px;
}

.cx-auth-subtitle-light {
    font-size: 13.5px;
    color: #7c8aa8;
    margin: 0 0 28px;
}

.cx-split-footer {
    margin-top: 26px;
    font-size: 12px;
    color: #7c8aa8;
    text-align: center;
}

    .cx-split-footer a {
        color: var(--cx-accent-deep);
        font-weight: 600;
    }

        .cx-split-footer a:hover {
            color: var(--cx-accent-bright);
        }

/* Light-theme overrides for shared form components inside the white card */

.cx-auth-card-light .cx-label {
    color: #5c6c8d;
}

.cx-auth-card-light .cx-input {
    background: #f7f9fc;
    border: 1px solid #e1e7f2;
    color: #1c2b4a;
}

    .cx-auth-card-light .cx-input::placeholder {
        color: #94a1bf;
    }

    .cx-auth-card-light .cx-input:focus {
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(79,168,232,0.15);
    }

.cx-auth-card-light .cx-input-icon {
    color: #94a1bf;
}

.cx-auth-card-light .cx-password-toggle {
    color: #94a1bf;
}

    .cx-auth-card-light .cx-password-toggle:hover {
        color: #16233f;
    }

.cx-auth-card-light .cx-checkbox-label {
    color: #5c6c8d;
}

    .cx-auth-card-light .cx-checkbox-label input[type="checkbox"] {
        background: #ffffff;
        border: 1px solid #cbd5e1;
    }

.cx-auth-card-light .cx-forgot-link {
    color: var(--cx-accent-deep);
}

    .cx-auth-card-light .cx-forgot-link:hover {
        color: var(--cx-accent-bright);
    }

.cx-auth-card-light .cx-btn-primary {
    background: var(--cx-accent-deep);
    box-shadow: 0 10px 26px rgba(47,95,196,0.3);
}

    .cx-auth-card-light .cx-btn-primary:hover {
        filter: brightness(1.1);
    }

@media (max-width: 900px) {
    .cx-split-left {
        flex: 0 0 auto;
        padding: 36px 32px;
        min-height: 0;
    }

    .cx-split-desc, .cx-split-map {
        display: none;
    }

    .cx-split-brand {
        margin-bottom: 22px;
    }

    .cx-split-tagline {
        font-size: 22px;
        margin: 0;
    }

    .cx-split-shell {
        flex-direction: column;
    }

    .cx-split-right {
        padding: 36px 20px;
    }
}

@media (max-width: 640px) {
    .cx-split-left {
        display: none;
    }

    .cx-split-right {
        min-height: 100vh;
        background: #ffffff;
        padding: 28px 18px;
    }
}

@media (max-width: 400px) {
    .cx-auth-card-light {
        padding: 32px 22px 26px;
    }
}

/* ---------- Mobil menu (hamburger + arka plan perdesi) ----------
   Onceki .cx-menu-toggle butonu <aside class="cx-sidebar"> icindeydi;
   sidebar mobilde translateX(-100%) ile ekran disina cikinca butonun
   kendisi de disari cikiyor ve menuyu acacak hicbir gorunur kontrol
   kalmiyordu. Bu yuzden topbar icine, sidebar'in disinda, her zaman
   gorunur ayri bir buton eklendi. */

.cx-mobile-menu-btn {
    display: none;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: #f4f7fc;
    border: 1px solid #e3e9f7;
    border-radius: 10px;
    color: #16233f;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    z-index: 25;
}

.cx-nav-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .cx-mobile-menu-btn {
        display: flex;
    }

    body.cx-nav-open {
        overflow: hidden;
    }

    body.cx-nav-open .cx-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(10,20,40,0.45);
        z-index: 19;
    }
}

/* ---------- Genel mobil sigma duzeltmeleri ---------- */

@media (max-width: 900px) {
    .cx-main {
        padding: 20px 16px;
    }

    .cx-check-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

        .cx-check-actions-row .cx-page-actions {
            flex-wrap: wrap;
        }

    .cx-account-toolbar {
        flex-wrap: wrap;
    }

        .cx-account-toolbar .cx-page-actions {
            flex-wrap: wrap;
        }

    .cx-page-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .cx-check-grid {
        grid-template-columns: 1fr;
    }

    /* Detay/Sil butonlari yan yana artik sigmayabilir - alt alta istifle,
       boylece butun satir yatay kaydirma gerektirmeden okunabilir kalir. */
    .cx-row-actions {
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: stretch;
        white-space: normal;
    }

        .cx-row-actions form {
            margin: 0;
            display: block;
        }

    .cx-action-link {
        display: block;
        width: 100%;
        min-width: 0;
    }
}

/* ---------- Liste tablolari (Nakliye / Teminat): mobilde ozet gorunum ----------
   Kucuk ekranda tum sutunlari sigdirmaya calismak yerine sadece en onemli
   bilgiler gosteriliyor: Referans, Alici (firma), Tutar, Detay/Sil. Digerleri
   (Gelis Tarihi, Fatura No, Alici VKN, VKN/Dekont/Fatura Kontrol, Komisyon)
   mobilde gizleniyor - masaustunde hicbir sey degismiyor. */
@media (max-width: 700px) {
    .cx-col-date,
    .cx-col-invoiceno,
    .cx-col-vkn,
    .cx-col-vkncheck,
    .cx-col-dekontcheck,
    .cx-col-commission,
    .cx-col-guaranteecheck {
        display: none;
    }

    .cx-col-ref { width: 20%; }
    .cx-col-customer { width: 34%; }
    .cx-col-amount { width: 18%; }
    .cx-col-actions { width: 28%; }

    .cx-table {
        font-size: 12px;
    }

        .cx-table thead th {
            padding: 8px 6px;
        }

        .cx-table tbody td {
            padding: 8px 6px;
        }
}

/* ---------- Muhasebe Kaydı: mobilde kart gorunumu ----------
   Sabit genislikli 9 sutunlu grid mobilde yatay kaydirmadan okunamiyordu
   (ve kullanicinin fisi onaylayabilmesi icin butun satiri gorup kontrol
   edebilmesi gerekiyor). Dar ekranda her satir kompakt, 2 sutunlu bir
   kart olur (Fatura Tarihi/Fatura No, Tip/Dosya No, Aciklama tek basina
   tam genislikte, Borc/Alacak, Hesap No + silme butonu) - yaklasik 8
   tam-genislik satir yerine 5 kisa satira sigar. Masaustunde hicbir
   sey degismiyor. */
@media (max-width: 760px) {
    .cx-account-table {
        overflow-x: visible;
    }

    .cx-account-head,
    .cx-account-head-noaction {
        display: none;
    }

    .cx-account-row,
    .cx-account-row-noaction {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 10px;
        padding: 12px 14px;
        border: 1px solid #e3e9f7;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
        align-items: end;
    }

        .cx-account-row:first-child,
        .cx-account-row-noaction:first-child {
            border-top: 1px solid #e3e9f7;
        }

    .cx-fis-field {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }

    .cx-fis-field-wide {
        grid-column: 1 / -1;
    }

        .cx-fis-field::before {
            content: attr(data-label);
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .3px;
            color: #7d8aa8;
        }

    .cx-fis-input {
        padding: 7px 8px;
        font-size: 12.5px;
        border: 1px solid #e3e9f7;
        border-radius: 8px;
    }

        .cx-fis-input[readonly] {
            background: #f8fafc;
        }

    .cx-row-delete {
        justify-self: end;
    }
}

/* ================================================================
   Banka Ekstreleri (BankStatementImport) - Excel/PDF banka hareketi
   mutabakati. Mevcut bilesenler (cx-card/cx-table/cx-summary-box/
   cx-btn/cx-alert) kullanilir; burada sadece bu sayfaya ozel yukleme
   alani, durum rozeti ve mutabakat tablosunun mobil kart gorunumu
   tanimlanir.
   ================================================================ */

.cx-bsi-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 190px;
    border: 2px dashed #c7d2e6;
    border-radius: 16px;
    background: #f7f9fc;
    text-align: center;
    padding: 26px 20px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

    .cx-bsi-dropzone input[type="file"] {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

    .cx-bsi-dropzone:hover {
        border-color: #94a9d6;
    }

    .cx-bsi-dropzone.cx-bsi-dropzone-drag {
        border-color: #2563eb;
        background: #eff6ff;
    }

.cx-bsi-dropzone-icon {
    font-size: 26px;
    color: #7d8aa8;
}

.cx-bsi-dropzone-title {
    color: #1c2b4a;
    font-size: 14.5px;
}

.cx-bsi-dropzone-hint {
    color: #7d8aa8;
    font-size: 12.5px;
}

.cx-bsi-upload-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.cx-bsi-input {
    width: 100%;
    background: #fff;
    border: 1px solid #e1e7f2;
    border-radius: 7px;
    padding: 6px 8px;
    color: #1c2b4a;
    font-size: 12.5px;
    font-family: var(--cx-font-body);
}

    .cx-bsi-input:focus {
        outline: none;
        border-color: #2563eb;
        background: #eff6ff;
    }

    .cx-bsi-input::placeholder {
        color: #a7b2c9;
    }

.cx-bsi-input-suggested {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-weight: 600;
}

    .cx-bsi-input-suggested:focus {
        background: #fff;
        color: #1c2b4a;
        font-weight: 400;
    }

.cx-bsi-tooltip {
    display: none;
    position: fixed;
    z-index: 999;
    max-width: 420px;
    background: #16233f;
    color: #fff;
    font-size: 12.5px;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .3);
    white-space: normal;
    overflow-wrap: anywhere;
    pointer-events: none;
}

.cx-bsi-autocomplete {
    display: none;
    position: fixed;
    z-index: 1000;
    background: #fff;
    border: 1px solid #dde5f6;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
    max-height: 220px;
    overflow-y: auto;
}

.cx-bsi-autocomplete-item {
    padding: 8px 12px;
    font-size: 12.5px;
    color: #1c2b4a;
    cursor: pointer;
    border-bottom: 1px solid #f1f4fa;
}

    .cx-bsi-autocomplete-item:last-child {
        border-bottom: none;
    }

    .cx-bsi-autocomplete-item:hover {
        background: #eff6ff;
    }

.cx-bsi-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.cx-bsi-evrim-only {
    margin: 0 0 16px;
    border: 1px solid #fde68a;
    border-radius: 14px;
    background: #fffbeb;
    padding: 14px;
}

.cx-bsi-evrim-only-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

    .cx-bsi-evrim-only-head strong {
        color: #92400e;
        font-size: 13.5px;
    }

    .cx-bsi-evrim-only-head span {
        color: #92400e;
        font-size: 11.5px;
        font-weight: 600;
    }

.cx-bsi-desc {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    cursor: default;
}

.cx-bsi-tag {
    margin-top: 3px;
    color: #7d8aa8;
    font-size: 11px;
}

.cx-bsi-table thead th {
    background: #eef2fb;
    color: #16233f;
    border-bottom: 2px solid #dde5f6;
}

    .cx-bsi-table thead th.cx-right {
        text-align: right;
    }

.cx-bsi-code-cell {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    cursor: default;
}

.cx-bsi-negative { color: #dc2626 !important; font-weight: 700; }
.cx-bsi-positive { color: #16a34a !important; font-weight: 700; }

.cx-bsi-save-status {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
}

.cx-bsi-save-status-pending { color: #2563eb; }
.cx-bsi-save-status-ok { color: #16a34a; }
.cx-bsi-save-status-error { color: #dc2626; }
.cx-bsi-save-status-skip { color: #b45309; }

.cx-status-pill {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

    .cx-status-pill.ok {
        color: #16a34a;
        background: #dcfce7;
        border: 1px solid #bbf7d0;
    }

    .cx-status-pill.bad {
        color: #dc2626;
        background: #fee2e2;
        border: 1px solid #fecaca;
    }

@media (max-width: 900px) {
    .cx-bsi-dropzone {
        min-height: 150px;
        padding: 20px 14px;
    }

    .cx-bsi-upload-actions {
        flex-direction: column;
    }

        .cx-bsi-upload-actions .cx-btn {
            width: 100%;
        }
}

/* Mobilde mutabakat tablosu kart gorunumu - cx-account-row ile ayni
   yaklasim: masaustunde normal tablo, dar ekranda etiketli kart, boylece
   7 sutunlu tablo yatay kaydirma gerektirmeden telefonda da okunabilir. */
@media (max-width: 760px) {
    .cx-bsi-table-wrap {
        overflow-x: visible;
        border: 0;
        background: transparent;
    }

    .cx-bsi-table thead {
        display: none;
    }

    .cx-bsi-table, .cx-bsi-table tbody {
        display: block;
        width: 100%;
    }

    .cx-bsi-table tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 10px;
        padding: 12px 14px;
        border: 1px solid #e3e9f7;
        border-radius: 12px;
        margin-bottom: 10px;
        background: #fff;
    }

        .cx-bsi-table tr.cx-row-warning {
            border-color: #fde68a;
            background: #fffbeb;
        }

    .cx-bsi-table td {
        display: flex;
        flex-direction: column;
        gap: 2px;
        border: 0 !important;
        padding: 0 !important;
        min-width: 0;
    }

        .cx-bsi-table td::before {
            content: attr(data-label);
            font-size: 10.5px;
            font-weight: 700;
            color: #7d8aa8;
            text-transform: uppercase;
            letter-spacing: .3px;
        }

        .cx-bsi-table td.cx-bsi-td-wide {
            grid-column: 1 / -1;
        }

        .cx-bsi-table .cx-right {
            text-align: left !important;
        }

    .cx-bsi-desc {
        max-width: none;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .cx-bsi-code-cell {
        text-align: left;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}
