/* ===== Genel Stiller ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #6b7280;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --bg: #f9fafb;
    --bg-dark: #1f2937;
    --text: #111827;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --sidebar-width: 260px;
    --topbar-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ===== Login Sayfası ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: loginSlideIn 0.6s ease-out;
}

@keyframes loginSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    max-width: 120px;
    max-height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
    animation: logoFadeIn 0.8s ease-out;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.title-main {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.title-sub {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.login-form .form-group {
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.login-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.login-form .form-group:nth-child(2) { animation-delay: 0.2s; }
.login-form .form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

.login-form label i {
    color: var(--primary);
    font-size: 16px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-form .btn {
    margin-top: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.login-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.animated {
    animation: fadeIn 0.6s ease-out;
}

.animated-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animated-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== Login Sayfası Responsive ===== */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
        padding: 15px;
    }
    
    .login-box {
        padding: 35px 25px;
        border-radius: 15px;
    }
    
    .login-logo {
        max-width: 100px;
        max-height: 70px;
    }
    
    .title-main {
        font-size: 26px;
    }
    
    .title-sub {
        font-size: 14px;
    }
    
    .login-form input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .login-form .btn {
        padding: 12px;
        font-size: 15px;
    }
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-dark);
    color: white;
    z-index: 1000;
    transition: transform 0.3s;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sidebar-logo {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.sidebar-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin: 0;
    flex: 1;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: none;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
    min-width: 0;
}

.user-info i {
    font-size: 20px;
    margin-right: 8px;
    flex-shrink: 0;
}

.user-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.sidebar-footer .btn {
    padding: 8px 12px;
    min-width: auto;
    width: auto;
    flex-shrink: 0;
}

.sidebar-footer .btn i {
    margin: 0;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s;
}

.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    margin-right: 16px;
    display: none;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    flex: 1;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
    position: relative;
}

.btn-icon:hover {
    background: var(--bg);
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.page-content {
    padding: 24px;
    position: relative;
    z-index: 1;
    animation: pageFadeIn 0.5s ease-out;
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translate(-30px, -50px) rotate(-2deg);
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    }
    to {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes pageSlideOut {
    from {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    to {
        opacity: 0;
        transform: translate(30px, 50px) rotate(2deg);
        clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    }
}

/* ===== Butonlar ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== Kartlar ===== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

/* ===== Dashboard ===== */
.dashboard {
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue { background: var(--primary); }
.stat-icon.red { background: var(--danger); }
.stat-icon.green { background: var(--success); }
.stat-icon.orange { background: var(--warning); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* ===== Tablolar ===== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table thead {
    background: var(--bg);
}

.table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.table tbody tr:hover {
    background: var(--bg);
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-light); }
.text-center { text-align: center; }

/* ===== Formlar ===== */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    font-family: inherit;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* PDF Modal Özel Stilleri */
.pdf-modal .modal-content {
    max-width: 95vw;
    width: 100%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.pdf-modal-body {
    overflow-y: auto;
    overflow-x: auto;
    flex: 1;
    padding: 0;
    max-height: calc(95vh - 140px);
}

.pdf-modal .pdf-preview-container {
    padding: 20px;
    background: #e5e7eb;
    display: flex;
    justify-content: center;
    min-height: 100%;
}

.pdf-modal .a4 {
    width: 100%;
    max-width: 794px;
    margin: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .pdf-modal .modal-content {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .pdf-modal-body {
        max-height: calc(100vh - 120px);
    }
    
    .pdf-modal .pdf-preview-container {
        padding: 10px;
    }
    
    .pdf-modal .a4 {
        padding: 12px;
    }
}

/* ===== Bildirimler ===== */
.notifications-container {
    position: fixed;
    top: 20px;
    left: calc(var(--sidebar-width) + 20px);
    z-index: 3000;
    max-width: 400px;
    transition: left 0.3s;
}

.notification {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s;
    border-left: 4px solid;
}

.notification.success { border-left-color: var(--success); }
.notification.error { border-left-color: var(--danger); }
.notification.warning { border-left-color: var(--warning); }
.notification.info { border-left-color: var(--info); }

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification.success .notification-icon { color: var(--success); }
.notification.error .notification-icon { color: var(--danger); }
.notification.warning .notification-icon { color: var(--warning); }
.notification.info .notification-icon { color: var(--info); }

.notification-content {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== Sayfa Başlıkları ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-left h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    padding-left: 40px;
}

/* ===== Müşteriler Sayfası ===== */
.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 4px;
    border-radius: 8px;
}

.view-toggle .btn-icon.active {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.customers-container {
    display: grid;
    gap: 20px;
}

.customers-container.list-view {
    grid-template-columns: 1fr;
}

.customers-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.customer-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.customer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.customer-card-overpaid {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
}

.customer-card-debt {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

.customer-card-clear {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.customer-row-overpaid {
    background: #eff6ff;
}

.customer-row-overpaid:hover {
    background: #dbeafe;
}

.customer-row-debt {
    background: #fef2f2;
}

.customer-row-debt:hover {
    background: #fee2e2;
}

.customer-row-clear {
    background: #f0fdf4;
}

.customer-row-clear:hover {
    background: #dcfce7;
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.customer-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.customer-info {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 4px;
}

.customer-debt {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.debt-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--danger);
}

.customer-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* ===== Loading ===== */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.loading-spinner i {
    font-size: 32px;
    margin-bottom: 12px;
}

/* ===== Alert ===== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

/* ===== PDF Stilleri ===== */
.pdf-preview-container {
    background: #e5e7eb;
    padding: 40px;
    display: flex;
    justify-content: center;
}

.a4 {
    position: relative;
    width: 794px;
    min-height: 1123px;
    margin: 0 auto;
    background: white;
    color: #0b0e14;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 28px;
}

.pdf-header {
    display: flex;
    gap: 16px;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.logo-wrap {
    width: 160px;
    height: 80px;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-placeholder {
    font-size: 32px;
    color: #ccc;
}

.company-info {
    flex: 1;
    font-size: 12px;
    line-height: 1.6;
}

.company-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pdf-title {
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

.info-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
}

.info-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #374151;
}

.pdf-items {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 12px;
}

.pdf-items th {
    background: #f3f4f6;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #d1d5db;
}

.pdf-items td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.pdf-items tbody tr:nth-child(odd) {
    background: #f9fafb;
}

.pdf-totals {
    margin-top: 20px;
    margin-left: auto;
    width: 300px;
}

.totals-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #d1d5db;
    font-size: 14px;
}

.totals-line.grand {
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
    border-bottom: 2px solid #111827;
}

.notes {
    margin-top: 30px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.notes-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.pdf-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.signature {
    text-align: center;
}

.sig-line {
    width: 200px;
    height: 1px;
    background: #111827;
    margin-top: 40px;
}

.pdf-theme-sablon1 {
    --accent: #3b82f6;
}

.pdf-theme-sablon1 .pdf-header {
    border-bottom: 3px solid var(--accent);
}

.pdf-theme-sablon1 .pdf-items th {
    background: #eff6ff;
    border-bottom: 2px solid #93c5fd;
}

/* PDF Renk Kodlaması */
.pdf-row-overpaid {
    background: #eff6ff !important;
}

.pdf-row-overpaid td {
    color: #1e40af;
    font-weight: 500;
}

.pdf-row-debt {
    background: #fef2f2 !important;
}

.pdf-row-debt td {
    color: #991b1b;
    font-weight: 500;
}

.pdf-row-paid {
    background: #f0fdf4 !important;
}

.pdf-row-paid td {
    color: #065f46;
}

.pdf-text-overpaid {
    color: #1e40af !important;
    font-weight: 600;
}

.pdf-text-debt {
    color: #991b1b !important;
    font-weight: 600;
}

/* ===== Tema Preset'leri ===== */
.theme-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.theme-preset {
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s;
    background: white;
    text-align: center;
}

.theme-preset:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-preset.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.theme-preview {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    justify-content: center;
}

.theme-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-top: 4px;
}

/* ===== Badge ===== */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-secondary {
    background: #e5e7eb;
    color: #374151;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== Takvim ===== */
.calendar-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    text-align: center;
    margin-bottom: 24px;
}

.calendar-header h3 {
    font-size: 24px;
    font-weight: 600;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    padding: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-day:hover {
    background: var(--bg);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.calendar-day.has-payment {
    border-color: var(--success);
    border-width: 2px;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 4px;
}

.calendar-day-payment {
    font-size: 10px;
    color: var(--success);
    font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .notifications-container {
        left: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .customers-container.grid-view {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
    }
    
    .filters-bar {
        flex-direction: column;
    }
    
    .pdf-preview-container {
        padding: 10px;
        overflow-x: auto;
    }
    
    .a4 {
        width: 100%;
        min-width: 100%;
        padding: 16px;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .page-header-right {
        width: 100%;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .page-header-right .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .pdf-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .logo-wrap {
        width: 100%;
        max-width: 200px;
        height: 80px;
    }
    
    .company-info {
        font-size: 11px;
    }
    
    .company-name {
        font-size: 16px;
    }
    
    .pdf-title {
        font-size: 18px;
        margin: 16px 0;
    }
    
    .pdf-items {
        font-size: 11px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pdf-items table {
        width: 100%;
        min-width: 600px;
    }
    
    .pdf-items th,
    .pdf-items td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .pdf-totals {
        width: 100%;
        margin-left: 0;
    }
    
    .totals-line {
        font-size: 13px;
    }
    
    .totals-line.grand {
        font-size: 16px;
    }
    
    .info-card {
        padding: 10px;
        font-size: 11px;
    }
    
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day {
        padding: 4px;
        font-size: 12px;
    }
    
    .settings-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .color-input-group {
        flex-direction: column;
    }
    
    .color-picker {
        width: 100%;
    }
    
    .logo-upload-controls {
        flex-direction: column;
    }
    
    .logo-upload-controls .btn {
        width: 100%;
    }
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.settings-container {
    max-width: 1000px;
}

/* Sekmeler */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Renk Seçici */
.color-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.color-picker {
    width: 60px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.color-input-group .form-control {
    flex: 1;
}

/* Logo Yükleme */
.logo-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    background: var(--bg);
}

.logo-preview {
    text-align: center;
    margin-bottom: 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder {
    color: var(--text-light);
    padding: 20px;
}

.logo-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.logo-placeholder p {
    margin: 0;
    font-size: 14px;
}

.logo-upload-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

#logoPreviewImg {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Ödeme Durum Renkleri */
.payment-status {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.status-overpaid {
    background: #dbeafe;
    color: #1e40af;
}

.status-debt {
    background: #fee2e2;
    color: #991b1b;
}

.status-clear {
    background: #d1fae5;
    color: #065f46;
}

tr.status-overpaid {
    background: #eff6ff;
}

tr.status-overpaid:hover {
    background: #dbeafe;
}

tr.status-debt {
    background: #fef2f2;
}

tr.status-debt:hover {
    background: #fee2e2;
}

tr.status-clear {
    background: #f0fdf4;
}

tr.status-clear:hover {
    background: #dcfce7;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.customer-select-container {
    margin-top: 12px;
}

.customer-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.customer-checkbox-item:hover {
    background: var(--bg);
}

.customer-checkbox-item input[type="checkbox"] {
    margin-right: 8px;
}

.customer-checkbox-item label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customer-checkbox-item .customer-info {
    font-size: 12px;
    color: var(--text-light);
}

/* ===== Takvim Liste Görünümü ===== */
.calendar-list-container {
    margin-top: 20px;
}

.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calendar-list-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all 0.3s ease;
}

.calendar-list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.calendar-list-date {
    min-width: 80px;
    text-align: center;
    padding: 12px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.calendar-list-date .date-day {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.calendar-list-date .date-month-year {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
    text-transform: capitalize;
}

.calendar-list-content {
    flex: 1;
}

.calendar-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.payment-count {
    font-size: 14px;
    color: var(--text-light-color);
    font-weight: 500;
}

.total-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
}

.calendar-list-payments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: 6px;
}

.payment-customer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.payment-customer i {
    color: var(--primary);
}

.payment-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-amount {
    font-weight: 600;
    color: var(--success);
}

.payment-method {
    font-size: 12px;
    color: var(--text-light-color);
    padding: 4px 8px;
    background: var(--bg-color);
    border-radius: 4px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light-color);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
}

@media (max-width: 768px) {
    .calendar-list-item {
        flex-direction: column;
    }
    
    .calendar-list-date {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 16px;
    }
    
    .calendar-list-date .date-day {
        font-size: 20px;
    }
    
    .payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .payment-details {
        width: 100%;
        justify-content: space-between;
    }
}

/* ===== Oranlar Stilleri ===== */
.rates-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.rate-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.rate-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.rate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rate-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rate-label {
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    margin: 0;
}

.rate-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rate-input-group .form-control {
    max-width: 150px;
}

.rate-suffix {
    color: var(--text-light);
    font-weight: 500;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider:active {
    box-shadow: 0 0 5px var(--primary);
}

/* ===== Müşteri Arama Sonuçları ===== */
#customerSearchResults {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.customer-search-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.customer-search-item:hover {
    background: #f9fafb;
}

.customer-search-item:last-child {
    border-bottom: none;
}

.customer-search-item:active {
    background: #f3f4f6;
}

