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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
}

.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 60px;
}

.header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-badge {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.login-btn {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-size: 14px;
    cursor: pointer;
}

.content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 15px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-item.active {
    color: #ff6b35;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-item span {
    font-size: 12px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    width: 100%;
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-danger {
    background: #ff4757;
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

.input-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 80%;
    max-width: 320px;
    text-align: center;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.modal-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.btn-confirm {
    background: #ff6b35;
    color: white;
}

.login-container,
.register-container {
    display: flex;
    flex-direction: column;
    background: white;
}

.login-header,
.register-header {
    text-align: center;
    padding: 60px 20px 40px;
    color: white;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.login-header h1,
.register-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p,
.register-header p {
    font-size: 14px;
    opacity: 0.9;
}

.login-form,
.register-form {
    background: white;
    padding: 20px 0 0;
}

.switch-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.switch-text a {
    color: #ff6b35;
    text-decoration: none;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.product-card:active {
    transform: scale(0.98);
}

.product-card.selected {
    border: 2px solid #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.product-image {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f8f8;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    font-size: 16px;
    color: #ff6b35;
    font-weight: bold;
}

.product-price span {
    font-size: 11px;
    color: #999;
    font-weight: normal;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-display {
    font-size: 24px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.order-summary {
    background: #fff8f5;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.order-summary-item.total {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b35;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.order-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.order-no {
    font-size: 12px;
    color: #999;
}

.order-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.processing {
    background: #cce5ff;
    color: #004085;
}

.order-status.delivered {
    background: #d4edda;
    color: #155724;
}

.order-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-status.paid {
    background: #d1ecf1;
    color: #0c5460;
}

.order-body {
    padding: 10px 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.order-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}

.order-footer button {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.btn-pay {
    background: #ff6b35;
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid #ddd;
    color: #666;
}

.member-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 30px 20px;
    margin: -15px -15px 15px;
    text-align: center;
}

.member-avatar {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.member-avatar i {
    font-size: 35px;
}

.member-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.member-phone {
    font-size: 14px;
    opacity: 0.9;
}

.member-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
}

.menu-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item i {
    width: 30px;
    color: #ff6b35;
    font-size: 18px;
}

.menu-item span {
    flex: 1;
    font-size: 14px;
}

.menu-item .arrow {
    color: #ccc;
}

.repair-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.repair-type-item {
    padding: 15px 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.repair-type-item.selected {
    border-color: #ff6b35;
    background: #fff8f5;
}

.repair-type-item i {
    font-size: 24px;
    color: #ff6b35;
    margin-bottom: 8px;
    display: block;
}

.repair-type-item span {
    font-size: 12px;
    color: #666;
}

.image-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.upload-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-btn {
    width: 80px;
    height: 80px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
}

.upload-btn i {
    font-size: 24px;
    margin-bottom: 5px;
}

.upload-btn span {
    font-size: 12px;
}

.delete-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

.tabs {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 15px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-item.active {
    background: #ff6b35;
    color: white;
}

.login-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
}

.login-modal-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.login-modal-header span {
    flex: 1;
    text-align: center;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 5px 0;
}

.login-modal-header span.active {
    color: #ff6b35;
    font-weight: 600;
}

.login-modal-header .close-icon {
    position: absolute;
    right: 15px;
    color: #999;
    cursor: pointer;
    font-size: 18px;
}

.login-modal-body {
    padding: 20px;
}

.login-modal-body .login-container,
.login-modal-body .register-container {
    min-height: auto;
    background: transparent;
}

.login-modal-body .login-header,
.login-modal-body .register-header {
    display: none;
}

.login-modal-body .login-form,
.login-modal-body .register-form {
    padding: 0;
    border-radius: 0;
}

.guest-tip {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.guest-tip i {
    font-size: 50px;
    margin-bottom: 15px;
    color: #ff6b35;
}

.guest-tip p {
    font-size: 14px;
    margin-bottom: 20px;
}

.location-status,
.photo-status {
    float: right;
    font-size: 12px;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0f0f0;
    color: #999;
}

.location-status.success,
.photo-status.success {
    background: #e8f5e9;
    color: #4caf50;
}

.location-status.error {
    background: #ffebee;
    color: #f44336;
}

.location-box {
    display: flex;
    gap: 10px;
}

.location-box input {
    flex: 1;
}

.btn-location {
    padding: 12px 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-location:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-location i {
    font-size: 14px;
}

.location-tip {
    margin-top: 8px;
    font-size: 12px;
    color: #4caf50;
    display: flex;
    align-items: center;
    gap: 5px;
}

.photo-upload-box {
    margin-top: 10px;
}

.photo-upload-btn {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.photo-upload-btn:hover {
    border-color: #ff6b35;
    background: #fff5f0;
}

.photo-upload-btn i {
    font-size: 40px;
    color: #ff6b35;
    margin-bottom: 10px;
    display: block;
}

.photo-upload-btn span {
    font-size: 14px;
    color: #333;
    display: block;
}

.photo-upload-btn small {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    display: block;
}

.photo-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.photo-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
}

.photo-replace {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-preview:hover .photo-replace {
    opacity: 1;
}

.photo-replace i {
    font-size: 24px;
    margin-bottom: 5px;
}

.photo-replace span {
    font-size: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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