/**
 * LifeWater - Ana Tasarım Sistemi (Design System)
 * Modern, Glassmorphism, Micro-animations ve Tam Türkçe Karakter Destekli
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&subset=latin,latin-ext&display=swap');

:root {
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    --primary-glow: rgba(2, 132, 199, 0.25);
    
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    --accent-light: #cffafe;
    
    --dark: #0f172a;
    --dark-surface: #1e293b;
    --dark-muted: #334155;
    
    --light: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-glow: rgba(239, 68, 68, 0.2);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 6px 14px -2px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.35);
    
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Modern & Zarif Kaydırma Çubukları (Custom Scrollbars) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Tipografi */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.025em;
    line-height: 1.3;
}

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.25;
    user-select: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0284c7 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
    background: #ffffff;
    color: var(--dark);
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--border-hover);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--success-glow);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--danger-glow);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
    font-weight: 700;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Kartlar */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 26px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(2, 132, 199, 0.25);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Rozetler (Badges) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9999px;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap !important;
    word-break: keep-all !important;
    flex-shrink: 0 !important;
}

.badge-primary { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.badge-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-muted   { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Tablolar & Responsive Kart Görünümü */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    margin-bottom: 0;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

/* Geniş yönetim tabloları için minimum genişlik - sütunlar ASLA birbirine girip kelimeleri alt alta kırmaz */
.table-wide {
    min-width: 1050px;
}

.table-cariler {
    min-width: 1260px;
}

.table-borclar {
    min-width: 1280px;
}

.table-tahsilatlar {
    min-width: 1100px;
}

.table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap !important;
    vertical-align: middle;
}

.table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
    color: var(--text-main);
}

/* Tablo Sütun Hizalama ve Taşma Engelleme */
.nowrap {
    white-space: nowrap !important;
}

.col-code {
    white-space: nowrap !important;
    width: 115px;
    min-width: 115px;
}

.col-type {
    white-space: nowrap !important;
    width: 110px;
    min-width: 110px;
}

.col-title {
    min-width: 250px;
}

.col-title .title-unvan {
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap !important;
    word-break: keep-all !important;
}

.col-title .title-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap !important;
    word-break: keep-all !important;
}

.col-contact {
    white-space: nowrap !important;
    min-width: 190px;
}

.col-money {
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
}

.col-date {
    white-space: nowrap !important;
    min-width: 130px;
}

.col-status {
    white-space: nowrap !important;
    min-width: 110px;
}

.col-desc {
    min-width: 250px;
    max-width: 380px;
    line-height: 1.5;
}

.col-actions {
    white-space: nowrap !important;
    width: 1%;
    text-align: right;
}

.table-actions-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
}

.table-actions-group .btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

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

.table tbody tr {
    transition: var(--transition);
}

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

/* Form Elemanları */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
    letter-spacing: -0.01em;
}

.form-control, .form-select {
    width: 100%;
    height: 48px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background-color: #ffffff;
    color: var(--dark);
    transition: var(--transition);
    outline: none;
    box-sizing: border-box;
    line-height: normal;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230284c7' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    padding-right: 44px;
    cursor: pointer;
}

.form-control:hover, .form-select:hover {
    border-color: var(--primary);
    background-color: #fbfcfe;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background-color: #ffffff;
}

.form-select option {
    background-color: #ffffff;
    color: var(--dark);
    padding: 8px 12px;
}

textarea.form-control {
    height: auto !important;
    min-height: 90px;
    padding: 12px 16px;
    resize: vertical;
}

/* Tutar Giriş Kutusu & Para Birimi İkonu (Amount Input Wrapper) */
.amount-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.amount-input-wrapper .currency-symbol {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

.amount-input-wrapper .form-control,
.amount-input-wrapper input {
    padding-left: 36px !important;
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    width: 100%;
    height: 48px;
    box-sizing: border-box;
}

/* Seçim Kartları (Ödeme/Tahsilat Yöntemi Radio Kartları) */
.method-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .method-select-grid {
        grid-template-columns: 1fr;
    }
}

.method-select-card {
    position: relative;
    border: 1.5px solid var(--border);
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    user-select: none;
}

.method-select-card:hover {
    border-color: var(--border-hover);
    background: #ffffff;
}

.method-select-card:has(input:checked),
.method-select-card.active {
    border-color: var(--primary) !important;
    background: #f0f9ff !important;
    box-shadow: 0 0 0 1px var(--primary);
}

.method-select-card .method-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-select-card input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.method-select-card .method-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.method-select-card .method-desc {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 28px;
    line-height: 1.4;
}

/* Form Buton Hizalama Grubu */
.form-actions {
    margin-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.form-actions .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Uyarı Mesajları (Alerts) */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 22px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.25s ease-out;
}

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

.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-info    { background: #f0f9ff; color: #075985; border-color: #bae6fd; }

/* Grid ve Flexbox Kolon Sistemi */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.row > [class*="col-"] {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}

.col-12 { width: 100%; flex: 0 0 100%; max-width: 100%; }
.col-md-3 { width: 25%; flex: 0 0 25%; max-width: 25%; }
.col-md-4 { width: 33.333333%; flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-6 { width: 50%; flex: 0 0 50%; max-width: 50%; }
.col-md-8 { width: 66.666667%; flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-md-9 { width: 75%; flex: 0 0 75%; max-width: 75%; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    .col-md-3, .col-md-4 {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 16px;
    }
    .col-md-6, .col-md-8, .col-md-9 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 16px;
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .card { padding: 18px; }
    .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-md-9 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 16px;
    }
}

/* Margin & Padding Yardımcı Sınıfları */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mb-5 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.mt-5 { margin-top: 32px !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 4px !important; }
.pt-2 { padding-top: 8px !important; }
.pt-3 { padding-top: 16px !important; }
.pt-4 { padding-top: 24px !important; }

.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 20px !important; }

.nowrap { white-space: nowrap !important; }

/* Yardımcı Sınıflar */
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* PayTR Taksit Tablosu Temel Stilleri */
#paytr_taksit_tablosu {
    clear: both;
    font-size: 12px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-family: inherit;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
#paytr_taksit_tablosu::before { display: table; content: " "; }
#paytr_taksit_tablosu::after { content: ""; clear: both; display: table; }

.taksit-tablosu-wrapper {
    margin: 0 !important;
    width: 250px;
    padding: 14px;
    cursor: default;
    text-align: center;
    display: inline-block;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.taksit-tablosu-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.08);
    border-color: #bae6fd;
}
.taksit-logo img {
    max-height: 28px;
    padding-bottom: 8px;
    object-fit: contain;
}
.taksit-baslik {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 4px;
}
.taksit-tutari-text {
    float: none !important;
    width: 50%;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.taksit-tutar-wrapper {
    display: flex !important;
    justify-content: space-between;
    background-color: #f8fafc;
    border-radius: 6px;
    margin-bottom: 4px;
    padding: 5px 8px;
    transition: background 0.15s ease;
}
.taksit-tutar-wrapper:hover {
    background-color: #e0f2fe;
}
.taksit-tutari {
    float: none !important;
    width: 50%;
    padding: 0 !important;
    color: #1e293b;
    border: none !important;
    font-size: 12px;
}
.taksit-tutari-bold {
    font-weight: 700;
    color: #0284c7;
}
@media all and (max-width: 600px) {
    .taksit-tablosu-wrapper {
        width: 100% !important;
        margin: 4px 0 !important;
    }
}

