/* ===========================
   HALAMAN MASYARAKAT - ELEGANT STYLE
   =========================== */

/* Reset & Variables */
:root {
    --primary-green: #059669;
    --primary-dark: #047857;
    --primary-light: #10b981;
    --primary-lighter: #d1fae5;
    --accent-emerald: #34d399;
    --accent-green: #6ee7b7;
    
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --blue: #3b82f6;
    --red: #ef4444;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
    
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(to bottom, #f9fafb 0%, #f3f4f6 100%);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   NAVBAR HORIZONTAL - ELEGANT
   =========================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
    color: var(--white);
    padding: 0 3rem;
    height: 75px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(5, 150, 105, 0.2);
    backdrop-filter: blur(10px);
}

.navbar-brand a {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: var(--transition);
}

.navbar-brand a:hover {
    color: var(--accent-green);
    transform: translateY(-1px);
}

.navbar-brand i {
    font-size: 1.8rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0.25rem;
}

.navbar-nav li {
    list-style: none;
    height: 100%;
}

.navbar-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
    height: 100%;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--white);
    border-radius: 3px 3px 0 0;
    transform: translateX(-50%);
    transition: width var(--transition);
}

.navbar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    width: 70%;
}

.navbar-nav a.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    font-weight: 600;
}

.navbar-nav a i {
    font-size: 1.1rem;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-user span {
    font-weight: 600;
    font-size: 0.9rem;
}

.logout-button {
    background: var(--white);
    color: var(--primary-green);
    padding: 0.65rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.logout-button:hover {
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ===========================
   CONTENT WRAPPER
   =========================== */
.content-wrapper {
    min-height: calc(100vh - 75px);
    padding: 2.5rem 0 4rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===========================
   WELCOME CARD - ELEGANT
   =========================== */
.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(5, 150, 105, 0.08);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: var(--white);
    padding: 1.75rem 2.25rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.card-header h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.card-header i {
    font-size: 1.4rem;
}

.card-body {
    padding: 2rem 2.25rem;
}

.card-body p {
    color: var(--gray-600);
    line-height: 1.75;
    margin: 0;
    font-size: 0.95rem;
}

/* ===========================
   DASHBOARD LAYOUT - ELEGANT
   =========================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
    justify-content: center;
}

.row.mt-4 {
    margin-top: 2rem !important;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.col-md-6 {
    flex: 0 0 calc(50% - 1.5rem);
    max-width: calc(50% - 1.5rem);
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
}

/* ===========================
   DASHBOARD CARD - ELEGANT
   =========================== */
.dashboard-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-smooth);
    border: 1px solid var(--gray-100);
    height: 100%;
    position: relative;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(5, 150, 105, 0.15);
}

.dashboard-card .card-body {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 300px;
    position: relative;
}

/* Icon Styling - Color Specific */
.dashboard-card i {
    margin-bottom: 1.5rem;
    transition: all var(--transition-smooth);
    font-size: 3.5rem !important;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

/* Green Icon (Prasarana) */
.dashboard-card i[style*="color: #28a745"],
.dashboard-card i[style*="color:#28a745"] {
    color: #059669 !important;
}

.dashboard-card:hover i[style*="color: #28a745"],
.dashboard-card:hover i[style*="color:#28a745"] {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 8px 20px rgba(5, 150, 105, 0.25));
}

/* Yellow Icon (Peminjaman) */
.dashboard-card i[style*="color: #ffc107"],
.dashboard-card i[style*="color:#ffc107"] {
    color: #f59e0b !important;
}

.dashboard-card:hover i[style*="color: #ffc107"],
.dashboard-card:hover i[style*="color:#ffc107"] {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 8px 20px rgba(245, 158, 11, 0.25));
}

/* Blue Icon (Pembangunan) */
.dashboard-card i[style*="color: #007bff"],
.dashboard-card i[style*="color:#007bff"] {
    color: #3b82f6 !important;
}

.dashboard-card:hover i[style*="color: #007bff"],
.dashboard-card:hover i[style*="color:#007bff"] {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 8px 20px rgba(59, 130, 246, 0.25));
}

/* Red Icon (Pengaduan) */
.dashboard-card i[style*="color: #dc3545"],
.dashboard-card i[style*="color:#dc3545"] {
    color: #ef4444 !important;
}

.dashboard-card:hover i[style*="color: #dc3545"],
.dashboard-card:hover i[style*="color:#dc3545"] {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 8px 20px rgba(239, 68, 68, 0.25));
}

.dashboard-card h5 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.dashboard-card p {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-weight: 500;
}

/* ===========================
   BUTTONS - ELEGANT
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 2.25rem;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 350px;
    height: 350px;
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.35);
}

.btn-success:active {
    transform: translateY(-1px);
}

.mt-auto {
    margin-top: auto;
}

/* ===========================
   PRASARANA PAGE - ELEGANT
   =========================== */
.text-center {
    text-align: center;
}

.mb-5 {
    margin-bottom: 3rem;
}

.display-5 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.display-5 i {
    font-size: 2.5rem;
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

.lead {
    font-size: 1.05rem;
    color: var(--gray-500);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.75;
    font-weight: 400;
}

/* Prasarana Grid -- STYLES MERGED/UPDATED FROM BLADE */
.g-4 {
    gap: 1.5rem;
}

.prasarana-card {
    /* Base styles from original CSS */
    background: var(--white);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--gray-100);
    height: 100%;
    display: flex;
    flex-direction: column;
    
    /* Styles from Blade file */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px; /* This was 12px in blade, 20px in main. Using blade version. */
    overflow: hidden;
}

.prasarana-card:hover {
    transform: translateY(-10px);
    /* Shadow from Blade file (was !important) */
    box-shadow: 0 15px 40px rgba(0, 180, 89, 0.3) !important; 
    /* Border color from original CSS */
    border-color: rgba(5, 150, 105, 0.2); 
}

.card-img-top {
    /* Base styles from original CSS */
    width: 100%;
    height: 220px;
    object-fit: cover;
    
    /* Transition from Blade file (was 0.6s) */
    transition: transform 0.3s ease; 
}

.prasarana-card:hover .card-img-top {
    /* Transform from Blade file (was 1.08) */
    transform: scale(1.05); 
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

/* New styles from Blade file */
.btn-pinjam {
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-pinjam:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 180, 89, 0.4);
}
/* -- END OF MERGED/UPDATED STYLES -- */


/* Badges - Elegant */
.badge {
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
}

.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}

.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25);
}

.badge.bg-info,
.badge.bg-primary {
    background: linear-gradient(135deg, var(--blue) 0%, #60a5fa 100%);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.25);
}


/* Utilities */
.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.justify-content-between {
    justify-content: space-between;
}

/* .align-items: center {
    align-items: center;
} */

.text-muted {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.text-success {
    color: var(--primary-green);
    font-weight: 600;
}

.mb-2 {
    margin-bottom: 0.75rem;
}

.mb-3 {
    margin-bottom: 1.25rem;
}

.mt-3 {
    margin-top: 1.25rem;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}


/* ===========================
   FORMULIR ELEGANT STYLE
   (STYLE TAMBAHAN UNTUK FORM)
   =========================== */

/* Judul Bagian Form */
.form-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
    border-bottom: 2px solid var(--primary-lighter);
    padding-bottom: 0.75rem;
    margin-bottom: 1.75rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-title:first-of-type {
    margin-top: 0;
}

/* Style Input Form */
.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-800);
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    transition: var(--transition);
    box-shadow: none;
}

.form-control::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
    background-color: var(--white);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
    background-image: none; /* Sembunyikan ikon default bootstrap */
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.invalid-feedback {
    font-weight: 500;
    margin-top: 0.35rem;
}

/* Teks Bantuan Input */
.form-text-hint {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.35rem;
}

/* Checkbox */
.form-check-input {
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    height: 1.25em;
    width: 1.25em;
}

.form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
    border-color: var(--primary-green);
}

.form-check-label {
    font-size: 0.95rem;
    padding-left: 0.5rem;
}

/* Tombol Batal Custom */
.btn-outline-cancel {
    background: transparent;
    color: var(--gray-600);
    border: 2px solid var(--gray-200);
    padding: 0.85rem 2.25rem; /* Samakan padding dgn .btn */
    font-weight: 600;
    border-radius: 14px;
}

.btn-outline-cancel:hover {
    background: var(--gray-50);
    color: var(--gray-800);
    border-color: var(--gray-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.btn-outline-cancel:hover::before {
    /* Nonaktifkan ripple effect untuk tombol outline */
    width: 0;
    height: 0;
}

/* Style Alert Custom */
.alert {
    border-radius: 14px;
    border-width: 0;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}
.alert .btn-close {
    opacity: 0.7;
    box-shadow: none;
}
.alert .btn-close:hover {
    opacity: 1;
}
.alert i {
    font-size: 1.5rem;
    margin-top: 0.15rem;
}

/* Override .alert-success (karena .bg-success tidak cocok untuk alert) */
.alert-success {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    border-left: 4px solid var(--success);
}

/* Override .alert-danger (karena .bg-danger tidak cocok untuk alert) */
.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid var(--danger);
}

.alert-info-custom {
    background: #f0f9ff; /* light-blue */
    color: #0c54a3;
    border-left: 4px solid var(--blue);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-weight: 500;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}
.alert-info-custom i {
    font-size: 1.5rem;
    margin-top: 0.15rem;
}

/* List Syarat & Ketentuan */
.ketentuan-list {
    padding-left: 1.5rem;
    color: var(--gray-600);
}
.ketentuan-list li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    padding-left: 0.5rem;
}


/* ===========================
   TABEL ELEGANT
   =========================== */
.elegant-table {
    border-collapse: collapse;
    width: 100%;
}
.elegant-table thead {
    background-color: var(--gray-50);
}
.elegant-table th {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.elegant-table th,
.elegant-table td {
    padding: 1.15rem 1.5rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}
.elegant-table tbody tr:last-child td {
    border-bottom: none;
}
.elegant-table tbody tr:hover {
    background-color: var(--gray-50);
}
.elegant-table td {
    color: var(--gray-600);
    font-size: 0.95rem;
}


/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
        height: auto;
        flex-direction: column;
    }
    
    .navbar-brand a {
        font-size: 1.4rem;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin: 1rem 0 0;
    }
    
    .navbar-nav li {
        width: 100%;
    }
    
    .navbar-nav a {
        justify-content: flex-start;
        padding: 0.875rem 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .row {
        margin: 0 -0.5rem;
    }
    
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    .dashboard-card .card-body {
        padding: 2.5rem 1.75rem;
        min-height: 260px;
    }
    
    .dashboard-card i {
        font-size: 3rem !important;
    }
    
    .display-5 {
        font-size: 2rem;
        flex-direction: column;
    }
    
    .content-wrapper {
        padding: 2rem 0 3rem;
    }
    
    .card-header {
        padding: 1.5rem 1.75rem;
    }
    
    .card-body {
        padding: 1.75rem;
    }
    
    /* Responsive Table */
    .elegant-table {
        min-width: 700px; /* Memaksa scroll horizontal jika perlu */
    }
}

@media (max-width: 480px) {
    .display-5 {
        font-size: 1.75rem;
    }
    
    .dashboard-card .card-body {
        padding: 2rem 1.5rem;
        min-height: 240px;
    }
    
    .dashboard-card i {
        font-size: 2.75rem !important;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.85rem 2rem;
    }
    
    .card-header h4 {
        font-size: 1.15rem;
    }
}