@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

html {
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

:root {
  --brand: #6a6a43;
  --ink: #333;
  --muted: #666;
  --bg: #f5f5f5;
  --card: #fff;
  --line: #e7e7e7;
  --success: #43a047;
  --error: #e53935;
  --warning: #f59e0b;
  --favorite: #ffc107;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
}

html.dark-mode {
  --brand: #7a7a4f;
  --ink: #e0e0e0;
  --muted: #8a8a8a;
  --bg: #1a1a1a;
  --card: #2c2c2c;
  --line: #444;
  --success: #57b35b;
  --error: #f05552;
  --warning: #f7b02f;
  --favorite: #ffc107;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

main {
    flex-grow: 1;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a, button, .quantity-btn, .custom-select-trigger, .day-selector button {
    touch-action: manipulation;
    user-select: none;
}

.navbar {
    background: #333;
    padding: 14px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    
}

.navbar.nav-hidden {
    top: -100px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo img {
    height: 100%;
    width: auto;
    transform: scale(2.5);
}
.nav-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    padding: 8px 0;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--brand);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-links a:hover {
    color: #ddd;
}

.nav-user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

#user-profile-link {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}
.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

.nav-button, .cta-button, .modal-content button, #save-profile-btn, #reset-password-btn, #discard-profile-btn, .danger-button, .finish-order-btn, .received-order-btn, .block-user-btn, .prepare-order-btn {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 10px 20px;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease, background-color .2s ease;
    text-align: center;
    text-decoration: none;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nav-button:active, .cta-button:active, .modal-content button:active, #save-profile-btn:active {
    transform: scale(0.98);
}

.nav-button, .cta-button, #save-profile-btn, .modal-content button:not(.danger-button):not(.secondary-button) {
    background: var(--brand);
    color: #fff;
}

.nav-button:hover, .cta-button:hover, #save-profile-btn:hover, .modal-content button:hover:not(:disabled):not(.danger-button) {
    background: #555535;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.cta-button:hover:not(:disabled) {
    transform: translateY(-2px);
}
.cta-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.cta-button {
    padding: 15px 30px;
    font-size: 16px;
    width: auto;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--muted);
    font-size: 0.9em;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--line);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}
.secondary-button, .received-order-btn {
    background: #eee;
    color: var(--ink);
    font-size: 0.9em;
    padding: 10px 18px;
    width: auto;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
#reset-password-btn {
    font-size: 0.9em;
    padding: 8px 16px;
    width: auto;
}
.secondary-button:hover, .received-order-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.danger-button {
    background-color: var(--error);
    color: #fff;
    width: 100%;
    font-size: 0.9em;
    padding: 10px 18px;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.danger-button:hover:not(:disabled) {
    background-color: #c62828;
    transform: translateY(-2px);
}
#delete-account-btn, .report-order-btn, .block-user-btn, #delete-old-orders-btn {
    width: auto;
}
.danger-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.finish-order-btn {
    background-color: var(--success);
    color: #fff;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    padding: 10px 18px;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.finish-order-btn:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
}
.finish-order-btn:disabled, .received-order-btn:disabled, .block-user-btn:disabled, .prepare-order-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.prepare-order-btn {
    background-color: var(--warning);
    color: #fff;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    padding: 10px 18px;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.prepare-order-btn:hover:not(:disabled) {
    background-color: #d97706;
    transform: translateY(-2px);
}

.welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - 80px);
    padding: 0 20px;
}


.collapsible-section.open .collapsible-content {
    max-height: 1000px;
    padding: 10px 25px 25px 25px;
    overflow-y: auto;
}

.welcome-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}
.welcome-content h2 {
   color: #e53935
}
.welcome-content p {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 30px;
}

.placeholder-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px 20px;
    min-height: calc(100vh - 150px);
}
.placeholder-section h1 {
    margin-bottom: 15px;
}
.placeholder-section p {
    color: var(--muted);
    font-size: 1.1rem;
}

#order-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: flex-start;
    grid-template-areas:
        "favorites favorites"
        "menu cart";
}

.collapsible-section {
    background: var(--card);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
}

#favorites-section {
    grid-area: favorites;
    margin-bottom: 10px;
}

.collapsible-header {
    padding: 15px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.collapsible-header h3, .collapsible-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 1.5rem;
}
.collapsible-header h3 .fa-star {
    color: var(--favorite);
}
.toggle-arrow {
    transition: transform 0.3s ease;
    transform: rotate(90deg);
}
.collapsible-section.open .toggle-arrow {
    transform: rotate(0deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 25px;
}
.collapsible-section.open .collapsible-content {
    max-height: 500px;
    padding: 10px 25px 25px 25px;
    overflow-y: auto;
}

.menu-container {
    grid-area: menu;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.menu-container h1 {
    margin-bottom: -10px;
}

.menu-category, .profile-card, .order-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.menu-category:hover, .profile-card:hover, .order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
}

.user-management-section .sub-section {
    margin-top: 40px;
}

.user-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    align-items: center;
}

.user-search-form input {
    flex-grow: 1;
    font: inherit;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius-sm);
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.user-search-form input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(106, 106, 67, 0.2);
}

.user-search-form button {
   width: auto;
   flex-shrink: 0;
}

#user-search-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-result-card {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--card);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--brand);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.user-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
}

.user-result-card .user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    word-break: break-word;
}
.user-result-card .user-info strong {
    font-size: 1.1em;
    color: var(--ink);
}
.user-result-card .user-info span {
    color: var(--muted);
    font-size: 0.9em;
}

.user-result-card .user-status {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.status-badge {
    font-size: 0.75em;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--border-radius-lg);
    color: #fff;
    text-transform: uppercase;
}
.status-badge.blocked {
    background-color: var(--error);
}
.status-badge.admin {
    background-color: #333;
}
.status-badge.co-admin {
    background-color: var(--muted);
}

.user-result-card .user-actions {
    display: flex;
    justify-content: flex-end;
}

.user-details-content p {
    text-align: left;
    margin-bottom: 12px;
    line-height: 1.6;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
    font-size: 1em;
}
.user-details-content p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.user-details-content p strong {
    color: var(--ink);
}

@media screen and (max-width: 768px) {
    .user-result-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .user-result-card .user-status, .user-result-card .user-actions {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }
    .user-result-card .user-actions {
        justify-content: flex-end;
    }
}

.menu-category {
    background: var(--card);
    padding: 25px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.menu-category h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 15px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}
.menu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.item-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.item-name {
    font-weight: 600;
}
.item-price {
    color: var(--muted);
    font-size: 0.9em;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: #ccc;
    padding: 5px;
    transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.favorite-btn:hover {
    transform: scale(1.1);
}
.favorite-btn.is-favorite {
    color: var(--favorite);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-btn {
    font-family: inherit;
    font-weight: bold;
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fafafa;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s, box-shadow 0.2s ease;
    color: var(--ink);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-btn:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.quantity {
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

.cart-container {
    grid-area: cart;
    background: var(--card);
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 100px;
}

#cart-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 40vh;
    overflow-y: auto;
}
#cart-placeholder {
    color: var(--muted);
    padding: 20px 0;
    text-align: center;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.95em;
}
.cart-item-details {
    flex-grow: 1;
}
.cart-item-name {
    font-weight: 600;
}
.cart-item-price {
    color: var(--muted);
    font-size: 0.9em;
}
.cart-item-total {
    font-weight: 600;
    margin-left: 15px;
}

.cart-summary {
    border-top: 2px solid var(--line);
    margin-top: 15px;
    padding-top: 20px;
}
.total-price {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
}
#checkout-btn {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
}

.pickup-day-picker {
    margin-bottom: 15px;
}
.pickup-day-picker label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1em;
}
.day-selector {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}
.day-selector button {
    flex-grow: 1;
    padding: 10px 5px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius-sm);
    background-color: #fafafa;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease, box-shadow 0.2s ease;
    color: var(--ink);
}
.day-selector button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}
.day-selector button.active {
    background-color: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.day-selector button:disabled {
    background-color: #e9e9e9;
    color: #aaa;
    cursor: not-allowed;
}
.week-notice {
    font-size: 0.8em;
    color: var(--muted);
    text-align: center;
    margin-top: 8px;
}

.pickup-time-picker {
    margin-bottom: 15px;
}
.pickup-time-picker label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1em;
}
.time-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}
.time-inputs > span {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--muted);
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
}
.custom-select {
    position: relative;
}
.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--ink);
    background: #fafafa;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: all 0.2s ease, box-shadow 0.2s ease;
}
.custom-select-trigger:hover {
    border-color: #ccc;
}
.custom-select.open .custom-select-trigger {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(106, 106, 67, 0.2);
}

.arrow {
    position: relative;
    height: 10px;
    width: 10px;
}
.arrow::before, .arrow::after {
    content: "";
    position: absolute;
    bottom: 0px;
    width: 0.15rem;
    height: 100%;
    background-color: var(--muted);
    transition: all 0.2s ease;
}
.arrow::before {
    left: -3px;
    transform: rotate(45deg);
}
.arrow::after {
    left: 3px;
    transform: rotate(-45deg);
}
.custom-select.open .arrow::before {
    transform: rotate(-45deg);
}
.custom-select.open .arrow::after {
    transform: rotate(45deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 100%;
    margin-top: 5px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius-sm);
    background: var(--card);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    z-index: 10;
    max-height: 150px;
    overflow-y: auto;
}
.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.custom-option {
    position: relative;
    display: block;
    padding: 10px 15px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
}
.custom-option:hover, .custom-option.selected {
    cursor: pointer;
    background-color: var(--brand);
    color: #fff;
}

#cart-notices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-notice {
    font-size: 0.9em;
    color: var(--error);
    text-align: center;
    padding: 10px;
    background-color: #fff5f5;
    border: 1px solid var(--error);
    border-radius: var(--border-radius-sm);
    line-height: 1.4;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

#profile-section {
    padding: 40px 20px;
    display: none;
    justify-content: center;
}

.profile-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.profile-container h1 {
    text-align: center;
    margin-bottom: 30px;
}

.profile-card {
    background: var(--card);
    border-radius: var(--border-radius-md);
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.profile-card.danger-zone {
    border: 1px solid var(--error);
    background-color: #fff5f5;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.danger-zone-text {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.profile-card h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.profile-field {
    margin-bottom: 20px;
}

.profile-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ink);
}

.profile-field small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: normal;
}

.profile-button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
#discard-profile-btn {
    background-color: #e0e0e0;
    color: var(--ink);
    flex-grow: 1;
    width: auto;
}
#discard-profile-btn:hover {
    background-color: #d1d1d1;
}
#save-profile-btn {
    flex-grow: 2;
    width: auto;
}

.profile-field input, .modal-content input {
    font: inherit;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--border-radius-sm);
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.profile-field input:focus, .modal-content input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(106, 106, 67, 0.2);
}

.profile-field input:disabled {
    background: #e9e9e9;
    cursor: not-allowed;
    color: var(--muted);
}

.password-display-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-separator {
    border: 0;
    border-top: 1.5px solid var(--line);
    margin: 15px 0 25px 0;
}

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex; justify-content: center; align-items: center; z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card);
    padding: 25px 40px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    margin: 0 15px;
    animation: slideInUp 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
    transition: background-color 0.3s ease;
}

@keyframes slideInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#reported-order-detail-modal .modal-content {
    max-width: 600px;
    text-align: left;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5rem;
}
.modal-content input { margin-bottom: 15px; }
.modal-content button {
    margin-top: 10px;
    border-radius: var(--border-radius-sm);
    padding: 14px;
}
.modal-content button:disabled { background-color: #ccc; cursor: not-allowed; }
.modal-info-text {
    font-size: 0.9em;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.5;
}
.modal-warning-text {
    font-size: 0.9em;
    color: var(--error);
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff5f5;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--error);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { padding-right: 40px; }
.password-wrapper i { position: absolute; right: 15px; cursor: pointer; color: #999; }

#password-strength-feedback { text-align: left; font-size: 13px; margin-top: -10px; margin-bottom: 15px; }
#password-strength-feedback p { margin-bottom: 5px; font-weight: 600; }
#password-strength-feedback ul { list-style: none; }
#password-strength-feedback li { color: var(--muted); transition: color 0.3s ease; }
#password-strength-feedback li.valid { color: var(--success); }
#password-strength-feedback li.valid::before { content: '✓ '; }

.toggle-link-text { margin-top: 20px; font-size: 14px; }
.toggle-link-text a { color: var(--brand); text-decoration: underline; font-weight: 600; }
#login-view .toggle-link-text { margin-top: 10px; }

.close-button, .close-reauth-button, .close-checkout-button {
    position: absolute; top: 10px; right: 15px; font-size: 28px;
    color: #aaa; cursor: pointer; transition: color 0.2s ease, transform 0.2s ease;
}
.close-button:hover, .close-reauth-button:hover, .close-checkout-button:hover {
    color: var(--ink);
    transform: rotate(90deg);
}

.styled-message-box {
    text-align: center;
    padding: 20px;
}
.styled-message-box i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 15px;
}
.styled-message-box h2 {
    margin-bottom: 10px;
}
.styled-message-box p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95em;
    margin-bottom: 10px;
}
.styled-message-box p:last-child {
    margin-bottom: 0;
}

.checkout-summary-display {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: var(--border-radius-sm);
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    transition: background-color 0.3s ease;
}
.checkout-summary-item {
    display: flex;
    justify-content: space-between;
}
.modal-button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.modal-button-group button {
    margin-top: 0;
}

.notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: var(--border-radius-lg);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease, bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: calc(100% - 40px);
    max-width: 400px;
    text-align: center;
}

.notification.show {
    opacity: 1;
    bottom: 30px;
}

.notification.success {
    background-color: var(--success);
}

.notification.error {
    background-color: var(--error);
}

.orders-display-section {
    padding: 40px 20px;
    display: none;
    justify-content: center;
}

.orders-container {
    width: 100%;
    max-width: 900px;
}

.orders-container h1 {
    text-align: center;
    margin-bottom: 10px;
}

.orders-container h4 {
    text-align: center;
    margin-bottom: 30px;
}

#user-orders-list, #management-orders-list, #reported-orders-list, #archived-orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-day-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--line);
}

.order-day-tabs button {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 1em;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    position: relative;
    transition: color 1.2s ease, box-shadow 0.2s ease;
    border-bottom: 3px solid transparent;
}

.order-day-tabs button::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.order-day-tabs button:hover {
    color: var(--ink);
}

.order-day-tabs button:hover::after {
    transform: scaleX(1);
}

.order-day-tabs button.active {
    color: var(--brand);
}

.order-day-tabs button.active::after {
    transform: scaleX(1);
}

.order-card {
    background: var(--card);
    border-radius: var(--border-radius-md);
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--brand);

    opacity: 0;
    transform: translateY(15px);
   
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, 
                background-color 0.3s ease, box-shadow 0.3s ease, 
                border-left-color 0.3s ease;
}

.order-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.order-card.archived {
    border-left: 5px solid #ccc;
    opacity: 0.8;
}

.order-card.reported {
    border-left-color: var(--error);
}

.order-card.prepared {
    border-left-color: var(--warning);
}

.order-card.paid {
    border-left-color: var(--success);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    gap: 10px;
}

.order-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-header-info strong {
    font-size: 1.1em;
}

.order-header-info span {
    color: var(--muted);
    font-size: 0.9em;
}

.order-pickup-time {
    background: #f9f9f9;
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    transition: background-color 0.3s ease;
}

.order-details-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    margin-bottom: -5px;
}
.order-user-info, .order-pickup-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1em;
    color: var(--ink);
    text-align: right;
}
.order-user-info span, .order-pickup-time span {
    font-size: 0.8em;
    color: var(--muted);
}

.order-items-container {
    margin: 20px 0;
}
.order-items-container p {
    margin-bottom: 10px;
}

.order-items-list {
    list-style: none;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius-sm);
    max-height: 150px;
    overflow-y: auto;
    transition: background-color 0.3s ease;
}

.order-items-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    padding: 8px 5px;
    border-bottom: 1px solid var(--line);
}
.order-items-list li:last-child {
    border-bottom: none;
}
.order-items-list li span:first-child {
    font-weight: 600;
}
.order-items-list li span:last-child {
    font-weight: 600;
    color: var(--muted);
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.order-total {
    font-weight: bold;
    font-size: 1.2em;
}

.order-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    background: var(--card);
    padding: 25px;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--brand);
}
.stat-label {
    color: var(--muted);
}
.sub-section {
    margin-bottom: 40px;
}
.sub-section h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.reported-order-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--card);
    border-radius: var(--border-radius-sm);
    border-left: 5px solid var(--error);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;

    opacity: 0;
    transform: translateY(15px);
  
    transition: transform 0.2s ease, box-shadow 0.2s ease, 
                background-color 0.3s ease, opacity 0.4s ease-out;
}
.reported-order-item-compact.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reported-order-item-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.reported-order-info strong {
    display: block;
}
.reported-order-info span {
    font-size: 0.9em;
    color: var(--muted);
}

#reported-order-detail-content .order-header {
    margin-bottom: 15px;
}
.reported-user-details {
    background-color: #fff5f5;
    border: 1px solid var(--error);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    margin-top: 15px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.reported-user-details h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--error);
}
.reported-user-details p {
    margin: 0 0 10px 0;
    font-size: 0.95em;
}
.reported-user-details p strong {
    color: var(--ink);
}
.reported-order-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.site-footer {
    background-color: #333;
    color: #ccc;
    padding: 40px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 15px;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #fff;
    text-decoration: underline;
}

@media screen and (max-width: 850px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100%;
        width: 70%;
        max-width: 300px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        background-color: #222;
        transition: left 0.4s ease-in-out;
        z-index: 1000;
    }

    .nav-links.nav-active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hamburger-menu {
        display: block;
    }

    .nav-user-actions {
        margin-left: auto;
    }

    .welcome-content h1 {
        font-size: 2.2rem;
    }
    .welcome-content p {
        font-size: 1rem;
    }

    #order-section {
        grid-template-columns: 1fr;
        padding: 0 15px;
        margin: 20px auto;
        grid-template-areas:
            "favorites"
            "menu"
            "cart";
    }

    .cart-container {
        position: static;
        margin-top: 30px;
    }

    #profile-section {
        padding: 20px 15px;
    }
    .profile-card {
        padding: 20px;
    }
    .password-display-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .profile-button-group {
        flex-direction: column;
    }

    .order-header, .order-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

     .order-day-tabs {
        flex-wrap: wrap;
    }

    .order-user-info, .order-pickup-time {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }
    .order-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-section {
        width: 100%;
        max-width: 300px;
    }
}

.google-signin-btn {
    background-color: #fff;
    color: #444;
    border: 1px solid #ccc;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-top: 0;
    margin-bottom: 20px;
}

.google-signin-btn:hover {
    background-color: #f7f7f7;
    border-color: #aaa;
}

.google-signin-btn img {
    width: 18px;
    height: 18px;
}

.google-signin-btn {
    background-color: #fff;
    color: #444;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    width: 100%;
}

.google-signin-btn:hover {
    background-color: #f7f7f7;
    border-color: #ccc;
}

.google-signin-btn img {
    width: 20px;
    height: 20px;
}

.hamburger-menu.is-active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.is-active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.is-active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #222;
    color: #eee;
    padding: 20px;
    z-index: 2500;
    display: none;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    font-size: 14px;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
    display: block;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-banner p {
    margin: 0;
    line-height: 1.5;
}

.cookie-banner a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
}

.cookie-banner-actions button {
    font-family: 'Poppins', sans-serif;
    background-color: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 10px 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.cookie-banner-actions button:hover {
    background-color: #555535;
}

@media screen and (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
}

.modal-content input.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.2);
}

#back-to-payment-options-btn {
    width: auto;
    margin-bottom: 20px;
}

#confirm-order-btn .btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.modal-button-group {
    flex-direction: column-reverse;
}

.modal-button-group .secondary-button {
    background: transparent;
    border: none;
    color: var(--muted);
}
.modal-button-group .secondary-button:hover {
    background: #f0f0f0;
}

.btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
}

.secondary-button .btn-spinner {
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--ink);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); }
}

.payment-status-badge {
    font-size: 0.8em;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--border-radius-lg);
    margin-top: 8px;
    display: inline-block;
    text-align: center;
}

.payment-status-badge.paid {
    background-color: var(--success);
    color: #fff;
}

.payment-status-badge.prepared {
    background-color: var(--warning);
    color: #fff;
}

#payment-request-button-container {
  margin-bottom: 15px;
  display: none;
}

#payment-request-button-container > div {
  min-height: 48px !important;
}

.profile-notice-btn {
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: var(--border-radius-lg);
    padding: 5px 12px;
    font-size: 0.85em;
    background: #6a6a43;
    color: var(--ink);
    margin-left: 10px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    vertical-align: middle;
    text-align: center;
    margin-top: 12px;
}

.profile-notice-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}
.balance-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--line);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.balance-display span {
    font-size: 1.1em;
    font-weight: 600;
}
.balance-display strong {
    font-size: 1.5em;
    color: var(--brand);
}
.topup-field {
    margin-bottom: 15px;
}
#pay-with-balance-btn {
    background-color: var(--success);
}
#pay-with-balance-btn:hover:not(:disabled) {
    background-color: #388e3c;
}
#pay-with-balance-btn .fa-wallet {
    margin-right: 5px;
}

#pay-with-balance-btn .btn-text {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.3;
}

#pay-with-balance-btn .btn-text small {
    font-weight: normal;
    font-size: 0.8em;
    margin-top: 2px;
}
.reorder-btn {
    padding: 10px 18px;
    font-size: 0.9em;
    width: auto;
}

@media screen and (max-width: 850px) {
   #user-profile-link {
        font-size: 0.9em;
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
    }
}

#admin-menu-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.admin-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--card);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid var(--brand);
    transition: background-color 0.3s ease;
}

.admin-menu-item.sold-out {
    background-color: #fce8e8;
    border-left-color: var(--error);
}

.admin-item-info {
    font-weight: 600;
    font-size: 0.95em;
}

.toggle-sold-out-btn {
    font-size: 0.7em;
    padding: 5px 10px;
    width: auto;
    white-space: nowrap;
}

.make-available-btn {
    font-size: 0.7em;
    padding: 5px 10px;
    width: auto;
    white-space: nowrap;
    background-color: var(--success);
    color: #fff;
}

.menu-item.sold-out {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.nav-button {
    padding: 8px 16px;
    font-size: 0.9em;
    width: auto;
}

.menu-item.sold-out .favorite-btn {
    pointer-events: auto;
    cursor: pointer;
}

.make-available-btn:hover {
    background-color: #388e3c;
}
.menu-item.sold-out::after {
    content: 'AUSVERKAUFT';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--error);
    color: white;
    padding: 5px 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 0.9em;
    z-index: 5;
    pointer-events: none;
}

.menu-item.sold-out .item-actions button {
    cursor: not-allowed;
}

.pdf-menu-link-container {
    background: #f9f9f9;
    border: 1px solid var(--line);
    border-radius: var(--border-radius-md);
    padding: 20px;
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pdf-menu-link-container p {
    margin-bottom: 15px;
    color: var(--muted);
}

.pdf-menu-link-container .cta-button {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#restverkauf-section {
    background: linear-gradient(45deg, #6a6a43, #5a5a3a);
    color: white;
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.restverkauf-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}
.restverkauf-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

#restverkauf-items-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.restverkauf-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.restverkauf-item.sold-out {
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.2);
}

.restverkauf-item-info strong {
    font-size: 1.1em;
}

.restverkauf-item-info .item-price {
    font-weight: bold;
    font-size: 1.3em;
    color: #ffc107;
}
.restverkauf-item-info .item-stock {
    font-size: 0.85em;
    opacity: 0.8;
    margin-top: 5px;
}

.restverkauf-item-actions {
    margin-top: 15px;
}
.add-restverkauf-item-btn {
    width: 100%;
    padding: 10px;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    background-color: #fff;
    color: var(--brand);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s ease;
}
.add-restverkauf-item-btn:hover:not(:disabled) {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}
.add-restverkauf-item-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#admin-restverkauf-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}
.admin-restverkauf-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card);
    padding: 15px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
}
.admin-restverkauf-item-name {
    flex-grow: 1;
    font-weight: 600;
}
.admin-restverkauf-item input {
    width: 70px;
    padding: 8px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--border-radius-sm);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.admin-restverkauf-item button {
    width: auto;
    font-size: 0.8em;
    padding: 8px 12px;
}
.admin-restverkauf-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}
#reset-restverkauf-btn {
    width: auto;
}

#verification-pin::placeholder {
  text-align: center;
}

.cart-item {
    align-items: center;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 600;
}

.cart-item-price {
    font-size: 0.9em;
    color: var(--muted);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.cart-quantity {
    font-weight: 600;
    font-size: 1.1em;
    min-width: 20px;
    text-align: center;
}

.cart-quantity-btn {
    font-family: inherit;
    font-weight: bold;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fafafa;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s ease, background-color 0.2s ease;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-quantity-btn:hover {
    background: #e0e0e0;
}

.cart-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 1.1em;
    padding: 5px;
    transition: color 0.2s, transform 0.2s, box-shadow 0.2s ease;
}

.cart-remove-btn:hover {
    color: var(--error);
    transform: scale(1.1);
}

.custom-option.disabled {
    color: #ccc;
    background-color: #f9f9f9;
    cursor: not-allowed;
    pointer-events: none;
}

.custom-option.disabled:hover {
    background-color: #f9f9f9;
    color: #ccc;
}

#product-leaderboard-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card);
    padding: 15px 20px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--brand);
    transition: background-color 0.3s ease;
}

.leaderboard-item.rank-1 { border-left-color: #ffd700; }
.leaderboard-item.rank-2 { border-left-color: #c0c0c0; }
.leaderboard-item.rank-3 { border-left-color: #cd7f32; }

.leaderboard-rank {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink);
    width: 30px;
    text-align: center;
}

.leaderboard-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.leaderboard-name {
    font-weight: 600;
    font-size: 1.1em;
}

.leaderboard-count {
    color: var(--muted);
    font-size: 0.9em;
}

#disabled-days-list {
    margin-top: 15px;
    background: var(--card);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;
}

#disabled-days-list ul {
    list-style: none;
    padding-left: 0;
}

#disabled-days-list li {
    padding: 8px 0;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
}

#disabled-days-list li:last-child {
    border-bottom: none;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: var(--border-radius-sm);
}
html.dark-mode ::-webkit-scrollbar-thumb {
    background: #555;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.cta-button:focus-visible,
.nav-button:focus-visible,
.secondary-button:focus-visible,
.danger-button:focus-visible,
.finish-order-btn:focus-visible,
.prepare-order-btn:focus-visible,
.received-order-btn:focus-visible,
.day-selector button:focus-visible,
.quantity-btn:focus-visible,
.favorite-btn:focus-visible,
.profile-notice-btn:focus-visible,
.add-restverkauf-item-btn:focus-visible,
.cart-quantity-btn:focus-visible,
.cart-remove-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(106, 106, 67, 0.3);
}

.custom-select-trigger:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(106, 106, 67, 0.2);
}

.theme-switcher-description {
    font-size: 0.9em;
    color: var(--muted);
    margin-bottom: 20px;
    margin-top: -10px;
}

.theme-switcher {
    display: flex;
    gap: 10px;
    border-radius: var(--border-radius-md);
    background: var(--bg);
    padding: 5px;
    border: 1px solid var(--line);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.theme-option {
    flex: 1;
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-switcher::before {
    content: '';
    position: absolute;
    z-index: 1; 
    top: 5px;
    bottom: 5px;
    left: 5px;
    
   
    width: calc((100% - 10px - 20px) / 3);
    
    
    background: var(--card);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 2px solid var(--brand);
    
    
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}


.theme-switcher:has(#theme-dark:checked)::before {
    
    transform: translateX(calc(100% + 10px));
}


.theme-switcher:has(#theme-system:checked)::before {
   
    transform: translateX(calc(200% + 20px));
}
.theme-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 10px;
    border-radius: var(--border-radius-sm);
    border: 2px solid transparent; 
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--muted);
    
    position: relative;
    z-index: 2;      
    transition: color 0.3s ease; 
}

.theme-option label i {
    font-size: 1.2rem;
}

.theme-option input[type="radio"]:not(:checked):hover + label {
    color: var(--ink); 
}

.theme-option input[type="radio"]:hover + label {
    background: none;
}
html.dark-mode .theme-option input[type="radio"]:hover + label {
    background: none;
}
.theme-option input[type="radio"]:checked + label {
    color: var(--ink);
    background: none; 
    border-color: transparent; 
    box-shadow: none; 
}
html.dark-mode .secondary-button,
html.dark-mode .received-order-btn,
html.dark-mode #discard-profile-btn {
    background: #4a4a4a;
    color: var(--ink);
}
html.dark-mode .secondary-button:hover,
html.dark-mode .received-order-btn:hover,
html.dark-mode #discard-profile-btn:hover {
    background: #555;
}

html.dark-mode .quantity-btn {
    background: #3a3a3a;
    color: var(--ink);
    border-color: var(--line);
}
html.dark-mode .quantity-btn:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

html.dark-mode .cart-quantity-btn {
    background: #3a3a3a;
    color: var(--ink);
    border-color: var(--line);
}
html.dark-mode .cart-quantity-btn:hover {
    background: #555;
}

html.dark-mode .day-selector button {
    background-color: #3a3a3a;
    color: var(--ink);
    border-color: var(--line);
}
html.dark-mode .day-selector button:hover {
    background-color: #4a4a4a;
    border-color: #555;
}
html.dark-mode .day-selector button.active {
    background-color: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
html.dark-mode .day-selector button:disabled {
    background-color: #2a2a2a;
    color: #555;
}

html.dark-mode .custom-select-trigger {
    background: #3a3a3a;
    border-color: var(--line);
    color: var(--ink);
}
html.dark-mode .custom-select-trigger:hover {
    border-color: #555;
}

html.dark-mode .profile-field input,
html.dark-mode .modal-content input,
html.dark-mode .user-search-form input,
html.dark-mode #disable-date-input,
html.dark-mode .admin-restverkauf-item input {
    background: #3a3a3a;
    border-color: var(--line);
    color: var(--ink);
}
html.dark-mode .profile-field input:focus,
html.dark-mode .modal-content input:focus,
html.dark-mode .user-search-form input:focus,
html.dark-mode #disable-date-input:focus,
html.dark-mode .admin-restverkauf-item input:focus {
    box-shadow: 0 0 0 3px rgba(122, 122, 79, 0.4);
    border-color: var(--brand);
}

html.dark-mode .profile-field input:disabled {
    background: #2a2a2a;
    color: #555;
}

html.dark-mode .order-pickup-time,
html.dark-mode .order-items-list,
html.dark-mode .balance-display,
html.dark-mode .pdf-menu-link-container,
html.dark-mode .checkout-summary-display {
    background-color: #222;
    border: 1px solid var(--line);
}

html.dark-mode .google-signin-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

html.dark-mode .admin-menu-item.sold-out {
    background-color: #4d3232;
}

html.dark-mode .reported-user-details {
    background-color: #422a2a;
    border: 1px solid var(--error);
}
html.dark-mode .reported-user-details h4 {
    color: var(--error);
}

html.dark-mode .profile-card.danger-zone,
html.dark-mode .modal-warning-text {
    background-color: #422a2a;
    border: 1px solid var(--error);
}

html.dark-mode .cart-notice {
    background-color: #422a2a;
    border: 1px solid var(--error);
    color: var(--error);
}

html.dark-mode #profile-completion-notice .profile-notice-btn {
    background: var(--brand);
    color: #fff;
}

html.dark-mode .custom-option.disabled {
    color: #555;
    background-color: #222;
}
html.dark-mode .custom-option.disabled:hover {
    background-color: #222;
    color: #555;
}

@media screen and (max-width: 500px) {
    #admintools-section .user-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    #admintools-section .user-search-form input,
    #admintools-section .user-search-form button {
        width: 100%;
    }
}

.mobile-cart-link {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--brand);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 998;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-cart-link .cart-bubble {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--error);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.mobile-cart-link .cart-bubble.has-items {
    transform: scale(1);
}

@media screen and (max-width: 850px) {
    body:has(#order-section[style*="display: grid"]) .mobile-cart-link {
        display: flex;
        transform: scale(1);
    }
}