/* สไตล์ทั่วไป */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 414px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* สไตล์ส่วนหัว */
.header {
    background: #00C896;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#logoutBtn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
}

/* เนื้อหาหลัก */
.main-content {
    padding: 20px;
    padding-bottom: 80px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-section h2 {
    color: #00C896;
    margin-bottom: 10px;
}

.welcome-section p {
    color: #666;
    font-size: 14px;
}

/* พื้นที่การยืนยันตัวตน */
.auth-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 3px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #00C896;
    color: white;
}

.auth-form h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: #00C896;
}

.auth-form button {
    width: 100%;
    padding: 12px;
    background: #00C896;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-form button:hover {
    background: #00b085;
}

/* แดชบอร์ด */
.dashboard {
    margin-top: 20px;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.action-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.action-card h3 {
    color: #00C896;
    margin-bottom: 8px;
    font-size: 16px;
}

.action-card p {
    color: #666;
    font-size: 12px;
}

/* การนำทางด้านล่าง */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px 0;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 11px;
    padding: 5px;
    transition: all 0.3s;
    min-width: 50px;
}

.nav-item:hover,
.nav-item.active {
    color: #00C896;
}

.nav-item.active .nav-icon {
    fill: #00C896;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: #666;
    transition: fill 0.3s;
}

.nav-main {
    background: #00C896;
    color: white !important;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    justify-content: center;
    margin-top: -15px;
    box-shadow: 0 4px 12px rgba(0, 200, 150, 0.3);
}

.nav-main .nav-icon {
    fill: white;
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
}

.nav-main span {
    font-size: 10px;
    font-weight: 500;
}

/* คลาสเครื่องมือทั่วไป */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* สไตล์การ์ด */
.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* สไตล์ปุ่ม */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #00C896;
    color: white;
}

.btn-primary:hover {
    background: #00b085;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

.btn-danger {
    background: #ff4757;
    color: white;
}

.btn-danger:hover {
    background: #ff3742;
}

/* แท็กสถานะ */
.status-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* สไตล์ฟอร์ม */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #00C896;
}

/* การแสดงราคา */
.price-display {
    font-size: 24px;
    font-weight: bold;
    color: #00C896;
    text-align: center;
    margin: 20px 0;
}

.price-unit {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

/* แถบความคืบหน้า */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: #00C896;
    transition: width 0.3s;
}

/* การออกแบบแบบตอบสนอง */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* แอนิเมชันการโหลด */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00C896;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
