:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #06b6d4;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.layout-top .container-fluid {
    padding: 0;
}

.layout-top .row {
    margin: 0;
}

.app-navbar {
    background: linear-gradient(135deg, #166534 0%, #15803d 60%, #16a34a 100%);
    box-shadow: var(--shadow);
}

.app-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-navbar .nav-link {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    background: #ffffff;
    color: #166534;
}

.app-navbar .nav-link.active {
    background: #ffffff;
    color: #166534;
}

.app-navbar .nav-link.text-danger {
    color: #ffffff;
}

.app-navbar .nav-link.text-danger:hover {
    background: #ffffff;
    color: #b91c1c;
}

.app-navbar .navbar-text {
    color: rgba(255, 255, 255, 0.95);
}

.app-navbar .navbar-nav {
    margin: 0 auto;
}

.content {
    padding: 28px 18px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.content h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text);
}

.card-body .text-muted {
    color: var(--muted) !important;
}

.list-group-item {
    border-color: var(--border);
}

.table {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background: #eef2ff;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}

.table-sm th,
.table-sm td {
    vertical-align: middle;
}

.btn {
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 8px 16px rgba(34, 197, 94, 0.24);
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: #1f2937;
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.22);
}

.badge.bg-danger {
    background: var(--danger) !important;
}

.badge.bg-success {
    background: var(--success) !important;
}

.badge.bg-warning {
    background: var(--warning) !important;
    color: #111827;
}

.alert {
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.layout-top .col-md-10 {
    flex: 0 0 100%;
    max-width: 100%;
}

.layout-top .ms-sm-auto {
    margin-left: 0 !important;
}

@media (max-width: 992px) {
    .app-navbar .nav-link {
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px 14px 32px;
    }

    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table thead th,
    .table tbody td {
        white-space: nowrap;
    }
}

.receipt-form .section-title {
    margin: 24px 0 12px;
    font-weight: 700;
    color: #166534;
}

.receipt-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.receipt-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.receipt-form .form-group label {
    font-weight: 600;
    color: var(--text);
}

.receipt-form .customer-picker {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.receipt-form .customer-search {
    border-radius: 10px;
    background: #ffffff;
}

.receipt-form .customer-list {
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 6px;
}

.receipt-form .customer-list option {
    padding: 6px 8px;
}

.receipt-form .customer-list:focus,
.receipt-form .customer-search:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.receipt-form .satir-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) 90px;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    align-items: end;
    margin-bottom: 12px;
}

.receipt-form .btn-remove-satir {
    width: 100%;
}

.receipt-form .masraflar-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.receipt-form .odeme-ozeti {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid rgba(22, 101, 52, 0.2);
    background: #f0fdf4;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.receipt-form .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.receipt-expenses {
    border: none;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(22, 163, 74, 0.03));
}

.receipt-expenses .card-body {
    padding: 18px 20px;
}

.receipt-expenses h5 {
    font-weight: 700;
    color: #166534;
    margin-bottom: 14px;
}

.receipt-expenses .list-group-item {
    background: transparent;
    border-color: rgba(22, 163, 74, 0.15);
    padding-left: 0;
    padding-right: 0;
}

.receipt-expenses .list-group-item span:first-child {
    color: #0f172a;
}

.receipt-expenses .list-group-item span:last-child {
    font-weight: 600;
    color: #14532d;
}

@media (max-width: 768px) {
    .receipt-form .satir-row {
        grid-template-columns: 1fr;
    }

    .receipt-form .form-actions {
        flex-direction: column;
    }
}
