/* Main Design System & Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #FF0080 0%, #7928CA 100%);
    --vibrant-gradient: linear-gradient(45deg, #00F2FE 0%, #4FACFE 100%);
    --accent-gradient: linear-gradient(to right, #F093FB 0%, #F5576C 100%);
    --glass-bg: rgba(15, 15, 25, 0.7);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 20px 60px rgba(0,0,0,0.5);
    --text-light: #ffffff;
    --primary: #FF0080;
    --secondary: #00F2FE;
    --success: #00FF95;
    --danger: #FF3D71;
    --warning: #FFD200;
    --dark: #0f172a;
    --border: rgba(255, 255, 255, 0.2);
    --gray-600: #cbd5e1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Sarabun', sans-serif;
    background: url('https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=80&w=2070&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    color: var(--text-light);
    padding-top: 80px;
    padding-bottom: 40px;
    overflow-x: hidden;
    position: relative;
}

/* Vibrant Multi-stop Overlay */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(225deg, 
        rgba(255, 0, 128, 0.4) 0%, 
        rgba(121, 40, 202, 0.6) 40%, 
        rgba(0, 242, 254, 0.4) 100%);
    z-index: -1;
}

@media (max-width: 767px) {
    body {
        padding-top: 70px;
        padding-bottom: 120px;
    }
}

/* Glass Card Style */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    margin-bottom: 25px;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modern Top Navbar */
.top-navbar {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 70px;
    background: rgba(15, 15, 25, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-link-custom {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 12px;
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}


.nav-brand img {
    height: 38px;
    width: auto;
}

.nav-brand span {
    font-weight: 800;
    font-size: 1.0rem;
    background: var(--vibrant-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.user-greeting {
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.btn-logout-top {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.btn-logout-top:hover {
    background: var(--danger);
    transform: rotate(90deg);
}

@media (max-width: 767px) {
    .top-navbar { height: 55px; padding: 0 10px; }
    .nav-brand img { height: 28px; }
    .nav-brand span { font-size: 0.8rem; }
    .user-greeting { display: block; font-size: 0.7rem; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 576px) {
    .nav-brand span { display: block; font-size: 0.75rem; letter-spacing: -0.5px; }
    .user-greeting { display: none; }
}

@media (max-width: 400px) {
    .nav-brand span { font-size: 0.7rem; }
}

/* Dashboard & Stats */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.profile-section {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, transparent 100%);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.4);
}

.profile-info h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, #00F2FE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.stat-blue::after { background: var(--vibrant-gradient); }
.stat-pink::after { background: var(--primary-gradient); }
.stat-green::after { background: linear-gradient(to bottom, #43e97b, #38f9d7); }

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
}

/* Buttons */
.btn-vibrant {
    height: 56px;
    padding: 0 30px;
    border-radius: 50px;
    border: none;
    color: white;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-blue { background: var(--vibrant-gradient); box-shadow: 0 8px 20px rgba(0, 242, 254, 0.3); }
.btn-pink { background: var(--primary-gradient); box-shadow: 0 8px 20px rgba(255, 0, 128, 0.3); }

/* Table Styles */
.table-container { padding: 25px; }
.salary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.salary-table thead th {
    padding: 15px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    border: none;
}

.salary-table tbody tr {
    background: rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.salary-table tbody td {
    padding: 20px 15px;
    border: none;
    vertical-align: middle;
}

/* App-like Bottom Navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 20px;
    right: 20px;
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-radius: 35px; 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 10px;
    z-index: 1050;
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none !important;
    font-size: 0.75rem;
    padding: 10px;
    transition: all 0.3s;
    border-radius: 20px;
    flex: 1;
}

.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

/* Summary Card Styles */
.summary-card {
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 25px;
    box-shadow: var(--glass-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-title {
    color: var(--secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.summary-label { color: rgba(255, 255, 255, 0.6); }

/* Footer Modernization */
.modern-footer {
    background: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 30px;
    margin-top: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Fullscreen Button */
.fullscreen-btn {
    position: fixed;
    bottom: 120px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: var(--vibrant-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1040;
}

/* Mobile Adjustments (p_show specific cards) */
@media (max-width: 767px) {
    .salary-table thead { display: none; }
    .salary-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border-radius: 20px;
        padding: 10px;
    }
    .salary-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
    }
    .salary-table td::before {
        content: attr(data-label);
        font-weight: 600;
        opacity: 0.6;
        font-size: 0.8rem;
    }
}
