/* =============================================
   Banka Taksit Hesaplama - Custom Styles
   ============================================= */

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e1b4b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 50px -12px rgba(79,70,229,0.15), 0 8px 20px -6px rgba(0,0,0,0.08);
    --shadow-xl: 0 25px 60px -15px rgba(79,70,229,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ================
   Hero Section
   ================ */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 50%, var(--primary) 100%);
    padding: 80px 0 120px;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: white;
}

.shape-1 {
    width: 400px; height: 400px;
    top: -100px; right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 250px; height: 250px;
    bottom: -60px; left: 10%;
    animation: float 6s ease-in-out 1s infinite;
}

.shape-3 {
    width: 150px; height: 150px;
    top: 30%; left: 60%;
    animation: float 7s ease-in-out 0.5s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
}

/* ================
   Calculator Section
   ================ */
.calculator-section {
    margin-top: -60px;
    padding-bottom: 80px;
    position: relative;
    z-index: 2;
}

.calc-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.calc-card-header {
    padding: 36px 36px 28px;
    background: linear-gradient(to bottom, var(--gray-50), #fff);
    border-bottom: 1px solid var(--gray-200);
}

.calc-card-body {
    padding: 36px;
    min-height: 200px;
}

.form-label-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.form-label-custom i {
    color: var(--primary);
    font-size: 1rem;
}

.input-group-custom .input-group-text {
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 0 18px;
}

.input-group-custom .form-control {
    border: 2px solid var(--gray-200);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 18px;
    transition: var(--transition);
}

.input-group-custom .form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}

.select-custom {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 500;
    padding: 14px 18px;
    transition: var(--transition);
    cursor: pointer;
}

.select-custom:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    width: 80px; height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-icon i {
    font-size: 2rem;
    color: #fff;
}

.empty-state h5 {
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    max-width: 380px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* Result Table */
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-header h5 {
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.table-modern {
    border-collapse: separate;
    border-spacing: 0 4px;
}

.table-modern thead th {
    background: var(--gray-800);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 18px;
    border: none;
    white-space: nowrap;
}

.table-modern thead th:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.table-modern thead th:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

.table-modern tbody tr:hover {
    transform: scale(1.01);
}

.table-modern tbody td {
    padding: 16px 18px;
    border: none;
    background: var(--gray-50);
    font-weight: 500;
    vertical-align: middle;
}

.table-modern tbody tr:hover td {
    background: rgba(79,70,229,0.04);
}

.table-modern tbody td:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.table-modern tbody td:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.installment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.amount-text {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1.05rem;
}

.total-text {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}

.commission-text {
    font-weight: 500;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.single-payment-row td {
    background: rgba(16,185,129,0.06) !important;
}

.single-payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--success);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Alert */
.alert {
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* Footer */
.site-footer {
    padding: 30px 0;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* ================
   Admin Panel Styles
   ================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 270px;
    background: linear-gradient(180deg, var(--dark) 0%, var(--primary-dark) 100%);
    padding: 0;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand h4 {
    color: #fff;
    font-weight: 700;
    margin: 0;
    font-size: 1.15rem;
}

.sidebar-brand small {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}

.sidebar-nav {
    list-style: none;
    padding: 16px 12px;
    margin: 0;
}

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

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-nav a i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.admin-content {
    margin-left: 270px;
    flex: 1;
    padding: 32px 40px;
    background: var(--gray-50);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header h2 {
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.admin-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.admin-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-header h5 {
    font-weight: 700;
    margin: 0;
    color: var(--gray-800);
}

.admin-card-body {
    padding: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--gray-100);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--gray-200);
}

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

.admin-table tr:hover td {
    background: var(--gray-50);
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
    color: #fff;
}

.btn-sm-custom {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: 8px;
}

.btn-danger-custom {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger-custom:hover {
    background: #dc2626;
    color: #fff;
}

.btn-success-custom {
    background: var(--success);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-success-custom:hover {
    background: #059669;
    color: #fff;
}

.btn-warning-custom {
    background: var(--warning);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-warning-custom:hover {
    background: #d97706;
    color: #fff;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: rgba(16,185,129,0.1);
    color: var(--success);
}

.status-passive {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 50%, var(--primary) 100%);
    position: relative;
    overflow: hidden;
}

.login-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
}

.login-card h3 {
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.login-card p {
    color: var(--gray-500);
    margin-bottom: 32px;
}

.login-card .form-control {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.login-card .form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}

.login-card .form-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79,70,229,0.35);
}

/* Stats Cards */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-icon.bg-primary-g { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.stat-icon.bg-success-g { background: linear-gradient(135deg, var(--success), #34d399); }
.stat-icon.bg-secondary-g { background: linear-gradient(135deg, var(--secondary), var(--accent)); }

.stat-info h3 {
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.8rem;
    margin: 0;
    line-height: 1;
}

.stat-info p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin: 4px 0 0;
    font-weight: 500;
}

/* Form Group */
.form-group-custom {
    margin-bottom: 20px;
}

.form-group-custom label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.form-group-custom .form-control,
.form-group-custom .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    transition: var(--transition);
}

.form-group-custom .form-control:focus,
.form-group-custom .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-section { padding: 50px 0 90px; }
    .calc-card-header, .calc-card-body { padding: 24px; }
    .admin-sidebar { display: none; }
    .admin-content { margin-left: 0; padding: 20px; }
}
