/* Modern Kasadefteri Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #6366f1;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
    --text: #374151;
    --text-muted: #6b7280;
    --sidebar-width: 280px;
    --header-height: 70px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.sidebar-header i {
    font-size: 28px;
    color: var(--primary);
}

.sidebar-header span {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-menu {
    flex: 1;
    padding: 24px 16px;
    list-style: none;
    overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    transform: translateX(4px);
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.sidebar-menu a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.user-info i {
    font-size: 24px;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

/* Mobile Toggle */
.mobile-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999;
    background: var(--primary);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 22px;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 991px) {
    .mobile-toggle { display: flex; align-items: center; justify-content: center; }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.active { transform: translateX(0); }
    .main-content {
        margin-left: 0 !important;
        padding: 80px 20px 20px 20px !important;
    }
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 40px;
    background: var(--light);
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    font-weight: 600;
    font-size: 18px;
    color: var(--dark);
    border-radius: 16px 16px 0 0 !important;
}

.card-body {
    padding: 24px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: transparent;
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 12px 0 8px 0;
    line-height: 1;
}

.stat-card h4 {
    font-size: 28px;
    font-weight: 700;
    margin: 12px 0 8px 0;
}

.stat-card p {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Forms */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 14px;
}

/* Tables */
.table {
    font-size: 14px;
    color: var(--text);
}

.table thead th {
    background: var(--light);
    border-bottom: 2px solid var(--border);
    color: var(--dark);
    font-weight: 700;
    padding: 14px 16px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.table tbody tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background: var(--light);
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 8px;
    font-size: 12px;
}

/* Alerts */
.alert {
    border-radius: 12px;
    padding: 16px 20px;
    border: none;
    font-weight: 500;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 24px;
    background: var(--light);
    border-radius: 16px 16px 0 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
}

/* Utilities */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .stat-card {
    animation: fadeIn 0.3s ease-out;
}

/* Print */
@media print {
    .sidebar, .mobile-toggle, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { background: white; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
/* Customer Cards */
.customer-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.customer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    border-color: var(--primary);
}

.customer-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.customer-avatar i {
    font-size: 28px;
    color: white;
}

.customer-name {
    color: var(--dark);
    font-size: 15px;
    line-height: 1.3;
}

.customer-info {
    font-size: 13px;
}

.customer-info .info-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    color: var(--text);
}

.customer-info .info-item i {
    font-size: 14px;
    width: 18px;
}

.customer-info .info-item a {
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
}

.customer-info .info-item a:hover {
    color: var(--primary);
}

.customer-balance {
    margin-top: 12px;
}

.balance-box {
    background: var(--light);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border);
}

.balance-box small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-box strong {
    font-size: 16px;
    display: block;
    font-weight: 700;
}

.balance-alacak:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--success);
}

.balance-borc:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: var(--danger);
}

.hover-shadow {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Pagination */
.pagination-sm .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    padding: 6px 12px;
}

.pagination-sm .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-sm .page-link:hover {
    background: var(--light);
    border-color: var(--primary);
    color: var(--primary);
}