/* 
 * JKI Injil Kerajaan System - Main Custom Stylesheet
 * Modern, Clean, Professional & 100% Responsive
 */

:root {
    --primary-color: #1e3a8a;
    --primary-hover: #172554;
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    --accent-color: #d97706;
    --accent-light: #fef3c7;
    --bg-body: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active-bg: #1e293b;
    --sidebar-active-text: #ffffff;
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    --card-shadow-hover: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* =========================================
   LOGIN PAGE STYLING
   ========================================= */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgb(239, 246, 255) 0%, rgb(241, 245, 249) 90.2%);
    position: relative;
    padding: 24px 16px;
}

.login-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}
.login-bg-shape-1 {
    width: 380px;
    height: 380px;
    background: #bfdbfe;
    top: -100px;
    right: -50px;
}
.login-bg-shape-2 {
    width: 420px;
    height: 420px;
    background: #fed7aa;
    bottom: -120px;
    left: -80px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.login-header {
    padding: 36px 32px 20px 32px;
    text-align: center;
}

.login-logo {
    width: auto;
    max-width: 260px;
    height: auto;
    max-height: 70px;
    object-fit: contain;
    margin-bottom: 18px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.05));
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.login-body {
    padding: 10px 32px 36px 32px;
}

.form-floating > .form-control {
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    font-size: 14px;
}

.form-floating > .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.btn-primary-custom {
    background: var(--primary-gradient);
    color: #ffffff;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease-in-out;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #172554 0%, #1d4ed8 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* OTP Input Boxes */
.otp-input-field {
    width: 100%;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 12px;
    text-align: center;
    padding: 14px 20px;
    border-radius: 12px;
    border: 2px solid #3b82f6;
    background-color: #f8fafc;
    color: #1e3a8a;
    transition: all 0.2s;
}

.otp-input-field:focus {
    outline: none;
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.2);
    border-color: #1e40af;
}

/* =========================================
   APP LAYOUT (SIDEBAR, TOPBAR & CONTENT)
   ========================================= */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.3px;
}

.sidebar-brand img {
    height: 40px;
    max-width: 210px;
    width: auto;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    padding: 12px 14px 6px 14px;
}

.nav-item-custom {
    margin-bottom: 4px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--sidebar-text);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-link-custom:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.nav-link-custom.active {
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-link-custom i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3b82f6;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.sidebar-user-role {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
}

/* Main Content Area */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Topbar */
.app-topbar {
    height: var(--topbar-height);
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Content Body */
.app-content {
    flex: 1;
    padding: 24px;
}

/* Footer */
.app-footer {
    padding: 16px 24px;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
}

/* =========================================
   DASHBOARD WIDGETS & METRIC CARDS
   ========================================= */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
}

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

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

.stat-icon.primary {
    background: #dbeafe;
    color: #2563eb;
}
.stat-icon.amber {
    background: #fef3c7;
    color: #d97706;
}
.stat-icon.emerald {
    background: #d1fae5;
    color: #059669;
}
.stat-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-details {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-subtext {
    font-size: 12px;
    color: #10b981;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.dashboard-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
}

.dashboard-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card-body {
    padding: 22px;
}

/* =========================================
   RESPONSIVE MOBILE BREAKPOINTS
   ========================================= */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1030;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .app-topbar {
        padding: 0 16px;
    }

    .app-content {
        padding: 16px;
    }
}
