/* 
=========================================================
  JURNAL PANTAU DIGITAL - MOBILE APP PREMIUM DESIGN SYSTEM
=========================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Primary Colors (Premium Trust) */
    --app-primary: #2563EB;        /* Vivid Blue */
    --app-primary-dark: #1E40AF;   /* Deep Blue */
    --app-primary-light: #DBEAFE;  /* Light Blue */
    --app-primary-gradient: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    
    /* Secondary Colors (Action/Alerts) */
    --app-secondary: #059669;      /* Emerald Green */
    --app-warning: #D97706;        /* Amber */
    --app-danger: #DC2626;         /* Red */
    --app-info: #0284C7;           /* Sky Blue */

    /* Neutrals & Backgrounds */
    --app-bg: #F8FAFC;             /* Very light grey for app background */
    --app-bg-surface: #FFFFFF;     /* Pure white for cards */
    --app-text-main: #0F172A;      /* Near black for main text */
    --app-text-muted: #64748B;     /* Slate for secondary text */
    --app-border: #E2E8F0;         /* Light border */
    
    /* Shadows & Effects */
    --app-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --app-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --app-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --app-shadow-floating: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --app-radius-sm: 0.5rem;
    --app-radius-md: 1rem;
    --app-radius-lg: 1.5rem;
    --app-radius-xl: 2rem;

    /* Spacing for Mobile Wrapper */
    --app-nav-height: 70px;
    --app-header-height: 60px;
}

/* =========================================================
   RESET & GLOBAL STYLES 
   ========================================================= */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--app-bg);
    color: var(--app-text-main);
    -webkit-font-smoothing: antialiased;
    /* Limit width for desktop to simulate mobile app view */
    max-width: 480px; 
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    background: #eef2f6; /* Gray background outside the mobile container */
}

/* Container utama menyerupai layar HP */
.app-container {
    background-color: var(--app-bg);
    min-height: 100vh;
    box-shadow: var(--app-shadow-floating);
    position: relative;
    overflow-x: hidden;
    padding-bottom: calc(var(--app-nav-height) + 20px);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--app-text-main);
    margin-top: 0;
}

a {
    text-decoration: none;
    color: var(--app-primary);
}

/* =========================================================
   HEADER (APP BAR)
   ========================================================= */
.app-header {
    background: var(--app-bg-surface);
    height: var(--app-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--app-border);
}

.app-header.transparent {
    background: transparent;
    border-bottom: none;
    position: absolute;
    top: 0; left: 0; right: 0;
    box-sizing: border-box;
}

.app-header-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Outfit', sans-serif;
}

.app-header-icon {
    font-size: 1.25rem;
    color: var(--app-text-main);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.app-header-icon:hover {
    background: var(--app-border);
}

/* =========================================================
   UI COMPONENTS (CARDS, BUTTONS)
   ========================================================= */
.app-card {
    background: var(--app-bg-surface);
    border-radius: var(--app-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--app-shadow-md);
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.8);
}

/* Glassmorphism Card */
.app-card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--app-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    box-shadow: var(--app-shadow-lg);
}

.app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: var(--app-radius-xl);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-size: 1rem;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.app-btn-primary {
    background: var(--app-primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.app-btn-primary:active {
    transform: scale(0.98);
}

.app-btn-outline {
    background: transparent;
    color: var(--app-primary);
    border: 2px solid var(--app-primary);
}

/* Gradient text utility */
.text-gradient {
    background: var(--app-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* =========================================================
   BOTTOM NAVIGATION BAR
   ========================================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--app-nav-height);
    background: var(--app-bg-surface);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 50;
    border-top-left-radius: var(--app-radius-lg);
    border-top-right-radius: var(--app-radius-lg);
    padding-bottom: env(safe-area-inset-bottom); /* For iPhone notch */
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--app-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    width: 60px;
    height: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.bottom-nav-item.active {
    color: var(--app-primary);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    color: var(--app-primary);
    /* Adding a dot indicator */
    position: relative;
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--app-primary);
}

/* Floating Action Button (FAB) in center of nav */
.bottom-nav-fab {
    position: relative;
    top: -20px;
    width: 60px;
    height: 60px;
    background: var(--app-primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
    border: 4px solid var(--app-bg);
    transition: transform 0.2s;
}

.bottom-nav-fab:active {
    transform: scale(0.95);
}

/* =========================================================
   HERO / GREETING SECTION
   ========================================================= */
.app-greeting {
    background: var(--app-primary-gradient);
    border-bottom-left-radius: var(--app-radius-xl);
    border-bottom-right-radius: var(--app-radius-xl);
    padding: 2.5rem 1.5rem 3rem 1.5rem;
    color: white;
    position: relative;
    margin-bottom: -2rem; /* Overlap with cards below */
}

.app-greeting-title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: white;
}

.app-greeting-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Menu Grid (M-Banking style) */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem 0;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--app-text-main);
}

.menu-icon {
    width: 50px;
    height: 50px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--app-shadow-sm);
    transition: transform 0.2s;
}

.menu-item:hover .menu-icon {
    transform: translateY(-3px);
}

.menu-label {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.1;
}

/* Icon Colors */
.bg-blue { background: linear-gradient(135deg, #60A5FA, #3B82F6); }
.bg-green { background: linear-gradient(135deg, #34D399, #10B981); }
.bg-purple { background: linear-gradient(135deg, #A78BFA, #8B5CF6); }
.bg-orange { background: linear-gradient(135deg, #FBBF24, #F59E0B); }

/* =========================================================
   LIST ITEMS (FEED/CHAT STYLE)
   ========================================================= */
.app-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--app-bg-surface);
    border-radius: var(--app-radius-md);
    box-shadow: var(--app-shadow-sm);
    text-decoration: none;
    color: var(--app-text-main);
    transition: background 0.2s;
}

.app-list-item:active {
    background: var(--app-bg);
}

.app-list-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--app-primary-light);
    color: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.app-list-content {
    flex-grow: 1;
    min-width: 0;
}

.app-list-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-list-subtitle {
    font-size: 0.8rem;
    color: var(--app-text-muted);
}

.app-list-action {
    margin-left: 0.5rem;
    color: var(--app-primary);
}

/* Form Inputs */
.app-form-group {
    margin-bottom: 1.25rem;
}

.app-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--app-text-muted);
    margin-bottom: 0.5rem;
}

.app-form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-bg-surface);
    color: var(--app-text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.app-form-control:focus {
    outline: none;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Utilities */
.p-4 { padding: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--app-text-muted); }
.text-sm { font-size: 0.875rem; }
.w-100 { width: 100%; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
