/* --- 1. Global Setup --- */
:root {
    --line-green: #00B900;
    --line-dark: #008f00;
    --dark: #0f172a;
    --soft-bg: #f1f5f9;
    --white: #ffffff;
    --red: #ff4757;
    --gray: #64748b;
    --slate-200: #e2e8f0;
}

body { 
    font-family: 'Kanit', sans-serif; 
    background: var(--soft-bg); 
    margin: 0; 
    padding-bottom: 90px; /* เว้นที่ให้ Nav ด้านล่าง */
    color: var(--dark); 
    -webkit-tap-highlight-color: transparent;
}

/* --- 2. Header Zone (Compact Design) --- */
.header-premium { 
    background: linear-gradient(135deg, var(--line-green), var(--line-dark)); 
    padding: 25px 20px 55px; /* ลดความสูงลงอย่างมาก */
    border-radius: 0 0 30px 30px; 
    color: white; 
    box-shadow: 0 4px 15px rgba(0,185,0,0.15);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-glow { 
    width: 42px; /* ขนาดกะทัดรัด */
    height: 42px; 
    border-radius: 50%; 
    border: 2px solid rgba(255,255,255,0.4); 
    object-fit: cover;
}

.user-name { margin: 0; font-size: 1.05rem; font-weight: 600; }
.greeting-text { font-size: 0.7rem; opacity: 0.8; font-weight: 300; }

.status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.6rem;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- 3. Layout Container --- */
.container { 
    padding: 0 16px; 
    margin-top: 10px; /* ปรับจาก -30px เป็น 10px เพื่อให้ขยับลงมาพ้นช่วงโค้งของหัวสีเขียว */
    position: relative; 
    z-index: 10; 
}

/* แถม: ปรับระยะห่างระหว่างหัวข้อกับตัวการ์ดให้ดูดีขึ้น */
.section-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 30px 0 15px 5px; /* เพิ่มระยะห่างด้านบนและล่างของหัวข้อ */
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

/* --- 4. Card System (Premium Look) --- */
.current-job-card {
    background: var(--white);
    padding: 20px;
    border-radius: 22px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.job-tag {
    background: #f0fdf4;
    color: var(--line-green);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.main-card { 
    background: var(--white); 
    display: flex; 
    align-items: center; 
    padding: 14px 16px; 
    border-radius: 18px; 
    text-decoration: none; 
    color: inherit; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); 
    margin-bottom: 12px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.main-card:active { transform: scale(0.97); background: #f8fafc; }
.red-border { border-left: 5px solid var(--red); }
.green-border { border-left: 5px solid var(--line-green); }

.card-text { margin-left: 12px; flex: 1; }
.card-text strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.card-text small { color: var(--gray); font-size: 0.75rem; font-weight: 300; }

/* --- 5. Inputs & Buttons --- */
.input-premium {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    text-align: center;
    font-size: 1.3rem;
    background: #f8fafc;
    font-family: 'Kanit';
    box-sizing: border-box;
}

.glass-btn {
    background: white;
    border: 1px solid var(--slate-200);
    padding: 5px 12px;
    border-radius: 10px;
    font-family: 'Kanit';
    font-size: 0.75rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.textarea-premium {
    width: 100%;
    min-height: 100px;
    border: 1px solid var(--slate-200);
    border-radius: 15px;
    padding: 12px;
    font-family: 'Kanit';
    font-size: 0.9rem;
    background: #f8fafc;
    box-sizing: border-box;
    resize: none;
}

/* --- 6. Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px; /* ลดความสูงลง */
    background: rgba(255, 255, 255, 0.95); 
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.04);
    z-index: 9999;
    backdrop-filter: blur(10px);
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #94a3b8;
    transition: 0.2s;
}

.nav-item.active { color: var(--line-green); }
.nav-item i { font-size: 1.2rem; margin-bottom: 3px; }
.nav-item span { font-size: 0.65rem; font-weight: 500; }

/* --- 7. Utilities --- */
.hidden { display: none !important; }

.animate-in {
    animation: fadeInUp 0.4s ease-out forwards;
}

@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(15px); } 
    to { opacity: 1; transform: translateY(0); } 
}

footer {
    text-align: center;
    color: #cbd5e1;
    font-size: 0.65rem;
    padding: 20px 0 40px;
    font-weight: 300;
}