/* ==========================================================================
   KURUMSAL ERP MODERN TEMA (SaaS / Enterprise UI)
   ========================================================================== */

:root {
    --erp-bg-body: #f8fafc;
    --erp-bg-card: #ffffff;
    --erp-border-color: #e2e8f0;
    --erp-border-subtle: #f1f5f9;
    
    --erp-primary: #1e3a8a;
    --erp-primary-hover: #172554;
    --erp-primary-light: #eff6ff;
    --erp-accent: #2563eb;
    --erp-accent-hover: #1d4ed8;

    --erp-text-main: #1f2937;
    --erp-text-muted: #64748b;
    --erp-text-light: #94a3b8;

    --erp-success: #10b981;
    --erp-success-bg: #ecfdf5;
    --erp-warning: #f59e0b;
    --erp-warning-bg: #fffbeb;
    --erp-danger: #ef4444;
    --erp-danger-bg: #fef2f2;
    --erp-info: #0ea5e9;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 64px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--erp-bg-body);
    color: var(--erp-text-main);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: var(--erp-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ==========================================================================
   LAYOUT SHELL
   ========================================================================== */
.erp-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* SIDEBAR */
.erp-sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.25s ease, transform 0.25s ease;
    z-index: 1000;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

.erp-sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.erp-brand-text {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    display: block;
}

.erp-brand-sub {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: block;
    margin-top: 2px;
}

/* SIDEBAR SEARCH */
.erp-sidebar-search {
    padding: 12px 12px 4px;
}

.erp-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.erp-search-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    color: #64748b;
    pointer-events: none;
}

#erpSidebarSearch {
    width: 100%;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #f1f5f9;
    padding: 7px 28px 7px 32px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

#erpSidebarSearch:focus {
    border-color: #3b82f6;
    background: #0f172a;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

#erpSidebarSearch::placeholder {
    color: #64748b;
}

.erp-search-clear {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.erp-search-clear:hover {
    color: #ffffff;
}

.erp-search-empty {
    padding: 14px 12px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    margin: 8px 4px;
}

.erp-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 20px;
}

.erp-nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.8px;
    padding: 12px 14px 6px;
    display: block;
}

.erp-nav-item {
    margin-bottom: 4px;
}

.erp-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.erp-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.erp-nav-link.active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.erp-nav-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.erp-chevron-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.erp-nav-item.open .erp-chevron-wrapper {
    transform: rotate(180deg);
    opacity: 1;
}

.erp-nav-sublist {
    display: none;
    list-style: none;
    padding-left: 14px;
    margin-top: 4px;
    margin-bottom: 6px;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    margin-left: 22px;
}

.erp-nav-item.open > .erp-nav-sublist {
    display: block;
}

.erp-subnav-bullet {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #64748b;
    display: inline-block;
    margin-right: 8px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.erp-nav-subitem a {
    display: flex;
    align-items: center;
    padding: 7px 12px;
    color: #94a3b8;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.erp-nav-subitem a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.erp-nav-subitem a:hover .erp-subnav-bullet,
.erp-nav-subitem a.active .erp-subnav-bullet {
    background: #38bdf8;
}

.erp-nav-subitem a.active {
    color: #38bdf8;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.1);
}

/* MAIN CONTENT CONTAINER */
.erp-main-container {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

/* DESKTOP SIDEBAR COLLAPSE STATE */
body.erp-sidebar-collapsed .erp-sidebar {
    transform: translateX(-100%);
}

body.erp-sidebar-collapsed .erp-main-container {
    margin-left: 0;
}

.erp-topbar-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--erp-text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.erp-topbar-icon-btn:hover {
    background: var(--erp-bg-body);
    color: var(--erp-text-main);
}

/* TOPBAR */
.erp-topbar {
    height: var(--topbar-height);
    background: #ffffff;
    border-bottom: 1px solid var(--erp-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
}

.erp-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.erp-btn-toggle {
    background: transparent;
    border: none;
    color: var(--erp-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.erp-btn-toggle:hover {
    background: var(--erp-bg-body);
    color: var(--erp-text-main);
}

.erp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--erp-text-muted);
}

.erp-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.erp-breadcrumb-sep {
    color: var(--erp-text-light);
}

.erp-topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.erp-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.erp-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e0e7ff;
    color: var(--erp-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.erp-user-info {
    text-align: right;
    line-height: 1.2;
}

.erp-user-name {
    font-weight: 600;
    color: var(--erp-text-main);
    display: block;
}

.erp-user-role {
    font-size: 11px;
    color: var(--erp-text-muted);
    display: block;
}

/* CONTENT AREA */
.erp-content {
    flex: 1;
    padding: 24px;
}

.erp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.erp-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--erp-primary);
    line-height: 1.2;
}

.erp-page-desc,
.erp-page-subtitle {
    font-size: 13px;
    color: var(--erp-text-muted);
    margin-top: 4px;
}

/* CARDS */
.erp-card {
    background: var(--erp-bg-card);
    border: 1px solid var(--erp-border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.erp-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--erp-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.erp-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--erp-text-main);
}

.erp-card-body {
    padding: 20px;
}

.erp-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--erp-border-color);
    background: #fafafa;
}

/* PLACEHOLDER MODULE NOTICE */
.erp-placeholder-box {
    text-align: center;
    padding: 60px 24px;
    background: #ffffff;
    border: 2px dashed var(--erp-border-color);
    border-radius: var(--radius-lg);
}

.erp-placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--erp-primary-light);
    color: var(--erp-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.erp-placeholder-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--erp-primary);
    margin-bottom: 8px;
}

.erp-placeholder-text {
    font-size: 14px;
    color: var(--erp-text-muted);
    max-width: 520px;
    margin: 0 auto 20px;
}

/* BUTTONS */
.erp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.erp-btn-primary {
    background: var(--erp-accent);
    color: #ffffff;
    border-color: var(--erp-accent);
}

.erp-btn-primary:hover {
    background: var(--erp-accent-hover);
    color: #ffffff;
}

.erp-btn-outline {
    background: #ffffff;
    border-color: var(--erp-border-color);
    color: var(--erp-text-main);
}

.erp-btn-outline:hover {
    background: var(--erp-bg-body);
    border-color: #cbd5e1;
}

.erp-btn-danger {
    background: var(--erp-danger);
    color: #ffffff;
}

.erp-btn-danger:hover {
    background: #dc2626;
}

.erp-btn-warning {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
}

.erp-btn-warning:hover {
    background: #d97706;
    color: #ffffff;
}

.erp-btn-success {
    background: var(--erp-success);
    color: #ffffff;
    border-color: var(--erp-success);
}

.erp-btn-success:hover {
    background: #059669;
    color: #ffffff;
}

.erp-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    gap: 5px;
}

.erp-btn:disabled, .erp-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* FORMS & INPUTS */
.erp-form-group {
    margin-bottom: 18px;
}

.erp-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--erp-text-main);
}

.erp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.erp-form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--erp-border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--erp-text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.erp-form-control:focus {
    outline: none;
    border-color: var(--erp-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.erp-input-btn-end {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--erp-text-muted);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 14px;
    border-radius: 4px;
}

.erp-input-btn-end:hover {
    color: var(--erp-text-main);
}

.erp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.erp-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--erp-accent);
    cursor: pointer;
}

/* ALERTS */
.erp-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.erp-alert-danger {
    background: var(--erp-danger-bg);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.erp-alert-success {
    background: var(--erp-success-bg);
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.erp-alert-info {
    background: var(--erp-primary-light);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ==========================================================================
   LOGIN SCREEN STYLES (Beyaz Arka Plan & Sola Yaslı Kart)
   ========================================================================== */
.erp-login-page {
    min-height: 100vh;
    display: flex;
    background: #ffffff;
    overflow-x: hidden;
}

.erp-login-left {
    width: 520px;
    min-width: 320px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px;
    position: relative;
    z-index: 10;
    box-shadow: 6px 0 25px rgba(0, 0, 0, 0.03);
    border-right: 1px solid var(--erp-border-color);
}

.erp-login-brand {
    display: flex;
    align-items: center;
    margin-bottom: 36px;
}

.erp-login-brand-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--erp-primary);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.erp-login-brand-text small {
    display: block;
    font-size: 12px;
    color: var(--erp-text-muted);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

.erp-login-form-container {
    max-width: 440px;
    width: 100%;
    margin: auto 0;
}

.erp-login-header {
    margin-bottom: 26px;
}

.erp-login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--erp-primary);
    margin-bottom: 6px;
}

.erp-login-subtitle {
    font-size: 13px;
    color: var(--erp-text-muted);
    line-height: 1.5;
}

.erp-login-right {
    flex: 1;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
}

.erp-login-hero-card {
    max-width: 560px;
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--erp-border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
}

.erp-login-hero-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--erp-primary);
    margin-bottom: 12px;
}

.erp-login-hero-desc {
    font-size: 13px;
    color: var(--erp-text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.erp-feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.erp-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
}

.erp-feature-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.erp-feature-item strong {
    color: var(--erp-text-main);
    display: block;
    margin-bottom: 2px;
}

.erp-feature-item span {
    color: var(--erp-text-muted);
    font-size: 12px;
    line-height: 1.4;
    display: block;
}

.erp-login-footer-text {
    font-size: 12px;
    color: var(--erp-text-muted);
    margin-top: 32px;
}

@media (max-width: 992px) {
    .erp-login-right {
        display: none;
    }

    .erp-login-left {
        width: 100%;
        border-right: none;
        padding: 36px 24px;
    }

    .erp-login-form-container {
        margin: 20px auto;
    }
}

/* BADGES */
.erp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9999px;
}

.erp-badge-primary {
    background: var(--erp-primary-light);
    color: var(--erp-accent);
}

.erp-badge-success {
    background: var(--erp-success-bg);
    color: var(--erp-success);
}

.erp-badge-warning {
    background: var(--erp-warning-bg);
    color: var(--erp-warning);
}

.erp-badge-danger {
    background: var(--erp-danger-bg);
    color: var(--erp-danger);
}

.erp-badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.erp-badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* DATA TABLES & RESPONSIVE CONTAINERS */
.erp-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
}

.erp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
    color: var(--erp-text-main);
}

.erp-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--erp-border-color);
    white-space: nowrap;
    vertical-align: middle;
}

.erp-table tbody tr {
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--erp-border-color);
}

.erp-table tbody tr:hover {
    background-color: #f8fafc;
}

.erp-table tbody tr:last-child {
    border-bottom: none;
}

.erp-table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 13px;
}

.erp-table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbfc;
}

/* ROLE CARD STYLING */
.role-card-item {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--erp-border-color);
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.role-card-item:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.role-card-item.active {
    border-color: #3b82f6;
    background: #eff6ff;
    border-left: 4px solid var(--erp-accent);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

/* FOOTER */
.erp-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--erp-border-color);
    background: #ffffff;
    font-size: 12px;
    color: var(--erp-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* RESPONSIVE TOGGLE & MEDIA QUERIES */
@media (max-width: 992px) {
    .erp-sidebar {
        transform: translateX(-100%);
    }

    .erp-sidebar.show {
        transform: translateX(0);
    }

    .erp-main-container {
        margin-left: 0;
    }

    .erp-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .erp-sidebar-overlay.show {
        display: block;
    }
}

/* ==========================================================================
   LOGO / NETSIS STYLE ERP DATA GRID & INVOICE ENTRY
   ========================================================================== */
.erp-invoice-header-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.erp-grid-wrapper {
    background: #ffffff;
    border: 1px solid var(--erp-border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.erp-grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--erp-border-color);
}

.erp-grid-table-container {
    overflow-x: auto;
    max-height: 520px;
}

.erp-grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    text-align: left;
}

.erp-grid-table thead th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--erp-border-color);
    border-right: 1px solid #e2e8f0;
    z-index: 10;
    white-space: nowrap;
}

.erp-grid-table thead th:last-child {
    border-right: none;
}

.erp-grid-table tbody td {
    padding: 4px 6px;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f8fafc;
    vertical-align: middle;
}

.erp-grid-table tbody td:last-child {
    border-right: none;
}

.erp-grid-table tbody tr:hover {
    background-color: #f8fafc;
}

.erp-grid-table tbody tr.active-row {
    background-color: #eff6ff;
}

.erp-cell-input {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--erp-text-main);
    transition: all 0.15s ease;
    outline: none;
}

.erp-cell-input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.erp-cell-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.erp-cell-input[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: default;
    border-color: transparent;
}

.erp-cell-input.text-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.erp-cell-input.text-center {
    text-align: center;
}

.erp-cell-code-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.erp-cell-btn-search {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.erp-cell-btn-search:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
}

.erp-btn-cell-delete {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.15s;
    margin: 0 auto;
}

.erp-btn-cell-delete:hover {
    opacity: 1;
    background: #fee2e2;
}

/* TOTALS SUMMARY CARDS */
.erp-invoice-summary-bar {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: flex-start;
}

@media (max-width: 992px) {
    .erp-invoice-summary-bar {
        grid-template-columns: 1fr;
    }
}

.erp-summary-card {
    background: #ffffff;
    border: 1px solid var(--erp-border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.erp-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 13px;
}

.erp-summary-row:last-child {
    border-bottom: none;
}

.erp-summary-label {
    color: var(--erp-text-muted);
    font-weight: 500;
}

.erp-summary-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--erp-text-main);
}

.erp-summary-row.highlight {
    background: #eff6ff;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #bfdbfe;
    margin-top: 10px;
}

.erp-summary-row.highlight .erp-summary-label {
    color: #1e40af;
    font-weight: 700;
    font-size: 14px;
}

.erp-summary-row.highlight .erp-summary-value {
    color: #1d4ed8;
    font-weight: 800;
    font-size: 18px;
}

/* MODAL LOOKUP (STOK REHBERİ) */
.erp-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.erp-modal-backdrop.show {
    display: flex;
}

.erp-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 720px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: erpModalFadeIn 0.2s ease-out;
}

@keyframes erpModalFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.erp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--erp-border-color);
    background: #f8fafc;
}

.erp-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--erp-text-main);
}

.erp-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.erp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--erp-border-color);
    background: #f8fafc;
}

/* GEÇMİŞ FATURALAR SPLIT MODAL */
.erp-modal-dialog.erp-modal-lg {
    max-width: 1150px;
    height: 82vh;
}

.erp-modal-dialog.erp-modal-xl {
    max-width: 1250px;
    height: 85vh;
}

.erp-search-split {
    display: flex;
    gap: 0;
    height: 100%;
    overflow: hidden;
}

.erp-search-sidebar {
    width: 290px;
    background: #f8fafc;
    border-right: 1px solid var(--erp-border-color);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    flex-shrink: 0;
}

.erp-search-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

.erp-search-results-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--erp-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.erp-search-results-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.erp-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.erp-history-table th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    color: var(--erp-text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--erp-border-color);
    z-index: 10;
}

.erp-history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--erp-text-main);
    vertical-align: middle;
}

.erp-history-table tbody tr {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.erp-history-table tbody tr:hover {
    background-color: #f0f9ff;
}

.erp-inv-no-link {
    color: var(--erp-accent);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.erp-inv-no-link:hover {
    color: var(--erp-accent-hover);
}

.erp-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--erp-border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 18px;
}

.erp-detail-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--erp-text-muted);
    display: block;
    margin-bottom: 2px;
}

.erp-detail-field span {
    font-size: 13px;
    font-weight: 600;
    color: var(--erp-text-main);
}

.erp-edit-mode-banner {
    display: none;
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   KURUMSAL ERP MODERN MODAL / DIALOG (ErpDialog)
   ========================================================================== */

.erp-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
    padding: 20px;
}

.erp-dialog-overlay.erp-dialog-show {
    opacity: 1;
    visibility: visible;
}

.erp-dialog-box {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.08);
    max-width: 440px;
    width: 100%;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.erp-dialog-overlay.erp-dialog-show .erp-dialog-box {
    transform: scale(1) translateY(0);
}

.erp-dialog-header {
    padding: 24px 24px 14px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.erp-dialog-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.erp-dialog-icon-success {
    background: #ecfdf5;
    color: #10b981;
}

.erp-dialog-icon-error {
    background: #fef2f2;
    color: #ef4444;
}

.erp-dialog-icon-warning {
    background: #fffbeb;
    color: #f59e0b;
}

.erp-dialog-icon-info {
    background: #eff6ff;
    color: #2563eb;
}

.erp-dialog-content {
    flex: 1;
}

.erp-dialog-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 6px;
}

.erp-dialog-message {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
    word-break: break-word;
}

.erp-dialog-footer {
    padding: 14px 24px 18px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.erp-dialog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    outline: none;
    user-select: none;
}

.erp-dialog-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.erp-dialog-btn-primary {
    background: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
}
.erp-dialog-btn-primary:hover {
    background: #172554;
    border-color: #172554;
}

.erp-dialog-btn-danger {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}
.erp-dialog-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.erp-dialog-btn-cancel {
    background: #ffffff;
    color: #475569;
    border-color: #cbd5e1;
}
.erp-dialog-btn-cancel:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
}

.erp-kbd-hint {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-family: inherit;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.erp-dialog-btn-primary .erp-kbd-hint {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}
.erp-dialog-btn-danger .erp-kbd-hint {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}
.erp-dialog-btn-cancel .erp-kbd-hint {
    background: #e2e8f0;
    color: #475569;
}


