/* =========================================================
   EQ PRODUCTS – CLEAN MODERN UI
   ========================================================= */

/* -------------------------------
   GLOBALS
-------------------------------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, sans-serif;
    background: #F3F4F6;
    color: #111827;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

/* -------------------------------
   HEADER
-------------------------------- */
.top-header {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    padding: 16px 0 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #1F2937;
}

.header-subtitle {
    font-size: 15px;
    color: #6B7280;
    margin-top: 4px;
}

.header-logo {
    height: 45px;
}

.header-brand-premium {
    margin-top: 0px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #6A57E0;
    text-shadow: 0 0 6px rgba(106, 87, 224, 0.25);
    opacity: 0.9;
}

/* Logo + Icons rechts oben */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo-and-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.header-logo-small {
    height: 38px;
    margin-bottom: 8px;
}

.header-icon-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.header-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.header-icon-btn:hover {
    background: #D1D5DB;
}

.header-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: #374151;
    stroke-width: 2;
    fill: none;
}

/* =========================================
   PAGE BACKGROUND
========================================= */
.page-background {
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(
        circle at 30% 10%,
        #ffffff 0%,
        #f7f9fc 40%,
        #eef1f6 100%
    );
    padding-bottom: 40px;
}

/* -------------------------------
   SVG BUTTON SYSTEM
-------------------------------- */
.btn-svg {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E5E7EB;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-svg:hover {
    background: #D1D5DB;
}

.btn-svg svg {
    width: 18px;
    height: 18px;
    stroke: #374151;
    stroke-width: 2;
    fill: none;
}

/* Größen-Varianten */
.btn-svg.lg {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Farb-Varianten */
.btn-svg.primary {
    background: #2563EB;
    color: white;
}

.btn-svg.secondary {
    background: #E5E7EB;
    color: #111;
}

.btn-svg.danger {
    background: #FEE2E2;
}

.btn-svg.danger svg {
    stroke: #B91C1C;
    stroke-width: 2.2;
}

/* -------------------------------
   ACTION BAR / TOOLBAR
-------------------------------- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* -------------------------------
   PRICE SWITCH
-------------------------------- */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #E5E7EB;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.2s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

.switch input:checked + .slider {
    background-color: #2563EB;
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}

/* -------------------------------
   CATEGORY HEADER
-------------------------------- */
.category-title {
    font-size: 20px;
    font-weight: 600;
    margin: 22px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* -------------------------------
   PRODUCT GRID & CARD
-------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Bild rund */
.product-image img,
.product-image .placeholder {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    padding: 6px;
    margin: 0 auto;
    background: white;
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    font-size: 13px;
}

/* Text */
.product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 6px 0 4px;
}

.product-info p {
    margin: 2px 0;
    font-size: 14px;
    color: #374151;
}

.price-field {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #2563EB !important;
    margin-top: 6px;
}

/* Details-Collapse (JS gesteuert) – Styles in Template ergänzt */

/* -------------------------------
   FAB (Floating Action Button)
-------------------------------- */
.fab-wrapper {
    position: fixed;
    right: 28px;
    bottom: 28px;
}

.fab-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.4);
}

.fab-btn svg {
    width: 28px;
    height: 28px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    display: none;
}

.fab-menu.open {
    display: block;
}

.fab-menu button {
    width: 100%;
    border: none;
    background: none;
    padding: 8px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* -------------------------------
   LOGIN PAGE
-------------------------------- */
.login-container {
    max-width: 360px;
    margin: 120px auto;
    padding: 26px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.15);
}

.login-container h2 {
    margin: 0 0 16px;
    text-align: center;
    font-weight: 600;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 15px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    background: #2563EB;
    color: white;
    cursor: pointer;
}

.login-container button:hover {
    background: #1D4ED8;
}

/* ============================================
   FORMULARE (Produkt / Profil)
============================================ */
.form-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 12px 0 6px;
    color: #1F2937;
    padding-bottom: 4px;
    border-bottom: 1px solid #E5E7EB;
}

.form-card input[type="text"],
.form-card input[type="number"],
.form-card textarea,
.form-card select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: #F9FAFB;
    transition: border 0.15s ease;
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
    border-color: #2563EB;
    background: white;
    outline: none;
}

.row-flex {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.row-flex input[type="text"] {
    flex: 1;
}

.remove-row.btn-svg {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

/* Add Buttons */
.btn-secondary {
    background: #E5E7EB;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    color: #374151;
    font-weight: 500;
    transition: background 0.15s ease;
}

.btn-secondary:hover {
    background: #D1D5DB;
}

.btn-add-row {
    width: 100%;
    max-width: 260px;
    display: block;
    text-align: center;
    margin: 8px 0 16px;
}

/* Speichern-Button (Form) */
.btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: #2563EB;
    color: white;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s ease, transform 0.05s;
}

.btn-primary:hover {
    background: #1E4ED8;
}

.preview-img {
    width: 160px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.back-link {
    margin-top: 12px;
}

.back-text {
    color: #2563EB;
    font-size: 15px;
    text-decoration: none;
}

.back-text:hover {
    text-decoration: underline;
}

/* Generische Form-Inputs */
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: #F9FAFB;
    font-size: 15px;
    transition: border 0.2s;
}

.form-input:focus {
    border-color: #2563EB;
    background: #fff;
    outline: none;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

/* Links */
.link-primary {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
}

.link-primary:hover {
    text-decoration: underline;
}

/* ============================================
   PRODUCT CARD – dynamic lists in details
============================================ */
.product-info .ingredients-title,
.product-info .nutrient-title,
.product-info .highlights-title,
.product-info .benefit-title,
.product-info .meta-title {
    margin: 10px 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
}

.product-info ul {
    margin: 0 0 6px 0;
    padding-left: 18px;
}

.product-info ul li {
    font-size: 14px;
    color: #374151;
    margin: 2px 0;
    line-height: 1.35;
}

.product-info ul li strong {
    font-weight: 600;
    color: #111827;
}

/* ============================================
   QR-Ansicht / Druck
============================================ */
.qr-view-wrapper {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-view-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px;
    background: white;
    margin-bottom: 6px;
}

.qr-view-text {
    font-size: 14px;
    color: #444;
    margin-top: 4px;
}

/* QR im HTML ausblenden (nur fürs Print-Layout relevant) */
.qr-print-wrapper {
    display: none;
}

.print-img {
    width: 100px;
}

/* ============================================
   GLOBAL SVG FIX
============================================ */
svg {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.btn-svg svg,
.header-icon-btn svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0;
}

.btn-svg svg,
.header-icon-btn svg,
.category-title svg,
.back-btn svg {
    fill: none !important;
    stroke: #374151 !important;
    stroke-width: 2 !important;
    border: none !important;
    clip-path: none !important;
    background: none !important;
    filter: none !important;
}

.btn-back::before,
.btn-back::after,
.btn-icon::before,
.btn-icon::after {
    content: none !important;
}

.btn-back svg,
.btn-icon svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #374151 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.btn-back,
.btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    background: #E5E7EB;
}

.btn-back span,
.btn-icon span {
    font-size: 14px;
}

/* ============================================
   EINHEITLICHE ADD- & SAVE-BUTTONS
============================================ */
.btn-add {
    width: 200px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    background: #E5E7EB;
    color: #374151;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 4px 0 16px 0;
    text-align: left;
    transition: background 0.15s ease;
}

.btn-add:hover {
    background: #D1D5DB;
}

.btn-save-centered {
    width: 260px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: #2563EB;
    color: white;
    cursor: pointer;
    margin: 24px auto 0 auto;
    display: block;
    transition: background 0.2s ease, transform 0.05s;
}

.btn-save-centered:hover {
    background: #1E4ED8;
}

/* ============================================
   CUSTOMER / KUNDEN-HINWEISE
============================================ */
.customer-welcome-box {
    background: #f3f4f6;
    border-left: 4px solid #2563EB;
    padding: 14px 18px;
    margin-bottom: 22px;
    border-radius: 6px;
    font-family: Inter, sans-serif;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.customer-welcome-box p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* Box nach Kundenanlage (Text + Copy-Button) – falls verwendet */
.customer-created-box {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 22px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    font-family: Inter, sans-serif;
}

.customer-created-box h3 {
    margin: 0 0 10px 0;
    color: #065f46;
}

.copy-btn {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #34d399;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.copy-btn:hover {
    background: #10b981;
}

/* ============================================
   KUNDENVERWALTUNG – TABELLE
============================================ */
.customers-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Tabellenkopf */
.customer-head th {
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    padding: 14px 24px;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}

/* Zeilen */
.customer-row td {
    padding: 14px 24px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Spaltenbreiten + Ausrichtung */
.ch-username {
    width: 40%;
    text-align: left;
}

.ch-expire {
    width: 40%;
    text-align: left;
}

.ch-actions {
    width: 20%;
    text-align: right;
}

/* Icon-Wrapper rechts */
.actions-wrapper {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

* ============================================
   MOBILE VIEW – Kundenverwaltung
   Breakpoint: max-width 700px
============================================ */
@media (max-width: 700px) {

    /* Tabelle wird zu Kartenlayout */
    .customers-table,
    .customers-table thead,
    .customers-table tbody,
    .customers-table th,
    .customers-table td,
    .customers-table tr {
        display: block;
        width: 100%;
    }

    /* Header ausblenden (nicht sinnvoll am Handy) */
    .customers-table thead {
        display: none;
    }

    /* Jede Zeile wird zur Card */
    .customers-table tr {
        background: white;
        margin-bottom: 16px;
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }

    /* Jede Zeile bekommt Label */
    .customers-table td {
        display: flex;
        justify-content: space-between;
        padding: 10px 6px;
        font-size: 15px;
        border: none;
        white-space: normal;
    }

    /* Spalten-Beschriftungen simulieren */
    .customers-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #374151;
        margin-right: 12px;
    }

    /* Aktionen rechts sauber */
    .ch-actions {
        justify-content: flex-end !important;
        display: flex;
        gap: 14px;
    }

    .actions-wrapper {
        justify-content: flex-end;
    }
}