:root {
    --sidebar-width: 280px;
    --sidebar-bg: #111827;
    --sidebar-bg-light: #1f2937;
    --sidebar-text: #cbd5e1;
    --sidebar-muted: #64748b;
    --sidebar-active: #2563eb;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --body-bg: #f4f6f9;
    --topbar-height: 72px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--body-bg);
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    color: #1f2937;
}

.erp-wrapper {
    min-height: 100vh;
}

/* SIDEBAR */

.erp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: var(--sidebar-width);

    background:
        linear-gradient(
            180deg,
            #111827 0%,
            #0f172a 100%
        );

    color: var(--sidebar-text);

    display: flex;
    flex-direction: column;

    z-index: 1050;

    box-shadow:
        8px 0 30px
        rgba(15, 23, 42, 0.12);

    transition:
        transform 0.28s ease;
}

.sidebar-header {
    height: 82px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 0 22px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.07);
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #3b82f6,
            #2563eb
        );

    color: #fff;

    font-size: 19px;

    box-shadow:
        0 8px 22px
        rgba(37, 99, 235, 0.35);
}

.sidebar-brand-title {
    color: #fff;

    font-weight: 700;
    font-size: 16px;

    letter-spacing: 0.3px;
}

.sidebar-brand-subtitle {
    color: #64748b;
    font-size: 11px;

    margin-top: 2px;
}

.sidebar-user {
    margin: 18px 16px 8px;

    padding: 14px;

    display: flex;
    align-items: center;

    gap: 12px;

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.04);

    border:
        1px solid
        rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #2563eb;

    color: #fff;

    font-size: 18px;
    font-weight: 700;
}

.sidebar-user-info {
    min-width: 0;
}

.sidebar-user-name {
    color: #fff;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    margin-top: 3px;

    color: #64748b;
    font-size: 11px;
}

.sidebar-menu {
    flex: 1;

    overflow-y: auto;

    padding:
        8px 14px 20px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background:
        rgba(255, 255, 255, 0.12);

    border-radius: 20px;
}

.sidebar-menu-title {
    margin:
        20px 12px
        8px;

    color: var(--sidebar-muted);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.2px;
}

.sidebar-link {
    position: relative;

    display: flex;
    align-items: center;

    gap: 12px;

    min-height: 46px;

    margin-bottom: 5px;

    padding: 0 14px;

    border-radius: 11px;

    text-decoration: none;

    color: var(--sidebar-text);

    font-size: 13px;
    font-weight: 500;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: var(--sidebar-hover);

    transform: translateX(2px);
}

.sidebar-link.active {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    box-shadow:
        0 8px 18px
        rgba(37, 99, 235, 0.25);
}

.sidebar-link.active::before {
    content: '';

    position: absolute;

    left: -14px;

    width: 4px;
    height: 22px;

    border-radius:
        0 6px 6px 0;

    background: #60a5fa;
}

.sidebar-link-icon {
    width: 22px;

    display: flex;
    justify-content: center;

    font-size: 15px;
}

.sidebar-footer {
    padding: 15px;

    border-top:
        1px solid
        rgba(255, 255, 255, 0.07);
}

.sidebar-logout {
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border-radius: 11px;

    text-decoration: none;

    color: #fca5a5;

    background:
        rgba(239, 68, 68, 0.08);

    border:
        1px solid
        rgba(239, 68, 68, 0.12);

    font-size: 13px;
    font-weight: 600;

    transition:
        all 0.2s ease;
}

.sidebar-logout:hover {
    color: #fff;
    background: #dc2626;
}

/* ANA ALAN */

.erp-main {
    margin-left: var(--sidebar-width);

    min-height: 100vh;

    transition:
        margin-left 0.28s ease;
}

.erp-topbar {
    position: sticky;
    top: 0;

    height: var(--topbar-height);

    z-index: 1030;

    display: flex;
    align-items: center;

    padding: 0 28px;

    background:
        rgba(255, 255, 255, 0.94);

    backdrop-filter: blur(10px);

    border-bottom:
        1px solid #e5e7eb;
}

.topbar-menu-button {
    display: none;

    width: 42px;
    height: 42px;

    margin-right: 14px;

    border: 0;

    border-radius: 10px;

    background: #f1f5f9;

    color: #334155;

    font-size: 18px;
}

.topbar-title {
    flex: 1;
}

.topbar-title h1 {
    margin: 0;

    color: #0f172a;

    font-size: 20px;
    font-weight: 700;
}

.topbar-user {
    display: flex;
    align-items: center;

    gap: 11px;
}

.topbar-user-text {
    text-align: right;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 600;

    color: #1e293b;
}

.topbar-user-role {
    margin-top: 2px;

    font-size: 11px;

    color: #94a3b8;
}

.topbar-avatar {
    width: 40px;
    height: 40px;

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #fff;

    font-weight: 700;
}

.erp-content {
    padding: 28px;
}

/* OVERLAY */

.sidebar-overlay {
    position: fixed;

    inset: 0;

    z-index: 1040;

    background:
        rgba(15, 23, 42, 0.55);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

/* TABLET / MOBILE */

@media (max-width: 991.98px) {

    .erp-sidebar {
        transform: translateX(-100%);
    }

    .erp-sidebar.open {
        transform: translateX(0);
    }

    .erp-main {
        margin-left: 0;
    }

    .topbar-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .erp-topbar {
        padding:
            0 18px;
    }

    .erp-content {
        padding: 20px;
    }

}

@media (max-width: 575.98px) {

    :root {
        --sidebar-width: 270px;
    }

    .erp-topbar {
        height: 64px;
    }

    .topbar-title h1 {
        font-size: 17px;
    }

    .topbar-user-text {
        display: none;
    }

    .erp-content {
        padding: 16px;
    }

}

/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 24px 26px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f8fafc
        );

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    box-shadow:
        0 4px 18px
        rgba(15, 23, 42, 0.04);
}

.dashboard-welcome-small {
    color: #64748b;

    font-size: 13px;
    margin-bottom: 5px;
}

.dashboard-welcome-title {
    color: #0f172a;

    font-size: 25px;
    font-weight: 700;

    margin: 0 0 5px 0;
}

.dashboard-welcome-text {
    color: #64748b;

    font-size: 13px;
}

.dashboard-date {
    min-width: max-content;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 10px 15px;

    background: #f1f5f9;

    border-radius: 10px;

    color: #475569;

    font-size: 13px;
    font-weight: 600;
}


/* İSTATİSTİKLER */

.dashboard-stat-card {
    height: 100%;

    display: flex;
    align-items: center;

    gap: 16px;

    padding: 20px;

    background: #fff;

    border: 1px solid #e8edf3;

    border-radius: 15px;

    box-shadow:
        0 4px 16px
        rgba(15, 23, 42, 0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 9px 24px
        rgba(15, 23, 42, 0.08);
}

.dashboard-stat-icon {
    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;
}

.stat-blue {
    color: #2563eb;
    background: #eff6ff;
}

.stat-green {
    color: #16a34a;
    background: #f0fdf4;
}

.stat-orange {
    color: #ea580c;
    background: #fff7ed;
}

.stat-red {
    color: #dc2626;
    background: #fef2f2;
}

.dashboard-stat-label {
    color: #64748b;

    font-size: 12px;
    font-weight: 500;

    margin-bottom: 3px;
}

.dashboard-stat-value {
    color: #0f172a;

    font-size: 22px;
    font-weight: 700;

    line-height: 1.2;
}

.dashboard-stat-subtitle {
    margin-top: 4px;

    color: #94a3b8;

    font-size: 11px;
}


/* CARD HEADER */

.dashboard-card-header {
    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 16px 20px;

    background: #fff;

    border-bottom: 1px solid #edf0f4;
}

.dashboard-card-header h5 {
    color: #0f172a;

    font-size: 15px;
    font-weight: 700;
}

.dashboard-card-header small {
    color: #94a3b8;

    font-size: 11px;
}


/* HIZLI İŞLEMLER */

.quick-action-card {
    min-height: 115px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 15px;

    border: 1px solid #e8edf3;

    border-radius: 14px;

    color: #334155;

    text-decoration: none;

    background: #fff;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}

.quick-action-card:hover {
    color: #2563eb;

    border-color: #bfdbfe;

    transform: translateY(-3px);

    box-shadow:
        0 8px 20px
        rgba(37, 99, 235, 0.08);
}

.quick-action-icon {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 17px;
}

.quick-action-title {
    font-size: 12px;
    font-weight: 600;

    text-align: center;
}


/* GENEL DURUM */

.dashboard-info-row {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 14px 0;

    margin-bottom: 2px;

    border-bottom: 1px solid #f1f5f9;
}

.dashboard-info-row:last-child {
    border-bottom: 0;
}

.dashboard-info-icon {
    width: 39px;
    height: 39px;

    flex: 0 0 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #f1f5f9;

    color: #475569;

    font-size: 14px;
}

.dashboard-info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    flex: 1;
}

.dashboard-info-label {
    color: #64748b;

    font-size: 12px;
}

.dashboard-info-value {
    color: #0f172a;

    font-size: 15px;
    font-weight: 700;
}


/* TABLO */

.dashboard-table thead th {
    background: #f8fafc;

    color: #64748b;

    border-bottom: 1px solid #e5e7eb;

    padding: 13px 18px;

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;
}

.dashboard-table tbody td {
    padding: 14px 18px;

    vertical-align: middle;

    font-size: 12px;

    color: #475569;

    border-color: #f1f5f9;
}


/* BOŞ DURUM */

.dashboard-empty {
    text-align: center;

    padding: 35px 20px;
}

.dashboard-empty-icon {
    width: 50px;
    height: 50px;

    margin: 0 auto 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f1f5f9;

    border-radius: 14px;

    color: #94a3b8;

    font-size: 19px;
}

.dashboard-empty-title {
    color: #475569;

    font-size: 13px;
    font-weight: 600;

    margin-bottom: 4px;
}

.dashboard-empty-text {
    color: #94a3b8;

    font-size: 11px;
}


/* MOBİL */

@media (max-width: 767.98px) {

    .dashboard-welcome {
        align-items: flex-start;
        flex-direction: column;

        padding: 20px;
    }

    .dashboard-welcome-title {
        font-size: 21px;
    }

    .dashboard-date {
        align-self: flex-start;
    }

    .dashboard-stat-card {
        padding: 17px;
    }

    .dashboard-stat-value {
        font-size: 19px;
    }

    .quick-action-card {
        min-height: 100px;
    }

}
.sidebar-company-logo {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;

    overflow: hidden;

    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 6px 18px
        rgba(0, 0, 0, 0.18);
}

.sidebar-company-logo img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}
.stat-orange {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}