/* BPR ABCDE - Professional Banking Website */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #059669;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-gray: #f3f4f6;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6; color: var(--text); background: var(--bg);
}

/* Navbar */
.navbar {
    background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000;
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 1rem; display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
    font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none;
}
.nav-menu {
    display: flex; list-style: none; gap: 2rem; align-items: center;
}
.nav-link {
    text-decoration: none; color: var(--text); font-weight: 500; transition: color 0.2s;
}
.nav-link:hover { color: var(--primary); }
.nav-btn {
    background: var(--primary); color: white; padding: 0.5rem 1.25rem; border-radius: var(--radius);
    text-decoration: none; font-weight: 500; transition: background 0.2s;
}
.nav-btn:hover { background: var(--primary-dark); }
.mobile-menu-btn {
    display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer;
}
.mobile-menu-btn span {
    width: 24px; height: 2px; background: var(--text); transition: transform 0.2s;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    .nav-menu {
        display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
        background: var(--bg); padding: 1rem; border-bottom: 1px solid var(--border); gap: 1rem;
    }
    .nav-menu.active { display: flex; }
}

/* Buttons */
.btn {
    display: inline-block; padding: 0.75rem 1.5rem; border-radius: var(--radius); font-weight: 600; cursor: pointer;
    text-decoration: none; transition: all 0.2s; border: none; font-size: 1rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg-gray); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-block { display: block; width: 100%; text-align: center; }

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white;
    padding: 4rem 1rem; text-align: center;
}
.page-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.page-header p { opacity: 0.9; font-size: 1.1rem; }

/* Main Content */
.main-content { min-height: calc(100vh - 180px); }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg) 100%); padding: 4rem 1rem; text-align: center;
}
.hero-content { max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--text); }
.hero p { font-size: 1.2rem; color: var(--text-light); margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Features Grid */
.features { padding: 4rem 1rem; background: var(--bg); }
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto;
}
.feature-card {
    background: var(--bg-gray); padding: 2rem; border-radius: var(--radius); text-align: center;
    box-shadow: var(--shadow); transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 3rem; margin-bottom: 1rem; }
.savings-icon { font-size: 3rem; margin-bottom: 1rem; text-align: center; }
.feature-card h3 { margin-bottom: 0.75rem; color: var(--primary); }
.feature-card p { color: var(--text-light); }

/* Forms */
.auth-container, .contact-form { max-width: 480px; margin: 0 auto; padding: 2rem; }
.auth-box, .contact-form {
    background: white; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 2rem;
}
.auth-box h2, .contact-form h2 { margin-bottom: 1.5rem; text-align: center; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 1rem; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}
.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--text-light); }

}
.demo-credentials {
    background: var(--bg-gray);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}
.demo-credentials strong {
    color: var(--primary);
    font-family: monospace;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.auth-footer a { color: var(--primary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* About Page */
.about-content { max-width: 1200px; margin: 0 auto; padding: 3rem 1rem; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-text h2 { margin: 1.5rem 0 1rem; color: var(--primary); font-size: 1.75rem; }
.about-text h3 { margin: 1rem 0 0.5rem; font-size: 1.25rem; }
.about-text p { margin-bottom: 1rem; color: var(--text-light); }
.about-text ul { margin-left: 1.5rem; color: var(--text-light); }
.about-image img {
    width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
}
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
}

/* Contact Grid */
.contact-content { max-width: 1200px; margin: 0 auto; padding: 3rem 1rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-start; }
.contact-item .icon { font-size: 1.5rem; }
.contact-item strong { display: block; margin-bottom: 0.25rem; }

/* Loans & Savings Grids */
.loans-content, .savings-content { max-width: 1200px; margin: 0 auto; padding: 3rem 1rem; }
.loan-grid, .savings-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem;
}
.loan-card, .savings-card {
    background: white; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow); transition: transform 0.2s;
}
.loan-card:hover, .savings-card:hover { transform: translateY(-4px); }
.loan-card h3, .savings-card h3 { color: var(--primary); margin-bottom: 1rem; }
.loan-card ul, .savings-card ul { margin: 1rem 0 1.5rem 1.5rem; color: var(--text-light); }

/* Payment Methods */
.payment-methods-content { max-width: 1200px; margin: 0 auto; padding: 3rem 1rem; }
.methods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.method-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); transition: transform 0.2s; }
.method-card:hover { transform: translateY(-4px); }
.method-icon { font-size: 3rem; margin-bottom: 1rem; text-align: center; }
.method-card h3 { color: var(--primary); margin-bottom: 1rem; text-align: center; }
.method-details { color: var(--text-light); line-height: 1.6; }
.method-details .note { margin-top: 1rem; font-style: italic; color: var(--text-light); }
.method-details .details-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.method-details .details-list dt { font-weight: 600; color: var(--text); text-align: left; }
.method-details .details-list dd { margin: 0; color: var(--text-light); }
.method-details .instructions { list-style: disc; padding-left: 1.5rem; margin: 1rem 0; color: var(--text-light); }
.method-details .instructions li { margin-bottom: 0.5rem; line-height: 1.6; }
.inline-link { color: var(--primary); text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* Footer */
.footer {
    background: var(--text); color: white; padding-top: 3rem; margin-top: 4rem;
}
.footer-container {
    max-width: 1200px; margin: 0 auto; padding: 0 1rem 2rem;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem;
}
.footer-section h3, .footer-section h4 { margin-bottom: 1rem; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section a { color: #d1d5db; text-decoration: none; }
.footer-section a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid #374151; padding: 1rem; text-align: center; color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .page-header h1 { font-size: 2rem; }
    .contact-grid { grid-template-columns: 1fr; }
}


/* Dashboard */
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.dashboard-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

/* Loan Summary */
.loan-summary {
    display: grid;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
}

.summary-row .label {
    color: var(--text-light);
}

.summary-row .value {
    font-weight: 600;
    color: var(--text);
}

/* Installment & Status */
.installment-info,
.status-info {
    text-align: center;
    padding: 1rem 0;
}

.big-number {
    margin: 1rem 0;
}

.big-number .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.big-number .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-info p {
    margin: 0.5rem 0;
}

/* Outstanding */
.outstanding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.outstanding-item {
    background: var(--bg-gray);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
}

.outstanding-item .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.outstanding-item .value {
    font-size: 1.25rem;
    font-weight: 600;
}

.outstanding-item.total {
    background: var(--primary);
    color: white;
}

.outstanding-item.total .label,
.outstanding-item.total .value {
    color: white;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Tables */
.table-container {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

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

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text);
}

.data-table tr.paid td {
    background: #f0fdf4;
}

.data-table tr.pending td:first-child {
    background: #fef3c7;
}

.status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status.paid {
    background: #d1fae5;
    color: #065f46;
}

.status.pending {
    background: #fef3c7;
    color: #92400e;
}

.status.future {
    background: #e0e7ff;
    color: #3730a3;
}

/* Summary box */
.summary-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.summary-box h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: var(--bg-gray);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
}

.stat-item .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-item .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .action-buttons {
        flex-direction: column;
    }
}


/* Back navigation */
.back-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}
.back-nav .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Info grid for Identitas & Agunan */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    background: var(--bg-gray);
    padding: 1rem;
    border-radius: var(--radius);
}

.info-item .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.info-item .value {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}


/* Profile Dropdown */
.profile-container {
    position: relative;
    display: inline-block;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    font-weight: 500;
}

.profile-btn:hover {
    background: var(--primary-dark);
}

.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.profile-container:hover .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.profile-dropdown a:last-child {
    border-bottom: none;
}

.profile-dropdown a:hover {
    background: var(--bg-gray);
    color: var(--primary);
}

/* Adjust nav menu spacing */
.nav-menu {
    align-items: center;
    gap: 1rem;
}

/* Hide login button when logged in */
.nav-menu .nav-btn.login-btn {
    display: inline-block;
}

.nav-menu:not(.logged-in) .nav-btn.login-btn {
    display: inline-block;
}

.nav-menu.logged-in .nav-btn.login-btn {
    display: none;
}

/* Infinite Scroll Carousel */
.carousel-section {
    padding: 2rem 0;
    background: var(--bg-gray);
}

.carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.carousel-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.carousel-track {
    display: flex;
    gap: 1rem;
    padding: 0 1rem 2rem 1rem;
    width: max-content;
}

.carousel-slide {
    flex: 0 0 auto;
    width: 300px;
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
}

.carousel-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .carousel-slide {
        width: 260px;
    }
    .carousel-slide img {
        height: 160px;
    }
}

/* Contact form notification */
.notify-success {
    text-align: center;
    font-weight: 500;
}
