body {
    overflow-x: hidden;
}

@media (max-width: 767.98px) {
    .sidebar {
        width: 200px;
    }
    
    .content {
        width: calc(100% - 200px);
        margin-left: 200px;
    }
}

.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.main-content {
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center; 
} 

/* Make buttons larger on touch devices */
.btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    min-height: 44px; /* Apple's recommended minimum touch target size */
    margin: 0.25rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.nav-link.btn {
    transition: all 0.3s ease;
}

.nav-link.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

:root {
    --bs-primary: #a595f0 !important;
    --bs-primary-rgb: 165, 149, 240 !important;
    --bs-primary-darker: #8a7ad8 !important;
    --bs-light-purple: #e0d8ff !important;
    --bs-light-purple-rgb: 224, 216, 255 !important;
    --bs-purple-text: #6a5acd !important;
    --bs-table-hover-bg: rgba(224, 216, 255, 0.1) !important;
}


.service-links {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-links a {
    text-decoration: none;
    color: #6a5acd;
    font-weight: 500;
    display: block;
    padding: 12px 20px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(106, 90, 205, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(106, 90, 205, 0.3);
    background-color: #e0d8ff;
}

/* filter */
.filter-sort-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.filter-sort-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group-title {
    color: var(--bs-purple-text);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    color: var(--bs-purple-text);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control, .form-select {
    border-color: var(--bs-light-purple);
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.btn-delete-selected {
    background-color: #FF4842;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-delete-selected:hover:not(:disabled) {
    background-color: #E93737;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-sort-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
}

.logo-container {
    padding: 15px;
    text-align: center;
    background-color: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 9998;
}

.logo-container img {
    height: 40px;
    max-width: 100%;
}

/* 語言選擇器樣式修正 */
.language-dropdown {
    position: relative;
    display: inline-block;
    margin: 10px 20px;
    width: calc(100% - 40px);
    z-index: 9999;
}

.language-selected {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    padding: 8px 15px;
    width: 100%;
    color: var(--bs-purple-text);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 9999;
}

.language-selected:hover {
    background: var(--bs-light-purple);
}

.language-flag {
    margin-right: 8px;
    font-size: 16px;
}

.language-name {
    margin-right: 8px;
    flex: 1;
}

.language-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
}

.language-dropdown.active .language-menu {
    opacity: 1;
    transform: translateY(5px);
    visibility: visible;
    pointer-events: auto;
    z-index: 9999;
}

.language-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.language-option:hover {
    background: var(--bs-light-purple);
}

.language-option.active {
    background: var(--bs-light-purple);
    color: var(--bs-purple-text);
    font-weight: 500;
}

/* 移動端優化 */
@media (max-width: 768px) {
    .language-dropdown {
        margin: 5px 10px;
        width: calc(100% - 20px);
        position: relative;
    }
    
    .language-selected {
        padding: 6px 12px;
        justify-content: space-between;
        font-size: 1.1em;
        position: relative;
        z-index: 9999;
    }

    .language-menu {
        position: absolute;
        left: 0;
        top: 100%;
        width: 100%;
        min-width: unset;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        z-index: 9999;
    }

    .language-option {
        width: 100%;
        text-align: left;
        font-size: 1.1em;
        padding: 14px 18px;
    }
}

/* 移除舊的重複樣式 */
@media (max-width: 700px) {
    .language-dropdown {
        width: 100%;
        position: relative;
    }
    .language-selected {
        width: 100%;
        justify-content: space-between;
        font-size: 1.1em;
        padding: 12px 16px;
    }
    .language-menu {
        position: absolute;
        left: 0;
        top: 100%;
        width: 100%;
        min-width: unset;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        z-index: 9999;
    }
    .language-option {
        width: 100%;
        text-align: left;
        font-size: 1.1em;
        padding: 14px 18px;
    }
    .sidebar {
        overflow: visible;
    }
}

.overview-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 1rem 0;
    color: #22223b !important;
    letter-spacing: 1px;
}