:root {
    --primary: #1E293B; /* Dark blue/gray for header */
    --primary-light: #334155;
    --primary-dark: #0F172A;
    --secondary: #3B82F6; /* Blue */
    --accent: #F59E0B; /* Amber */
    --danger: #EF4444; /* Red */
    --success: #10B981; /* Green */
    --background: #F8FAFC; /* Light gray */
    --surface: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border: #E2E8F0;
    --radius-lg: 16px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-family: 'Kanit', sans-serif;
    
    /* Menu Colors from image */
    --menu-1: #8B5CF6; /* Purple */
    --menu-2: #06B6D4; /* Cyan */
    --menu-3: #8B5CF6; /* Purple 2 */
    --menu-4: #EF4444; /* Red */
    --menu-5: #10B981; /* Green */
    --menu-6: #F59E0B; /* Orange */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* App Container (Full Width) */
.app-container {
    width: 100%;
    margin: 0 auto;
    background-color: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    background-color: var(--primary);
    color: white;
    padding: 20px 20px;
    text-align: center;
    position: relative;
}

.top-header h1 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.top-header p {
    color: #CBD5E1;
    font-size: 1rem;
}

.logo-img {
    max-height: 60px;
    margin-bottom: 10px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 10px 20px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-menu {
    display: flex;
    gap: 10px;
}

/* Menu Card Grid */
.menu-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border-radius: var(--radius-lg);
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 180px;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
}

.menu-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px -4px rgba(0,0,0,0.2);
}

.menu-card:active {
    transform: translateY(-2px) scale(0.98);
}

.menu-card .menu-card-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.menu-card .menu-card-title {
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 6px;
}

.menu-card .menu-card-desc {
    font-size: 0.82rem;
    opacity: 0.85;
    text-align: center;
    line-height: 1.4;
}

.menu-card-color-1 { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.menu-card-color-2 { background: linear-gradient(135deg, #06B6D4, #38BDF8); }
.menu-card-color-3 { background: linear-gradient(135deg, #EC4899, #F472B6); }
.menu-card-color-4 { background: linear-gradient(135deg, #F59E0B, #FCD34D); }
.menu-card-color-5 { background: linear-gradient(135deg, #10B981, #34D399); }
.menu-card-color-6 { background: linear-gradient(135deg, #EF4444, #F87171); }

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    background-color: var(--surface);
    color: var(--secondary);
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.back-btn:hover {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
    box-shadow: var(--shadow-md);
}

.back-btn i {
    font-size: 1.1rem;
    transition: transform 0.25s ease;
}

.back-btn:hover i {
    transform: translateX(-3px);
}

/* Main Content Area */
main {
    flex: 1;
    padding: 30px 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    background-color: var(--surface);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary { background-color: var(--secondary); color: white; }
.btn-primary:hover { background-color: #2563EB; }
.btn-secondary { background-color: var(--success); color: white; }
.btn-outline { background-color: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { background-color: var(--background); }
.btn-danger { background-color: var(--danger); color: white; }

/* Cards */
.card {
    background-color: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }

/* Badges */
.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: #E0E7FF;
    color: var(--secondary);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}
.status-pending { background-color: #FEF3C7; color: #D97706; }
.status-approved { background-color: #D1FAE5; color: #059669; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .menu-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .menu-card {
        padding: 20px 14px;
        min-height: 140px;
    }
    .menu-card .menu-card-icon {
        font-size: 2.2rem;
    }
    .menu-card .menu-card-title {
        font-size: 0.95rem;
    }
    .menu-card .menu-card-desc {
        display: none;
    }
}

@media (max-width: 400px) {
    .menu-card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

.hidden-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal h3 {
    margin-top: 0;
    color: var(--primary);
    border-bottom: 2px solid var(--background);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
