/* Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Global Styles */
* {
    font-family: 'Poppins', sans-serif;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}

/* Modern Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Modern Inputs */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    outline: none;
}

.form-control:hover,
.form-select:hover {
    border-color: #ced4da;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Modern Buttons */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
    transform: translateY(-2px);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
    transform: translateY(-2px);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #e68900 100%);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
    transform: translateY(-2px);
    color: #212529;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    box-shadow: 0 6px 16px rgba(23, 162, 184, 0.4);
    transform: translateY(-2px);
    color: white;
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
    transform: translateY(-2px);
}

.btn-outline-danger {
    border: 2px solid #dc3545;
    color: #dc3545;
    background: transparent;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Modern Link Buttons */
a.btn,
.btn-link {
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

a.btn-primary,
.btn-link-primary {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

a.btn-primary:hover,
.btn-link-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

a.btn-outline-primary,
.btn-link-outline-primary {
    color: #667eea;
    border: 2px solid #667eea;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: transparent;
}

a.btn-outline-primary:hover,
.btn-link-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

/* Action Links */
.action-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.action-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #5568d3;
    text-decoration: none;
    transform: translateX(4px);
}

.action-link-danger {
    color: #dc3545;
}

.action-link-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #c82333;
}

.action-link-success {
    color: #28a745;
}

.action-link-success:hover {
    background-color: rgba(40, 167, 69, 0.1);
    color: #218838;
}

/* Modern Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.table thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 0.875rem 1.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.table tbody tr {
    background: #fff;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f8f9ff;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: #495057;
    font-size: 0.9rem;
    border: none;
}

/* Override Bootstrap striped tables */
.table-striped > tbody > tr:nth-of-type(odd),
.table-striped > tbody > tr:nth-of-type(even) {
    background-color: #fff;
}

.table-striped > tbody > tr:hover {
    background-color: #f8f9ff;
}

/* Table hover effect override */
.table-hover > tbody > tr:hover {
    background-color: #f8f9ff;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(200, 35, 51, 0.1) 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(17, 122, 139, 0.1) 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

/* Input Groups */
.input-group .form-control,
.input-group .form-select {
    border-radius: 8px;
}

.input-group-text {
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 8px 0 0 8px;
    background-color: #f8f9fa;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* Dropdowns */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(4px);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Standard Bootstrap Pagination - Clean & Modern */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
    font-family: 'Poppins', sans-serif;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-link:hover {
    color: #0d6efd;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-link:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.page-item.active .page-link {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    pointer-events: none;
    opacity: 0.65;
}

/* Previous/Next buttons */
.page-item:first-child .page-link,
.page-item:last-child .page-link {
    min-width: auto;
    padding: 0.5rem 1rem;
}

/* Responsive Pagination */
@media (max-width: 576px) {
    .pagination {
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    
    .page-link {
        min-width: 34px;
        height: 34px;
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    .page-item:first-child .page-link,
    .page-item:last-child .page-link {
        padding: 0.375rem 0.75rem;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
}

/* Customer Index Cards */
.customer-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.customer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.customer-card .card-body {
    padding: 2rem;
}

.customer-card i {
    transition: all 0.3s ease;
}

.customer-card:hover i {
    transform: scale(1.1);
}

/* Sidebar Enhancements */
.sidebar-header h4 {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Page Headers */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-header h1,
.page-header h2,
.page-header h3 {
    font-weight: 600;
    color: #2c3e50;
}

/* Form Enhancements */
.form-floating > label {
    font-weight: 500;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Mobile Table to Card Conversion */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Hide table headers on mobile */
    .table-responsive .table thead {
        display: none;
    }
    
    /* Convert table rows to cards */
    .table-responsive .table tbody,
    .table-responsive .table,
    .table-responsive {
        display: block;
        width: 100%;
    }
    
    .table-responsive .table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        background: white !important;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        padding: 1rem;
        transition: all 0.3s ease;
    }
    
    .table-responsive .table tbody tr:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
        background: white !important;
    }
    
    .table-responsive .table tbody tr td {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
        border: none;
        text-align: left !important;
    }
    
    /* Add labels before each cell */
    .table-responsive .table tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #667eea;
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Action buttons styling */
    .table-responsive .table tbody tr td:last-child {
        padding-top: 1rem;
        margin-top: 0.5rem;
    }
    
    .table-responsive .table tbody tr td:last-child::before {
        content: 'İşlemler';
    }
    
    /* Badge and button adjustments */
    .table-responsive .table tbody tr td .badge {
        display: inline-block;
        margin-top: 0.25rem;
    }
    
    .table-responsive .table tbody tr td .btn {
        width: auto;
        display: inline-block;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* Remove table styling */
    .table-responsive .table {
        border: none;
        background: transparent;
    }
    
    .table-responsive .table tbody tr {
        border-collapse: separate;
    }
}

/* Alternative: Direct table to card conversion (for tables without table-responsive) */
@media (max-width: 768px) {
    .table:not(.table-responsive) {
        display: block;
        width: 100%;
    }
    
    .table:not(.table-responsive) thead {
        display: none;
    }
    
    .table:not(.table-responsive) tbody {
        display: block;
        width: 100%;
    }
    
    .table:not(.table-responsive) tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        background: white !important;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        padding: 1rem;
        transition: all 0.3s ease;
    }
    
    .table:not(.table-responsive) tbody tr:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
        background: white !important;
    }
    
    .table:not(.table-responsive) tbody tr td {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
        border: none;
        text-align: left !important;
    }
    
    .table:not(.table-responsive) tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #667eea;
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .table:not(.table-responsive) tbody tr td:last-child {
        padding-top: 1rem;
        margin-top: 0.5rem;
    }
    
    .table:not(.table-responsive) tbody tr td:last-child::before {
        content: 'İşlemler';
    }
}

/* JavaScript will add data-label attributes automatically */

