/* ============================================
   Sanal POS Tahsilat Sistemi - Stil Dosyasi
   ============================================ */

:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 0px;
    --navbar-height: 56px;
    --sidebar-bg: #212529;
    --sidebar-hover: #343a40;
    --sidebar-active: #0d6efd;
    --sidebar-text: #ced4da;
    --sidebar-section: #6c757d;
}

/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.875rem;
    background-color: #f5f5f5;
}

/* Admin panel layout — fixed navbar için padding */
body.admin-layout {
    padding-top: var(--navbar-height);
}

/* Navbar */
.navbar {
    height: var(--navbar-height);
    z-index: 1030;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-size: 1rem;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    z-index: 1020;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
    padding-bottom: 2rem;
}

#sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

.sidebar-content {
    padding: 0.5rem 0;
}

#sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

#sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}

#sidebar .nav-link.active {
    background-color: rgba(13, 110, 253, 0.15);
    color: #fff;
    border-left-color: var(--sidebar-active);
}

#sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* Nav Section Title */
.nav-section {
    margin-top: 0.5rem;
}

.nav-section-title {
    display: block;
    padding: 0.5rem 1.2rem 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--sidebar-section);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Content */
#main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - var(--navbar-height));
}

#main-content.expanded {
    margin-left: 0;
}

/* Dashboard Cards */
.stat-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,.1);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-change {
    font-size: 0.75rem;
}

/* Tables */
.table > thead {
    background-color: #f8f9fa;
}

.table > thead th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
    font-size: 0.85rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    border-radius: 0.5rem;
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175);
}

.login-card .card-body {
    padding: 2.5rem;
}

/* Form */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
}

/* Badge */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Payment Card Form */
.card-input-group {
    position: relative;
}

.card-input-group .card-type-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

/* Installment Table (legacy) */
.installment-table {
    font-size: 0.8rem;
}

.installment-table .selected {
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-left: 3px solid #0d6efd;
}

.installment-table td,
.installment-table th {
    padding: 0.4rem 0.6rem;
}

/* Installment Radio Items */
.installment-radio-item {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.4rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.installment-radio-item:hover {
    border-color: #0d6efd;
    background-color: #f8f9ff;
}

.installment-radio-item.selected {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.08);
    box-shadow: 0 0 0 1px #0d6efd;
}

.installment-radio-item label {
    margin: 0;
}

.installment-radio-item .form-check-input {
    margin-top: 0;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }

    #sidebar.show {
        transform: translateX(0);
    }

    #main-content {
        margin-left: 0;
    }
}

/* Print */
@media print {
    .navbar, #sidebar, .no-print {
        display: none !important;
    }
    #main-content {
        margin-left: 0 !important;
    }
}

/* DataTables Override */
.dataTables_wrapper .dataTables_length select {
    min-width: 60px;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 200px;
}

/* Scrollbar */
#sidebar::-webkit-scrollbar {
    width: 4px;
}

#sidebar::-webkit-scrollbar-thumb {
    background-color: #495057;
    border-radius: 2px;
}

/* Alert Dismissible */
.alert {
    font-size: 0.85rem;
}

/* Breadcrumb */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h4 {
    font-weight: 600;
    margin-bottom: 0;
}

/* Action Buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Filter Card */
.filter-card {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.05);
}
