/* 
    Titan Bank - Premium Design System
    Theme: Skyrun Trust / Light Professional
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --primary: #2b5ae1;
    --primary-hover: #1e42b0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --border-light: #e2e8f0;
    --input-bg: #f8fafb;
    --danger: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 480px;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid var(--border-light);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: #334155;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group-custom {
    position: relative !important;
    display: block !important;
    width: 100%;
}

.input-group-custom i, 
.input-group-custom svg {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--text-dim);
    width: 18px !important;
    height: 18px !important;
    pointer-events: none;
    z-index: 10;
    display: block !important;
}

.input-group-custom i.icon-left, 
.input-group-custom svg.icon-left {
    left: 15px !important;
}

.input-group-custom i.icon-right, 
.input-group-custom svg.icon-right {
    right: 15px !important;
    transition: transform 0.3s ease !important;
}

.form-control:focus ~ .icon-right {
    transform: translateY(-50%) rotate(180deg) !important;
    color: var(--primary) !important;
}

.form-control {
    width: 100% !important;
    background-color: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 0 15px 0 45px !important;
    font-size: 14px;
    color: var(--text-main);
    height: 50px !important;
    line-height: 50px;
    appearance: none; /* Hide default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-control:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(43, 90, 225, 0.08);
    outline: none;
}

.form-control:focus + i, 
.form-control:focus ~ i,
.form-control:focus + svg,
.form-control:focus ~ svg {
    color: var(--primary) !important;
}

.form-control.is-invalid {
    border-color: var(--danger);
    background-color: rgba(239, 68, 68, 0.02);
}

.error-message {
    font-size: 11px;
    color: var(--danger);
    margin-top: 5px;
    display: none;
    font-weight: 600;
}

.is-invalid + .error-message {
    display: block;
}

/* Responsive Dashboard Layout */
.dashboard-container {
    background: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
    position: relative;
}

.dashboard-top-bar {
    height: 70px;
    z-index: 1050;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    right: 0;
    left: 260px;
}

.sidebar { 
    width: 260px !important; 
    height: 100vh !important; 
    background: #fff !important; 
    position: fixed !important; 
    left: 0 !important; 
    top: 0 !important; 
    border-right: 1px solid #e2e8f0 !important; 
    z-index: 1100 !important; 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
}

.main-content { 
    margin-left: 260px !important; 
    padding: 30px !important; 
    padding-top: 100px !important;
    min-height: 100vh !important; 
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 260px) !important; /* Force width */
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1090;
    display: none;
    backdrop-filter: blur(2px);
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-260px) !important; }
    .sidebar.active { transform: translateX(0) !important; }
    .main-content { margin-left: 0 !important; width: 100% !important; padding: 20px !important; padding-top: 90px !important; }
    .dashboard-top-bar { left: 0 !important; width: 100% !important; }
    .sidebar-overlay.active { display: block; }
}

/* Rock Solid Grid */
.main-content .row {
    margin-right: -15px !important;
    margin-left: -15px !important;
    width: auto !important;
}

.nav-link { 
    display: flex !important;
    align-items: center !important;
    padding: 14px 25px !important; 
    color: #64748b !important; 
    font-weight: 600 !important; 
    font-size: 14px !important; 
    transition: all 0.2s ease !important; 
    text-decoration: none !important;
    border-left: 3px solid transparent;
}

.nav-link i, 
.nav-link svg { 
    width: 18px !important; 
    height: 18px !important; 
    margin-right: 12px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-link:hover { 
    background: rgba(43, 90, 225, 0.05) !important; 
    color: #2b5ae1 !important; 
}

.nav-link.active-sub {
    color: #2b5ae1 !important;
    font-weight: 800 !important;
}

.nav-link.active { 
    background: rgba(43, 90, 225, 0.1) !important; 
    color: #2b5ae1 !important; 
    border-left: 3px solid #2b5ae1;
    border-right: none !important;
}

.summary-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    height: 100%;
}

.progress-thin {
    height: 4px;
    background: #f1f5f9;
    border-radius: 10px;
}

.blue-balance-card {
    background: #2b5ae1;
    color: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.btn-blue {
    background: #2b5ae1;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    padding: 8px 15px;
}

.login-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(43, 90, 225, 0.3);
}

.login-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(43, 90, 225, 0.4);
}

/* Global SweetAlert Overrides */
.swal2-popup {
    font-family: 'Nunito Sans', sans-serif !important;
    border-radius: 20px !important;
}

.swal2-title {
    font-weight: 800 !important;
    color: var(--text-main) !important;
}

.swal2-confirm {
    border-radius: 10px !important;
    font-weight: 700 !important;
    padding: 12px 30px !important;
}

/* Dashboard Sidebar & Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

/* Registration Page Styles */
.reg-container {
    display: flex;
    min-height: 100vh;
}

.reg-hero {
    flex: 1;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?auto=format&fit=crop&q=80&w=1000');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: white;
}

.reg-hero-content h1 {
    font-size: 40px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.reg-form-container {
    flex: 1;
    background: white;
    padding: 60px;
    overflow-y: auto;
}

/* Stepper Alignment */
.stepper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 40px;
    width: 100%;
    gap: 0;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.step.active {
    background: var(--primary);
    color: white;
}

.step.completed {
    background: var(--primary);
    color: white;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #f1f5f9;
    max-width: 60px;
}

.step-line.active {
    background: var(--primary);
}

/* Profile Bubble Widget */
.profile-widget {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: #111;
    color: white;
    padding: 25px;
    border-radius: 12px;
    width: 220px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.profile-avatar {
    width: 60px;
    height: 60px;
    background: #333;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}

.profile-status {
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
}

.icon-circle-premium {
    width: 60px;
    height: 60px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.icon-circle-premium i,
.icon-circle-premium svg {
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
}

/* Dashboard Premium Components */
.balance-card-premium {
    background: linear-gradient(135deg, #1e42b0 0%, #2b5ae1 100%) !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 30px !important;
    box-shadow: 0 15px 35px rgba(43, 90, 225, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 25px !important;
}

.balance-card-premium::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.balance-card-premium h2, 
.balance-card-premium h5, 
.balance-card-premium p {
    color: #fff !important;
}

.summary-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #eef2f7;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.stat-label { font-size: 12px; color: #64748b; font-weight: 700; margin-bottom: 5px; }
.stat-value { font-size: 14px; font-weight: 800; color: #1e293b; }

.table-premium thead { background: #f0f7ff; }
.table-premium th { 
    font-size: 11px; 
    color: #64748b; 
    font-weight: 800; 
    border: none; 
    padding: 15px; 
    white-space: nowrap; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table-premium td { 
    font-size: 13px; 
    padding: 18px 15px; 
    border-bottom: 1px solid #f1f5f9; 
    white-space: nowrap; 
}

.action-btn-outline { 
    border: 2px solid #2b5ae1; 
    color: #2b5ae1 !important; 
    background: transparent !important; 
    font-size: 13px; 
    font-weight: 800; 
    padding: 12px 20px; 
    border-radius: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.action-btn-outline:hover { 
    background: #2b5ae1 !important; 
    color: #fff !important; 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(43, 90, 225, 0.2);
}

.btn-premium-primary {
    background: #2b5ae1 !important;
    color: #fff !important;
    border: none !important;
    font-size: 13px;
    font-weight: 800;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.2s;
    box-shadow: 0 5px 15px rgba(43, 90, 225, 0.3);
}

.btn-premium-primary:hover {
    background: #1e42b0 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(43, 90, 225, 0.4);
}

.dashboard-icon { width: 24px !important; height: 24px !important; }

/* ── Transaction type badges ── */
.badge-goldiron {
    background-color: rgba(184, 134, 11, 0.12);
    color: #92680a;
    font-weight: 700;
}

.badge-credit {
    background-color: rgba(43, 90, 225, 0.10);
    color: #2b5ae1;
    font-weight: 700;
}

/* Admin profile header */
.profile-header {
    background: linear-gradient(135deg, #1e42b0 0%, #2b5ae1 100%);
    color: #fff;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(43, 90, 225, 0.2);
}
