/*
 * Golek.id - Custom Stylesheet
 * Extends Bootstrap 5 with app-specific styles
 */

/* ===== CSS Variables ===== */
:root {
    --primary: #1a4f8a;
    --primary-dark: #0f3464;
    --primary-light: #2563b0;
    --wa-green: #25D366;
    --wa-dark: #128C7E;
    --accent: #f59e0b;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: #ffffff;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { transition: var(--transition); }

/* ===== Typography ===== */
.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }

.text-primary-custom { color: var(--primary) !important; }
.text-wa { color: var(--wa-green) !important; }

/* ===== Section Utilities ===== */
.section-py { padding: 5rem 0; }
.section-py-sm { padding: 3rem 0; }

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.25;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.4rem;
}
.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border);
}
.section-divider.justify-content-center::before,
.section-divider.justify-content-center::after { max-width: 80px; }

/* ===== Announcement Bar ===== */
.announcement-bar {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 9px 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ===== Navbar ===== */
.navbar-main {
    background: #fff;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.07);
    padding: 0.55rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow 0.3s;
}

.navbar-brand-logo {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.navbar-brand-logo span { color: var(--wa-green); }

.navbar-nav .nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.45rem 0.8rem !important;
    border-radius: 8px;
    transition: var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: rgba(26, 79, 138, 0.08);
}

/* ===== Buttons ===== */
.btn-primary-custom {
    background: var(--primary);
    border: 2px solid var(--primary);
    color: #fff;
    padding: 10px 26px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.btn-primary-custom:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(26, 79, 138, 0.3);
}

.btn-wa {
    background: var(--wa-green);
    border: 2px solid var(--wa-green);
    color: #fff;
    padding: 10px 26px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.btn-wa:hover {
    background: var(--wa-dark);
    border-color: var(--wa-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 55%, #3b82f6 100%);
    color: #fff;
    padding: 80px 0 110px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -8%;
    width: 550px;
    height: 550px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -5%;
    width: 380px;
    height: 380px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.hero-section h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.5px;
}

.hero-section p.hero-desc {
    font-size: 1.05rem;
    opacity: 0.88;
    max-width: 520px;
    line-height: 1.65;
}

.hero-stats { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stats .stat-item { text-align: center; }
.hero-stats .stat-num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.hero-stats .stat-label { font-size: 0.72rem; opacity: 0.75; margin-top: 3px; letter-spacing: 0.5px; }

/* ===== Page Hero (inner pages) ===== */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 38px 0 38px;
}
.page-hero h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.3rem; }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ===== Category Tabs ===== */
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; }

.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.category-tab:hover { border-color: var(--primary); color: var(--primary); }
.category-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Driver Card ===== */
.driver-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    height: 100%;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.driver-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.driver-card .card-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-light);
    flex-shrink: 0;
}
.driver-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.driver-card:hover .card-img-wrap img { transform: scale(1.04); }
.driver-card .card-img-wrap .no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: #cbd5e1;
}

/* Status Badge */
.badge-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.badge-aktif { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-nonaktif { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

.driver-card .card-body { padding: 0.85rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.driver-card .driver-name { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.driver-card .driver-phone { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 4px; }
.driver-card .card-actions { display: flex; gap: 8px; margin-top: auto; }

.btn-info-sm {
    flex: 1;
    padding: 8px 6px;
    border: 1.5px solid var(--border);
    background: #fff;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}
.btn-info-sm:hover { background: var(--bg-light); border-color: var(--primary); color: var(--primary); }

.btn-pesan-sm {
    flex: 2;
    padding: 8px 6px;
    background: var(--wa-green);
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}
.btn-pesan-sm:hover:not(.disabled):not([disabled]) {
    background: var(--wa-dark);
    color: #fff;
    transform: translateY(-1px);
}
.btn-pesan-sm.disabled,
.btn-pesan-sm[disabled] {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== Category Card (home) ===== */
.cat-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    color: var(--text-dark);
}
.cat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    color: var(--text-dark);
}
.cat-card .cat-icon { font-size: 2.8rem; line-height: 1; margin-bottom: 0.6rem; }
.cat-card .cat-name { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.cat-card .cat-count { font-size: 0.75rem; color: var(--text-muted); }

/* ===== Testimonial Card ===== */
.testi-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    height: 100%;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.testi-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.testi-card .stars { color: #f59e0b; font-size: 0.9rem; margin-bottom: 0.7rem; }
.testi-card .testi-pesan {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1rem;
    font-style: italic;
}
.testi-card .testi-author { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.testi-card .testi-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.testi-card .testi-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}
.testi-card .testi-name { font-weight: 700; font-size: 0.88rem; }
.testi-card .testi-role { font-size: 0.75rem; color: var(--text-muted); }

/* ===== Floating WhatsApp Button ===== */
.wa-float {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    background: var(--wa-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.7rem;
    text-decoration: none;
    transition: var(--transition);
    animation: waPulse 2.5s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
}
.wa-float:hover { transform: scale(1.12) rotate(-5deg); color: #fff; }

@keyframes waPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,.5); }
    50% { box-shadow: 0 4px 30px rgba(37,211,102,.9), 0 0 0 12px rgba(37,211,102,.1); }
}

/* ===== Auth Card ===== */
.auth-card {
    max-width: 450px;
    margin: 0 auto;
    padding: 2.5rem 2.5rem;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ===== Form Controls ===== */
.form-control,
.form-select {
    border-radius: 9px;
    border: 1.5px solid var(--border);
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: var(--transition);
    background-color: #fff;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 79, 138, 0.1);
    background-color: #fff;
}
.form-label { font-size: 0.85rem; margin-bottom: 6px; }
.input-group-text {
    border-radius: 9px 0 0 9px;
    border: 1.5px solid var(--border);
    border-right: none;
    background: #f8fafc;
}

/* ===== Dashboard ===== */
.user-sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.6);
    object-fit: cover;
}
.user-sidebar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
}

/* ===== Status Toggle ===== */
.status-toggle {
    display: inline-flex;
    border-radius: 9px;
    overflow: hidden;
    border: 1.5px solid var(--border);
}
.status-toggle .status-active {
    padding: 9px 22px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.85rem;
    font-weight: 700;
}
.status-toggle .status-btn {
    padding: 9px 22px;
    background: #ef4444;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.status-toggle .status-btn.activate { background: #22c55e; }
.status-toggle .status-btn:hover { opacity: 0.9; }

/* ===== Driver Detail Modal ===== */
.driver-detail-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
    display: block;
    margin: 0 auto;
}
.driver-detail-placeholder {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 4px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #cbd5e1;
    margin: 0 auto;
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.82);
    padding: 4rem 0 2rem;
}
.footer h5, .footer h6 { color: #fff; font-weight: 700; }
.footer a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: #fff; }
.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
}
.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    transition: var(--transition);
}
.footer .social-links a:hover { background: var(--wa-green); color: #fff; }

/* ===== Alerts ===== */
.alert { border-radius: var(--radius); border: none; font-size: 0.9rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-info    { background: #dbeafe; color: #1e40af; }
.alert-warning { background: #fef9c3; color: #854d0e; }

/* ===== FAQ Accordion ===== */
.accordion-button {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    background: #fff;
    padding: 1rem 0;
}
.accordion-button:not(.collapsed) { color: var(--primary); background: #fff; box-shadow: none; }
.accordion-button::after { margin-left: auto; }
.accordion-button:focus { box-shadow: none; }
.accordion-body { font-size: 0.88rem; color: var(--text-muted); padding: 0 0 1rem 0; }
.accordion-item { border: none; }

/* ===== Table ===== */
.table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--border);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    white-space: nowrap;
}
.table td { vertical-align: middle; padding: 0.75rem; }
.table-hover tbody tr:hover { background-color: #f8fafc; }

/* ===== Admin Specific ===== */
.admin-stat-card {
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.admin-stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.admin-stat-card .stat-icon { font-size: 2rem; opacity: 0.6; }
.admin-stat-card .stat-label { font-size: 0.75rem; opacity: 0.8; }
.admin-stat-card .stat-value { font-size: 2rem; font-weight: 800; line-height: 1; }

/* ===== Loading Spinner ===== */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .hero-section { padding: 55px 0 80px; }
    .section-py { padding: 3.5rem 0; }
}

@media (max-width: 767.98px) {
    .hero-section { padding: 45px 0 65px; }
    .hero-stats { gap: 1.5rem; }
    .hero-stats .stat-num { font-size: 1.5rem; }
    .auth-card { padding: 1.8rem 1.5rem; margin: 0; border-radius: 12px; }
    .section-title { font-size: 1.45rem; }
    .section-py { padding: 2.8rem 0; }
    .wa-float { bottom: 20px; right: 16px; width: 54px; height: 54px; font-size: 1.5rem; }
    .category-tab { font-size: 0.78rem; padding: 7px 14px; }
    .driver-card .driver-name { font-size: 0.88rem; }
    .btn-primary-custom,
    .btn-wa { padding: 10px 20px; font-size: 0.85rem; }
}

@media (max-width: 575.98px) {
    .hero-section h1 { font-size: 1.7rem; }
    .hero-stats { gap: 1rem; }
    .testi-card { padding: 1rem; }
    .auth-card { border-radius: 0; box-shadow: none; }
}

/* ===== Print ===== */
@media print {
    .wa-float, .navbar-main, .announcement-bar, .footer { display: none !important; }
}
