/* ==========================================================================
   QuartierPortal – CakePHP Template CSS
   Consistent design system across all pages
   ========================================================================== */

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

:root {
    --qp-green: #10b981;
    --qp-green-dark: #059669;
    --qp-green-bg: #ecfdf5;
    --qp-blue-dark: #002b5c;
    --qp-blue-btn-hover: #001d40;
    --qp-blue: #2563eb;
    --qp-blue-light: #3b82f6;
    --qp-blue-navy: #1e3a8a;
    --qp-blue-bg: #eff6ff;
    --qp-teal: #0d9488;
    --qp-teal-dark: #164e63;
    --qp-teal-bg: #f0fdfa;
    --qp-orange: #f59e0b;
    --qp-orange-dark: #d97706;
    --qp-orange-bg: #fffbeb;
    --qp-red: #ef4444;
    --qp-red-bg: #fef2f2;

    --qp-heading: #111827;
    --qp-text: #374151;
    --qp-muted: #6b7280;
    --qp-light: #9ca3af;
    --qp-border: #e5e7eb;
    --qp-bg: #f9fafb;
    --qp-white: #ffffff;

    --qp-radius: 8px;
    --qp-radius-sm: 6px;
    --qp-radius-lg: 12px;
    --qp-radius-pill: 9999px;
    --qp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --qp-container: 1200px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--qp-font); color: var(--qp-text); line-height: 1.6; background: var(--qp-bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ========== HEADER ========== */
.qp-header {
    background: var(--qp-white);
    border-bottom: 1px solid var(--qp-border);
    height: 80px;
    display: flex; align-items: center;
    padding: 0 2rem;
    position: sticky; top: 0; z-index: 100;
}
.qp-header-inner {
    max-width: var(--qp-container); width: 100%; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
}
.qp-logo { display: flex; align-items: center; gap: 2rem; text-decoration: none; }
.qp-logo svg { width: 36px; height: 36px; }
.qp-logo img { display: block; height: 78px; width: auto; max-width: none; }
.qp-logo-text { font-size: 1.2rem; font-weight: 700; color: var(--qp-blue-dark);}

.qp-header-nav { display: flex; gap: 2rem; align-items: center; height: 64px; }
.qp-header-nav a {
    font-size: 0.9rem; font-weight: 500; color: var(--qp-muted);
    height: 100%; display: flex; align-items: center;
    border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.qp-header-nav a:hover { color: var(--qp-heading); }
.qp-header-nav a.active { color: var(--qp-green-dark); border-bottom-color: var(--qp-green); font-weight: 600; }

.qp-header-right { display: flex; align-items: center; gap: 1rem; }
.qp-header-hint { font-size: 0.875rem; color: var(--qp-muted); }

.qp-header-user { display: flex; align-items: center; gap: 1.25rem; }
.qp-header-icon { width: 20px; height: 20px; color: var(--qp-muted); cursor: pointer; transition: color 0.2s; }
.qp-header-icon:hover { color: var(--qp-heading); }
.qp-user-pill { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--qp-heading); cursor: pointer; }
.qp-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--qp-border); display: flex; align-items: center; justify-content: center; }
.qp-user-avatar svg { width: 18px; height: 18px; color: var(--qp-muted); }
.qp-chevron { width: 14px; height: 14px; color: var(--qp-muted); }

/* ========== BUTTONS ========== */
.qp-btn-outline {
    display: inline-flex; align-items: center;
    padding: 0.45rem 1.15rem; border: 1.5px solid var(--qp-blue-dark);
    border-radius: var(--qp-radius-sm); color: var(--qp-blue-dark);
    font-size: 0.85rem; font-weight: 600; background: transparent;
    cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.qp-btn-outline:hover { background: var(--qp-blue-dark); color: var(--qp-white); text-decoration: none; }
.qp-btn-outline--green { border-color: var(--qp-green-dark); color: var(--qp-green-dark); }
.qp-btn-outline--green:hover { background: var(--qp-green-dark); color: var(--qp-white); }

.qp-btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.65rem 1.25rem; background: var(--qp-blue-dark); color: var(--qp-white);
    border: none; border-radius: var(--qp-radius-sm);
    font-size: 0.9rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: background 0.2s;
}
.qp-btn-primary:hover { background: var(--qp-blue-btn-hover); }
.qp-btn-primary svg { width: 16px; height: 16px; }
.qp-btn-primary--full { width: 100%; }

.qp-btn-outline-blue {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border: 1.5px solid var(--qp-blue); border-radius: var(--qp-radius-sm);
    color: var(--qp-blue); font-size: 0.82rem; font-weight: 600;
    background: transparent; cursor: pointer; font-family: inherit; transition: all 0.2s; white-space: nowrap;
}
.qp-btn-outline-blue:hover { background: var(--qp-blue); color: var(--qp-white); }
.qp-btn-outline-blue svg { width: 16px; height: 16px; }

/* ========== BADGES ========== */
.qp-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.15rem 0.65rem; border-radius: var(--qp-radius-pill);
    font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.qp-badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.qp-badge--green { background: var(--qp-green-bg); border: 1px solid var(--qp-green); color: var(--qp-green-dark); }
.qp-badge--green .qp-badge-dot { background: var(--qp-green); }
.qp-badge--blue { background: var(--qp-blue-bg); border: 1px solid var(--qp-blue-light); color: var(--qp-blue); }
.qp-badge--blue .qp-badge-dot { background: var(--qp-blue-light); }
.qp-badge--orange { background: var(--qp-orange-bg); border: 1px solid var(--qp-orange); color: var(--qp-orange-dark); }
.qp-badge--orange .qp-badge-dot { background: var(--qp-orange); }
.qp-badge--gray { background: var(--qp-bg); border: 1px solid var(--qp-border); color: var(--qp-muted); }
.qp-badge--gray .qp-badge-dot { background: var(--qp-light); }
.qp-badge--teal { background: var(--qp-teal-bg); border: 1px solid var(--qp-teal); color: var(--qp-teal); }
.qp-badge--teal .qp-badge-dot { background: var(--qp-teal); }
.qp-badge--lg { padding: 0.2rem 0.75rem; font-size: 0.8rem; }
.qp-badge--lg .qp-badge-dot { width: 7px; height: 7px; }

/* ========== FORMS ========== */
.qp-form-group { margin-bottom: 1.25rem; }
.qp-form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--qp-heading); margin-bottom: 0.35rem; }
.qp-form-input {
    width: 100%; padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--qp-border); border-radius: var(--qp-radius-sm);
    font-size: 0.9rem; font-family: inherit; color: var(--qp-heading);
    background: var(--qp-white); transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.qp-form-input::placeholder { color: var(--qp-light); }
.qp-form-input:focus { border-color: var(--qp-green); box-shadow: 0 0 0 3px rgba(16,185,129,0.12); }

.qp-password-wrap { position: relative; }
.qp-password-wrap .qp-form-input { padding-right: 2.75rem; }
.qp-password-toggle {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--qp-light);
    display: flex; align-items: center; transition: color 0.2s;
}
.qp-password-toggle:hover { color: var(--qp-muted); }
.qp-password-toggle svg { width: 18px; height: 18px; }

.qp-form-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; font-size: 0.85rem;
}
.qp-checkbox-label { display: flex; align-items: center; gap: 0.4rem; color: var(--qp-text); cursor: pointer; font-weight: 500; }
.qp-checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--qp-green); cursor: pointer; }
.qp-forgot { color: var(--qp-green-dark); font-weight: 500; }
.qp-forgot:hover { text-decoration: underline; }

/* ========== DIVIDER ========== */
.qp-divider {
    display: flex; align-items: center; gap: 0.75rem;
    margin: 1.5rem 0; color: var(--qp-light); font-size: 0.8rem;
}
.qp-divider::before, .qp-divider::after { content: ''; flex: 1; height: 1px; background: var(--qp-border); }

/* ========== SOCIAL BUTTONS ========== */
.qp-social-btns { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.qp-social-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.6rem; border: 1.5px solid var(--qp-border); border-radius: var(--qp-radius-sm);
    background: var(--qp-white); font-size: 0.85rem; font-weight: 500;
    color: var(--qp-heading); cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.qp-social-btn:hover { border-color: var(--qp-muted); background: var(--qp-bg); }
.qp-social-btn svg { width: 20px; height: 20px; }

/* ========== PAGE CONTAINER ========== */
.qp-page { max-width: var(--qp-container); margin: 0 auto; padding: 1.75rem 2rem 3rem; flex: 1; }
.qp-page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.qp-page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--qp-heading); letter-spacing: -0.02em; }
.qp-page-header-sub { font-size: 0.9rem; color: var(--qp-muted); font-weight: 400; margin-left: 0.5rem; }

/* ========== REGISTER PAGE ========== */
.qp-register-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 3.5rem 2rem 2rem; }
.qp-page-title { font-size: 2rem; font-weight: 700; color: var(--qp-heading); text-align: center; margin-bottom: 0.5rem; letter-spacing: -0.025em; }
.qp-page-subtitle { font-size: 1rem; color: var(--qp-muted); text-align: center; margin-bottom: 3rem; }

.qp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: var(--qp-container); width: 100%; }
.qp-card {
    background: var(--qp-white); border: 1px solid var(--qp-border); border-radius: var(--qp-radius);
    padding: 2rem 1.75rem; display: flex; flex-direction: column; align-items: center; text-align: center;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.qp-card:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08); transform: translateY(-2px); }
.qp-card-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.qp-card-icon svg { width: 30px; height: 30px; fill: var(--qp-white); }
.qp-card--blue .qp-card-icon { background: var(--qp-blue-navy); }
.qp-card--green .qp-card-icon { background: #15803d; }
.qp-card--teal .qp-card-icon { background: #0e7490; }
.qp-card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.35; }
.qp-card--blue .qp-card-title { color: var(--qp-blue-dark); }
.qp-card--green .qp-card-title { color: #14532d; }
.qp-card--teal .qp-card-title { color: var(--qp-teal-dark); }
.qp-card-desc { font-size: 0.875rem; color: var(--qp-muted); line-height: 1.55; margin-bottom: 1.5rem; }
.qp-features { list-style: none; width: 100%; text-align: left; margin-bottom: 1.75rem; padding: 0; }
.qp-features li { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; font-size: 0.9rem; color: var(--qp-heading); }
.qp-check { flex-shrink: 0; width: 18px; height: 18px; }
.qp-card--blue .qp-check { color: var(--qp-blue-navy); }
.qp-card--green .qp-check { color: #15803d; }
.qp-card--teal .qp-check { color: #0e7490; }
.qp-card-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 100%;
    padding: 0.75rem 1.5rem; border: none; border-radius: var(--qp-radius-sm);
    color: var(--qp-white); font-size: 0.9rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all 0.2s; margin-top: auto;
}
.qp-card-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.qp-card--blue .qp-card-btn { background: var(--qp-blue-dark); }
.qp-card--green .qp-card-btn { background: #166534; }
.qp-card--teal .qp-card-btn { background: #155e75; }

/* ========== LOGIN PAGE ========== */
.qp-login-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.qp-login-card {
    background: var(--qp-white); border: 1px solid var(--qp-border); border-radius: var(--qp-radius-lg);
    padding: 2.75rem 2.5rem; width: 60%;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);
}
.qp-login-icon {
    width: 56px; height: 56px; border-radius: 50%; background: var(--qp-green-bg);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem;
}
.qp-login-icon svg { width: 28px; height: 28px; color: var(--qp-green-dark); }
.qp-login-title { font-size: 1.5rem; font-weight: 700; color: var(--qp-heading); text-align: center; margin-bottom: 0.35rem; }
.qp-login-subtitle { font-size: 0.9rem; color: var(--qp-muted); text-align: center; margin-bottom: 2rem; }
.qp-register-link { text-align: center; font-size: 0.85rem; color: var(--qp-muted); }
.qp-register-link a { color: var(--qp-green-dark); font-weight: 600; }

/* ========== STATS ========== */
.qp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.qp-stat-card { background: var(--qp-white); border: 1px solid var(--qp-border); border-radius: var(--qp-radius); padding: 1.15rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.qp-stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qp-stat-icon svg { width: 22px; height: 22px; }
.qp-stat-icon--blue { background: var(--qp-blue-bg); color: var(--qp-blue); }
.qp-stat-icon--green { background: var(--qp-green-bg); color: var(--qp-green-dark); }
.qp-stat-icon--orange { background: var(--qp-orange-bg); color: var(--qp-orange-dark); }
.qp-stat-icon--teal { background: var(--qp-teal-bg); color: var(--qp-teal); }
.qp-stat-number { font-size: 1.5rem; font-weight: 700; color: var(--qp-heading); line-height: 1.2; }
.qp-stat-label { font-size: 0.78rem; color: var(--qp-muted); }

/* ========== FILTERS ========== */
.qp-filters { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.qp-search-wrap { position: relative; flex: 1; min-width: 240px; max-width: 360px; }
.qp-search-wrap svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--qp-light); }
.qp-search-input {
    width: 100%; padding: 0.55rem 0.85rem 0.55rem 2.5rem;
    border: 1.5px solid var(--qp-border); border-radius: var(--qp-radius-sm);
    font-size: 0.875rem; font-family: inherit; color: var(--qp-heading); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.qp-search-input::placeholder { color: var(--qp-light); }
.qp-search-input:focus { border-color: var(--qp-green); box-shadow: 0 0 0 3px rgba(16,185,129,0.12); }
.qp-filter-select {
    padding: 0.55rem 2rem 0.55rem 0.85rem; border: 1.5px solid var(--qp-border); border-radius: var(--qp-radius-sm);
    font-size: 0.85rem; font-family: inherit; color: var(--qp-heading); background: var(--qp-white); cursor: pointer; outline: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center;
}
.qp-filter-select:focus { border-color: var(--qp-green); box-shadow: 0 0 0 3px rgba(16,185,129,0.12); }

/* ========== TABLE ========== */
.qp-table-card { background: var(--qp-white); border: 1px solid var(--qp-border); border-radius: var(--qp-radius); overflow: hidden; }
.qp-table { width: 100%; border-collapse: collapse; }
.qp-table thead { background: var(--qp-bg); }
.qp-table th { padding: 0.75rem 1.25rem; font-size: 0.75rem; font-weight: 600; color: var(--qp-muted); text-transform: uppercase; letter-spacing: 0.05em; text-align: left; border-bottom: 1px solid var(--qp-border); }
.qp-table td { padding: 0.9rem 1.25rem; font-size: 0.875rem; color: var(--qp-text); border-bottom: 1px solid var(--qp-border); vertical-align: middle; }
.qp-table tbody tr { transition: background 0.15s; cursor: pointer; }
.qp-table tbody tr:hover { background: var(--qp-bg); }
.qp-table tbody tr:last-child td { border-bottom: none; }
.qp-ticket-id { font-weight: 600; color: var(--qp-blue); font-size: 0.85rem; }
.qp-ticket-id:hover { text-decoration: underline; }
.qp-ticket-subject { font-weight: 600; color: var(--qp-heading); }
.qp-ticket-excerpt { font-size: 0.8rem; color: var(--qp-muted); margin-top: 0.1rem; }

.qp-priority { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; }
.qp-priority-dot { width: 8px; height: 8px; border-radius: 50%; }
.qp-priority--high .qp-priority-dot { background: var(--qp-red); }
.qp-priority--medium .qp-priority-dot { background: var(--qp-orange); }
.qp-priority--low .qp-priority-dot { background: var(--qp-green); }

.qp-assignee { display: flex; align-items: center; gap: 0.5rem; }
.qp-assignee-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: var(--qp-white); flex-shrink: 0; }
.qp-assignee-name { font-size: 0.82rem; font-weight: 500; }
.qp-date { font-size: 0.82rem; color: var(--qp-muted); white-space: nowrap; }

/* ========== PAGINATION ========== */
.qp-pagination { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.25rem; border-top: 1px solid var(--qp-border); font-size: 0.82rem; color: var(--qp-muted); }
.qp-pagination-pages { display: flex; gap: 0.25rem; }
.qp-page-btn {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--qp-border); border-radius: var(--qp-radius-sm);
    background: var(--qp-white); font-size: 0.82rem; font-weight: 500;
    color: var(--qp-text); cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.qp-page-btn:hover { background: var(--qp-bg); border-color: var(--qp-muted); }
.qp-page-btn.active { background: var(--qp-blue-dark); color: var(--qp-white); border-color: var(--qp-blue-dark); }
.qp-page-btn svg { width: 14px; height: 14px; }

/* ========== TICKET DETAIL ========== */
.qp-breadcrumbs { font-size: 0.8rem; color: var(--qp-muted); margin-bottom: 0.75rem; }
.qp-breadcrumbs a { color: var(--qp-muted); }
.qp-breadcrumbs a:hover { color: var(--qp-heading); text-decoration: underline; }
.qp-breadcrumbs .sep { margin: 0 0.35rem; }
.qp-ticket-title { font-size: 1.5rem; font-weight: 700; color: var(--qp-heading); margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.qp-meta-row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1.5rem; font-size: 0.85rem; color: var(--qp-muted); }
.qp-meta-item { display: flex; align-items: center; gap: 0.35rem; }
.qp-meta-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.qp-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--qp-border); margin-bottom: 2rem; }
.qp-tab {
    padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 500; color: var(--qp-muted);
    border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.2s;
    background: none; border-top: none; border-left: none; border-right: none; font-family: inherit;
}
.qp-tab:hover { color: var(--qp-heading); }
.qp-tab.active { color: var(--qp-green-dark); border-bottom-color: var(--qp-green); font-weight: 600; }

.qp-content-grid { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
.qp-section { margin-bottom: 1.75rem; }
.qp-section-label { font-size: 0.75rem; font-weight: 600; color: var(--qp-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.qp-section-text { font-size: 0.9rem; color: var(--qp-text); line-height: 1.7; }

.qp-person { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0; }
.qp-person-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qp-person-avatar svg { width: 20px; height: 20px; fill: var(--qp-white); }
.qp-person-avatar--blue { background: var(--qp-blue-navy); }
.qp-person-avatar--green { background: var(--qp-green); }
.qp-person-name { font-size: 0.9rem; font-weight: 600; color: var(--qp-heading); }
.qp-person-role { font-size: 0.8rem; color: var(--qp-muted); }
.qp-person-phone { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--qp-muted); margin-top: 0.15rem; }
.qp-person-phone svg { width: 14px; height: 14px; }

.qp-provider-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: var(--qp-white); border: 1px solid var(--qp-border); border-radius: var(--qp-radius); }
.qp-provider-left { display: flex; align-items: center; gap: 0.85rem; }
.qp-provider-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--qp-green-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qp-provider-icon svg { width: 22px; height: 22px; color: var(--qp-green-dark); }
.qp-provider-name { font-size: 0.9rem; font-weight: 600; color: var(--qp-heading); }
.qp-provider-rating { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--qp-muted); margin-top: 0.1rem; }
.qp-star { color: #f59e0b; width: 14px; height: 14px; }

/* ========== TIMELINE ========== */
.qp-sidebar-card { background: var(--qp-white); border: 1px solid var(--qp-border); border-radius: var(--qp-radius); padding: 1.5rem; }
.qp-sidebar-title { font-size: 1rem; font-weight: 700; color: var(--qp-heading); margin-bottom: 1.5rem; }
.qp-timeline { position: relative; padding-left: 2rem; }
.qp-timeline::before { content: ''; position: absolute; left: 15px; top: 20px; bottom: 20px; width: 2px; background: var(--qp-border); }
.qp-timeline-item { position: relative; padding-bottom: 1.75rem; }
.qp-timeline-item:last-child { padding-bottom: 0; }
.qp-timeline-dot { position: absolute; left: -2rem; top: 0; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.qp-timeline-dot svg { width: 16px; height: 16px; fill: var(--qp-white); }
.qp-timeline-dot--navy { background: var(--qp-blue-navy); }
.qp-timeline-dot--green { background: var(--qp-green); }
.qp-timeline-dot--blue { background: var(--qp-blue-light); }
.qp-timeline-dot--gray { background: var(--qp-light); }
.qp-timeline-title { font-size: 0.875rem; font-weight: 600; color: var(--qp-heading); margin-left: 0.75rem; }
.qp-timeline-date { font-size: 0.78rem; color: var(--qp-muted); margin-left: 0.75rem; margin-top: 0.1rem; }
.qp-timeline-sub { font-size: 0.78rem; color: var(--qp-light); margin-left: 0.75rem; margin-top: 0.05rem; }

/* ========== FOOTER ========== */
.qp-footer { padding: 1.5rem 2rem; text-align: center; }
.qp-footer-security { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--qp-muted); }
.qp-footer-security svg { width: 16px; height: 16px; color: var(--qp-muted); }

/* ========== FLASH MESSAGES ========== */
.qp-flash {max-width:1200px; margin:1rem auto; padding:0 2rem;}
.message {max-width:1200px; margin:1rem auto; padding:0 2rem; padding: 0.85rem 1.25rem; border-radius: var(--qp-radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: 0.9rem; }
.message.success { background: var(--qp-green-bg); border-color: var(--qp-green); color: var(--qp-green-dark); }
.message.error { background: var(--qp-red-bg); border-color: var(--qp-red); color: #991b1b; }
.message.warning { background: var(--qp-orange-bg); border-color: var(--qp-orange); color: var(--qp-orange-dark); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) { .qp-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
    .qp-cards { grid-template-columns: 1fr; max-width: 420px; }
    .qp-content-grid { grid-template-columns: 1fr; }
    .qp-register-main { padding: 2.5rem 1.25rem 1.5rem; }
}
@media (max-width: 768px) {
    .qp-header-nav { display: none; }
    .qp-page { padding: 1.25rem; }
    .qp-stats { grid-template-columns: 1fr 1fr; }
    .qp-table-card { overflow-x: auto; }
    .qp-table { min-width: 700px; }
    .qp-filters { flex-direction: column; }
    .qp-search-wrap { max-width: 100%; }
    .qp-provider-card { flex-direction: column; align-items: flex-start; }
    .qp-social-btns { flex-direction: column; }
}
@media (max-width: 480px) {
    .qp-header { padding: 0 1rem; }
    .qp-logo { gap: 1rem; }
    .qp-logo img { height: 40px; }
    .qp-header-hint { display: none; }
    .qp-login-card { padding: 2rem 1.5rem; }
    .qp-stats { grid-template-columns: 1fr; }
    .qp-page-header { flex-direction: column; align-items: flex-start; }
    .qp-ticket-title { font-size: 1.25rem; }
}

/* ========== REGISTRATION FORM PAGE ========== */
.qp-register-form-page {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2.5rem 2rem 3rem;
}

.qp-register-card {
    background: var(--qp-white);
    border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius-lg);
    padding: 2.5rem;
    width: 80%;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);
}

/* Role color stripe at top of card */
.qp-register-card--kunde { border-top: 4px solid var(--qp-blue-dark); }
.qp-register-card--dienstleister { border-top: 4px solid  #0e7490;}
.qp-register-card--verwalter { border-top: 4px solid #15803d;}

/* Role icon + title header inside form */
.qp-reg-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}
.qp-reg-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.qp-reg-icon svg { width: 28px; height: 28px; fill: var(--qp-white); }
.qp-reg-icon--kunde { background: var(--qp-blue-navy); }
.qp-reg-icon--dienstleister { background: #0e7490;}
.qp-reg-icon--verwalter { background: #15803d;}

.qp-reg-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.qp-reg-title--kunde { color: var(--qp-blue-dark); }
.qp-reg-title--dienstleister { color: #164e63;}
.qp-reg-title--verwalter { color:#14532d;}

.qp-reg-subtitle {
    font-size: 0.9rem;
    color: var(--qp-muted);
}

/* Section dividers inside form */
.qp-reg-section {
    margin-bottom: 1.75rem;
}
.qp-reg-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--qp-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--qp-border);
}
.qp-reg-section-title svg {
    width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6;
}

/* Two-column form row */
.qp-form-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

/* Three-column for PLZ / Ort / Land */
.qp-form-cols-3 {
    display: grid;
    grid-template-columns: 120px 1fr 80px;
    gap: 0.85rem;
}

/* Checkbox group (services) */
.qp-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.qp-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid var(--qp-border);
    border-radius: var(--qp-radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--qp-text);
    transition: all 0.2s;
    background: var(--qp-white);
}
.qp-checkbox-item:hover {
    border-color: var(--qp-green);
    background: var(--qp-green-bg);
}
.qp-checkbox-item input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--qp-green);
    cursor: pointer;
    flex-shrink: 0;
}
.qp-checkbox-item.checked,
.qp-checkbox-item:has(input:checked) {
    border-color: var(--qp-green);
    background: var(--qp-green-bg);
}

/* Submit button per role */
.qp-reg-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: var(--qp-radius-sm);
    color: var(--qp-white);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}
.qp-reg-submit:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.qp-reg-submit svg { width: 18px; height: 18px; }
.qp-reg-submit--kunde { background: var(--qp-blue-dark); }
.qp-reg-submit--kunde:hover { background: var(--qp-blue-btn-hover); }
.qp-reg-submit--dienstleister { background:#155e75; }
.qp-reg-submit--dienstleister:hover { background:#134e63; }
.qp-reg-submit--verwalter { background:#166534; }
.qp-reg-submit--verwalter:hover { background:#14532d; }

/* Back to role selection link */
.qp-reg-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--qp-muted);
}
.qp-reg-back a { color: var(--qp-green-dark); font-weight: 600; }
.qp-reg-back a:hover { text-decoration: underline; }
.qp-reg-back svg { width: 14px; height: 14px; }

/* Legal checkbox */
.qp-legal-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1.25rem 0 0.5rem;
    font-size: 0.82rem;
    color: var(--qp-muted);
    line-height: 1.5;
}
.qp-legal-check input { margin-top: 0.2rem; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--qp-green); }
.qp-legal-check a { color: var(--qp-green-dark); font-weight: 500; }

/* Form helper text */
.qp-form-hint {
    font-size: 0.75rem;
    color: var(--qp-light);
    margin-top: 0.2rem;
}

/* Error messages */
.qp-form-error {
    font-size: 0.78rem;
    color: var(--qp-red);
    margin-top: 0.2rem;
}

/* Textarea */
.qp-form-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--qp-border);
    border-radius: var(--qp-radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--qp-heading);
    background: var(--qp-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    resize: vertical;
    min-height: 80px;
}
.qp-form-textarea:focus {
    border-color: var(--qp-green);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

/* Responsive */
@media (max-width: 600px) {
    .qp-register-card { padding: 1.75rem 1.25rem; }
    .qp-form-cols, .qp-checkbox-grid { grid-template-columns: 1fr; }
    .qp-form-cols-3 { grid-template-columns: 1fr 1fr; }
    .qp-form-cols-3 > :last-child { grid-column: 1 / -1; }
    .qp-register-form-page { padding: 1.5rem 1rem 2rem; }
}

/* ========== ACTION LINKS (Table rows) ========== */
.qp-action-btns {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.qp-action-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--qp-blue);
    white-space: nowrap;
    transition: color 0.2s;
}
.qp-action-link:hover { color: var(--qp-blue-dark); text-decoration: underline; }
.qp-action-link--danger { color: var(--qp-red); }
.qp-action-link--danger:hover { color: #991b1b; }
.qp-action-link--success { color: var(--qp-green-dark); }
.qp-action-link--success:hover { color: #047857; }

/* ========== DIENSTLEISTER PROFILE ========== */
.qp-dl-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.qp-dl-tag {
    display: inline-flex; align-items: center; padding: 0.35rem 0.85rem;
    background: var(--qp-green-bg); color: var(--qp-green-dark);
    border-radius: var(--qp-radius-pill); font-size: 0.82rem; font-weight: 600;
}
.qp-dl-tag--outline {
    background: transparent; border: 1.5px solid var(--qp-border);
    color: var(--qp-text); font-weight: 500;
}

.qp-plz-list { display: flex; flex-direction: column; gap: 0.5rem; }
.qp-plz-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.65rem 0.85rem; background: var(--qp-bg);
    border: 1px solid var(--qp-border); border-radius: var(--qp-radius-sm);
}
.qp-plz-info { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.qp-plz-code { font-weight: 700; font-size: 0.9rem; color: var(--qp-heading); font-family: monospace; }
.qp-plz-city { font-size: 0.85rem; color: var(--qp-text); font-weight: 500; }
.qp-plz-district { font-size: 0.75rem; color: var(--qp-light); }

/* ========== PLZ SEARCH (Startseite) ========== */

/* Hero */
.qp-search-hero { margin-bottom: 1.75rem; }
.qp-search-hero-title { font-size: 2.75rem; font-weight: 800; color: var(--qp-heading); margin-bottom: 0.35rem; }
.qp-search-hero-title-sub { font-size: 1.75rem; font-weight: 800; color: var(--qp-heading); margin-bottom: 0.35rem; }
.qp-search-hero-sub { font-size: 1rem; color: var(--qp-muted); font-weight: 400; }

/* 2-Spalten Layout */
.qp-search-layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 2rem; margin-bottom: 2.5rem; }

/* Suchformular */
.qp-search-step { margin-bottom: 1.25rem; }
.qp-search-step-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--qp-heading); margin-bottom: 0.5rem; }
.qp-search-input-wrap { position: relative; }
.qp-search-step-input {
    width: 100%; padding: 0.75rem 1rem; font-size: 1rem; font-family: inherit;
    border: 1.5px solid var(--qp-border); border-radius: var(--qp-radius-sm);
    outline: none; transition: border-color 0.2s; color: var(--qp-heading);
    box-sizing: border-box;
}
.qp-search-step-input:focus { border-color: var(--qp-green); box-shadow: 0 0 0 3px rgba(22,163,74,0.08); }
.qp-search-step-input::placeholder { color: var(--qp-light); }
.qp-search-check {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: var(--qp-green); display: flex;
}
.qp-search-check svg { width: 22px; height: 22px; }

.qp-search-row { display: flex; gap: 0.75rem; }
.qp-search-row .qp-search-step-input { flex: 1; }
.qp-search-submit {
    display: flex; align-items: center; gap: 0.5rem; padding: 0 1.5rem;
    background: var(--qp-green); color: var(--qp-white); border: none;
    border-radius: var(--qp-radius-sm); font-size: 0.95rem; font-weight: 600;
    font-family: inherit; cursor: pointer; white-space: nowrap; transition: background 0.2s;
}
.qp-search-submit:hover { background: var(--qp-green-dark); }
.qp-search-submit svg { width: 18px; height: 18px; }

/* Kontext-Bar */
.qp-search-context {
    background: #ecfdf5; border: 1px solid #d1fae5; border-radius: var(--qp-radius-sm);
    padding: 0.65rem 1rem; margin-bottom: 1rem;
}
.qp-search-context-text {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.85rem; color: #065f46; font-weight: 500;
}
.qp-search-context-text svg { width: 16px; height: 16px; color: var(--qp-green); flex-shrink: 0; }

/* Filter Chips */
.qp-search-filters { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.5rem; }
.qp-chip {
    padding: 0.3rem 0.85rem; border-radius: var(--qp-radius-pill);
    font-size: 0.78rem; font-weight: 500; border: 1.5px solid var(--qp-border);
    color: var(--qp-text); transition: all 0.15s; text-decoration: none;
}
.qp-chip:hover { border-color: var(--qp-green); color: var(--qp-green-dark); }
.qp-chip--active { background: #ecfdf5; border-color: var(--qp-green); color: var(--qp-green-dark); font-weight: 600; }

/* Info-Spalte */
.qp-search-info-card {
    background: var(--qp-white); border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius); padding: 1.5rem; height: 100%;
    display: flex; flex-direction: column; justify-content: center;
}
.qp-search-info-location { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.qp-search-info-pin {
    width: 52px; height: 52px; border-radius: 50%; background: #ecfdf5;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.qp-search-info-pin svg { width: 26px; height: 26px; color: var(--qp-green); }
.qp-search-info-city { font-size: 1.15rem; font-weight: 700; color: var(--qp-heading); }
.qp-search-info-details { font-size: 0.82rem; color: var(--qp-muted); margin-top: 0.15rem; }
.qp-search-info-stats { border-top: 1px solid var(--qp-border); padding-top: 1rem; }
.qp-search-info-stat { text-align: center; }
.qp-search-info-stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--qp-green); }
.qp-search-info-stat-label { font-size: 0.82rem; color: var(--qp-muted); font-weight: 500; }

.qp-search-info-empty {
    text-align: center; padding: 2rem 1rem; color: var(--qp-light);
}
.qp-search-info-empty svg { width: 40px; height: 40px; margin-bottom: 0.75rem; color: var(--qp-border); }
.qp-search-info-empty p { font-size: 0.9rem; line-height: 1.5; }

/* Ergebnisse */
.qp-search-results-section { margin-bottom: 2rem; }
.qp-search-results-title { font-size: 1.15rem; font-weight: 700; color: var(--qp-heading); margin-bottom: 1.25rem; }
.qp-search-results-filter { font-weight: 400; color: var(--qp-muted); }

.qp-search-table{display:table; overflow-x: initial; border-spacing: 0; text-align: left; width: 100%;}
.qp-search-table-tr {display: table-row; vertical-align: inherit; unicode-bidi: isolate; border-color: inherit;
}
.qp-search-table-td {
    border-bottom: 0.1rem solid #e1e1e1; padding: 1.1rem 1.2rem;
}
.qp-search-table-howtoSteps {font-size: larger; font-weight: bold; color:#0d1042;}

.qp-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

.qp-result-card {
    background: var(--qp-white); border: 1px solid var(--qp-border);
    border-radius: 12px; padding: 1.25rem; display: flex; flex-direction: column;
    gap: 0.75rem; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}
.qp-result-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.07); border-color: var(--qp-green); }

.qp-result-card-top { display: flex; align-items: center; gap: 0.85rem; }
.qp-result-icon-box {
    width: 48px; height: 48px; border-radius: 10px; background: #ecfdf5;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.qp-result-icon-box svg { width: 24px; height: 24px; color: #059669; }
.qp-result-card-name { font-size: 1rem; font-weight: 700; color: var(--qp-heading); line-height: 1.3; }
.qp-result-card-address {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.8rem; color: var(--qp-muted); margin-top: 0.15rem;
}
.qp-result-card-address svg { width: 13px; height: 13px; flex-shrink: 0; }

.qp-result-card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.qp-result-tag {
    padding: 0.2rem 0.6rem; border-radius: var(--qp-radius-pill);
    font-size: 0.72rem; font-weight: 600; background: #ecfdf5; color: #059669;
}
.qp-result-card-plzs {
    display: flex; align-items: flex-start; gap: 0.35rem;
    font-size: 0.75rem; color: var(--qp-light); line-height: 1.4;
}
.qp-result-card-plzs svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; }

.qp-result-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.5rem; }
.qp-result-btn {
    font-size: 0.82rem; font-weight: 600; color: var(--qp-green-dark);
    text-decoration: none; transition: color 0.15s;
}
.qp-result-btn:hover { color: var(--qp-green); }
.qp-result-btn--outline { color: var(--qp-muted); }
.qp-result-card-arrow { color: var(--qp-light); display: flex; }
.qp-result-card-arrow svg { width: 20px; height: 20px; }

.qp-empty-state { text-align: center; padding: 3rem 1rem; color: var(--qp-muted); }
.qp-empty-state svg { width: 48px; height: 48px; color: var(--qp-border); margin-bottom: 1rem; }
.qp-empty-state p { margin-bottom: 0.5rem; }

@media (max-width: 768px) {
    .qp-search-layout { grid-template-columns: 1fr; gap: 1.25rem; }
    .qp-search-row { flex-direction: column; }
    .qp-search-submit { width: 100%; justify-content: center; padding: 0.75rem; }
    .qp-results-grid { grid-template-columns: 1fr; }
    .qp-search-hero-title { font-size: 1.35rem; }
}

/* ========== USER DROPDOWN (Header) ========== */
.qp-user-dropdown-wrap { position: relative; }
.qp-user-pill {
    display: flex; align-items: center; gap: 0.5rem;
    background: none; border: 1px solid var(--qp-border); border-radius: var(--qp-radius-pill);
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    font-size: 0.85rem; font-weight: 500; color: var(--qp-heading);
    cursor: pointer; font-family: inherit; transition: border-color 0.15s, background 0.15s;
}
.qp-user-pill:hover { border-color: var(--qp-green); background: #f0fdf4; }
.qp-user-chevron { width: 16px; height: 16px; color: var(--qp-light); transition: transform 0.2s; }
.qp-user-dropdown-wrap.open .qp-user-chevron { transform: rotate(180deg); }

.qp-user-dropdown {
    display: none; position: absolute; right: 0; top: calc(100% + 6px);
    background: var(--qp-white); border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius); box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: 200px; z-index: 100; overflow: hidden;
}
.qp-user-dropdown-wrap.open .qp-user-dropdown { display: block; }

.qp-dropdown-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.65rem 1rem; font-size: 0.85rem; font-weight: 500;
    color: var(--qp-text); text-decoration: none; transition: background 0.1s;
}
.qp-dropdown-item svg { width: 16px; height: 16px; color: var(--qp-muted); flex-shrink: 0; }
.qp-dropdown-item:hover { background: var(--qp-bg); color: var(--qp-heading); }
.qp-dropdown-item--danger { color: #dc2626; }
.qp-dropdown-item--danger svg { color: #dc2626; }
.qp-dropdown-item--danger:hover { background: #fef2f2; }

.qp-dropdown-divider { height: 1px; background: var(--qp-border); margin: 0.25rem 0; }

/* ========== MAP (Leaflet) ========== */
.qp-search-map-card {
    background: var(--qp-white); border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius); overflow: hidden; position: relative;
    height: 100%; min-height: 320px;
}
.qp-map { width: 100%; height: 100%; min-height: 320px; z-index: 1; }

.qp-map-overlay {
    position: absolute; bottom: 12px; left: 12px; z-index: 1000;
    background: var(--qp-white); border-radius: var(--qp-radius-sm);
    padding: 0.6rem 1rem; display: flex; align-items: center; gap: 0.65rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12); border: 1px solid var(--qp-border);
}
.qp-map-overlay-pin { display: flex; flex-shrink: 0; }
.qp-map-overlay-pin svg { width: 22px; height: 22px; color: var(--qp-green); }
.qp-map-overlay-city { font-size: 0.9rem; font-weight: 700; color: var(--qp-heading); }
.qp-map-overlay-details { font-size: 0.75rem; color: var(--qp-muted); margin-top: 0.1rem; }

.qp-map-marker { background: none !important; border: none !important; }

@media (max-width: 768px) {
    .qp-search-map-card { min-height: 220px; }
    .qp-map { min-height: 220px; }
}

/* ========== TÄTIGKEITSAUSWAHL (Suche, Schritt 2) ========== */
.qp-activity { position: relative; flex: 1; min-width: 0; }
.qp-activity .qp-activity-input { width: 100%; padding-right: 2.75rem; }
.qp-activity-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: 0; border-radius: var(--qp-radius-sm);
    background: transparent; color: var(--qp-muted); cursor: pointer;
}
.qp-activity-toggle:hover { background: var(--qp-bg); color: var(--qp-heading); }
.qp-activity-toggle svg { width: 20px; height: 20px; transition: transform 0.15s ease; }
.qp-activity--open .qp-activity-toggle svg { transform: rotate(180deg); }

.qp-activity-panel {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1100;
    max-height: min(460px, 70vh); overflow-y: auto; overscroll-behavior: contain;
    padding: 0.5rem; background: var(--qp-white);
    border: 1px solid var(--qp-border); border-radius: var(--qp-radius);
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
}
.qp-activity-panel[hidden] { display: none; }
.qp-activity-status { padding: 0.25rem 0.5rem 0.5rem; font-size: 0.8rem; color: var(--qp-muted); }
.qp-activity-empty { padding: 1rem 0.5rem; text-align: center; font-size: 0.9rem; color: var(--qp-muted); }

.qp-activity-cat { border: 1px solid var(--qp-border); border-radius: var(--qp-radius-sm); margin-bottom: 0.4rem; overflow: hidden; }
.qp-activity-cat summary {
    display: flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0.55rem 0.75rem;
    background: var(--qp-bg); cursor: pointer; list-style: none;
    font-size: 0.9rem; font-weight: 600; color: var(--qp-heading);
}
.qp-activity-cat summary::-webkit-details-marker { display: none; }
.qp-activity-cat summary::before {
    content: '›'; font-size: 1.3rem; line-height: 1; color: var(--qp-muted);
    transition: transform 0.15s ease;
}
.qp-activity-cat[open] summary::before { transform: rotate(90deg); }
.qp-activity-cat summary:focus-visible { outline: 2px solid var(--qp-green); outline-offset: -2px; }
.qp-activity-cat-title { flex: 1; }
.qp-activity-badge {
    min-width: 28px; padding: 2px 8px; border-radius: var(--qp-radius-pill);
    background: var(--qp-border); color: var(--qp-muted);
    font-size: 0.75rem; font-weight: 600; text-align: center;
}
.qp-activity-badge--active { background: var(--qp-green-bg); color: var(--qp-green-dark); }

.qp-activity-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.4rem; padding: 0.5rem; }
.qp-activity-item {
    display: flex; align-items: center; min-height: 40px; padding: 0.5rem 0.65rem;
    border: 1px solid var(--qp-border); border-radius: var(--qp-radius-sm);
    background: var(--qp-white); color: var(--qp-text);
    font-family: inherit; font-size: 0.875rem; text-align: left; line-height: 1.3; cursor: pointer;
    hyphens: auto; overflow-wrap: break-word;
}
.qp-activity-item:hover { border-color: var(--qp-green); background: var(--qp-green-bg); }
.qp-activity-item:focus-visible { outline: 2px solid var(--qp-green); outline-offset: 1px; }
.qp-activity-item--active { border-color: var(--qp-green); background: var(--qp-green-bg); color: var(--qp-green-dark); font-weight: 600; }

@media (max-width: 768px) {
    .qp-activity { width: 100%; }
}

/* ========== TÄTIGKEITSAUSWAHL (Registrierung / Meine Tätigkeiten) ========== */
.qp-actsel [hidden] { display: none !important; }
.qp-actsel-toolbar {
    display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
    margin: 0.6rem 0 0.4rem; font-size: 0.85rem; color: var(--qp-muted);
}
.qp-actsel-clear {
    border: 0; background: transparent; padding: 0; cursor: pointer;
    font: inherit; font-weight: 600; color: var(--qp-green-dark);
}
.qp-actsel-clear:hover { text-decoration: underline; }
.qp-actsel-chosen { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.qp-actsel-chosen:empty { display: none; }
.qp-actsel-chip {
    border: 1px solid var(--qp-green); background: var(--qp-green-bg); color: var(--qp-green-dark);
    border-radius: var(--qp-radius-pill); padding: 0.2rem 0.65rem;
    font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.qp-actsel-chip:hover { background: var(--qp-green); color: var(--qp-white); }
.qp-actsel-items {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.45rem; padding: 0.6rem;
}
.qp-actsel-items .qp-checkbox-item { align-items: flex-start; line-height: 1.35; }
.qp-actsel-items .qp-checkbox-item input[type="checkbox"] { margin-top: 1px; }
.qp-actsel-empty { padding: 1rem 0.5rem; text-align: center; font-size: 0.9rem; color: var(--qp-muted); }
.qp-actsel-other { margin-top: 0.85rem; }
.qp-actsel-notice {
    margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--qp-border);
    font-size: 0.8rem; line-height: 1.45; color: var(--qp-muted);
}

/* ========== EINSATZGEBIETE (PLZ-Auswahl) – Optik wie Tätigkeitsauswahl ========== */
.qp-plzsel-panel { margin: 0.25rem 0 0.5rem; }
.qp-plzsel-head {
    display: flex; align-items: center; gap: 0.75rem; min-height: 44px; padding: 0.55rem 0.75rem;
    background: var(--qp-bg); font-size: 0.9rem; font-weight: 600; color: var(--qp-heading);
    border-bottom: 1px solid var(--qp-border);
}
.qp-plzsel-all { font-size: 0.85rem; }
.qp-plzsel-panel .qp-checkbox-item strong { font-weight: 700; color: var(--qp-heading); margin-right: 0.15rem; }
.qp-plzsel-district { display: block; font-size: 0.75rem; font-weight: 400; color: var(--qp-light); margin-top: 0.1rem; }
.qp-plzsel-panel .qp-actsel-empty { margin: 0; }
.qp-plzsel-chip { display: inline-flex; align-items: center; gap: 0.25rem; cursor: default; padding-right: 0.3rem; }
.qp-plzsel-chip:hover { background: var(--qp-green-bg); color: var(--qp-green-dark); }
.qp-plzsel-remove {
    display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
    border: 0; border-radius: 50%; background: transparent; color: inherit;
    font-size: 0.95rem; line-height: 1; cursor: pointer;
}
.qp-plzsel-remove:hover { background: var(--qp-green); color: var(--qp-white); }
.qp-plzsel .qp-form-hint { margin-top: 0.4rem; }

/* ========== DOUBLE-OPT-IN (E-Mail bestätigen) ========== */
.qp-login-icon--warning { background: var(--qp-orange-bg); }
.qp-login-icon--warning svg { color: var(--qp-orange-dark); }
.qp-login-subtitle strong { color: var(--qp-heading); }
.qp-verify-hint { font-size: 0.85rem; color: var(--qp-muted); margin-bottom: 1rem; }
.qp-verify-dev {
    margin: -0.5rem 0 1.5rem; padding: 0.75rem 1rem;
    background: var(--qp-orange-bg); border: 1px dashed var(--qp-orange); border-radius: var(--qp-radius-sm);
    font-size: 0.8rem; line-height: 1.5; color: var(--qp-text); word-break: break-all;
}
.qp-verify-dev a { color: var(--qp-orange-dark); font-weight: 600; }

/* ========== PASSWORT VERGESSEN ========== */
.qp-form-hint[hidden] { display: none; }
.qp-form-hint--error { color: var(--qp-red); font-weight: 500; }
a.qp-btn-primary { justify-content: center; text-decoration: none; text-align: center; }

/* ========== FEHLERSEITEN (403 / 404 / 4xx / 500) ========== */
.qp-error-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.qp-error-box { text-align: center; max-width: 480px; padding: 3rem 1.5rem; }
.qp-error-icon {
    width: 80px; height: 80px; margin: 0 auto 1.25rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.qp-error-icon svg { width: 40px; height: 40px; }
.qp-error-code { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--qp-light); margin-bottom: 0.35rem; }
.qp-error-title { font-size: 1.5rem; font-weight: 800; color: var(--qp-heading); margin-bottom: 0.5rem; }
.qp-error-message { font-size: 1rem; color: var(--qp-muted); margin-bottom: 0.5rem; }
.qp-error-hint { font-size: 0.85rem; color: var(--qp-light); }
.qp-error-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.qp-error-actions a { font-size: 0.85rem; }

/* ========== FORMULAR-FEHLER AM FELD ========== */
.qp-form-group .error-message { margin-top: 0.3rem; font-size: 0.8rem; font-weight: 500; color: var(--qp-red); }
.qp-form-input.form-error { border-color: var(--qp-red); background: var(--qp-red-bg); }
.qp-form-input.form-error:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }

/* ========== KOPFZEILE RESPONSIV ==========
   Ab 1024 px: Original (Logo 78 px, Slogan, Hinweistext).
   Das Logo bleibt bis 600 px in voller Größe, weil es wichtige Informationen enthält;
   erst auf Handys wird es verkleinert. */
.qp-header-inner { gap: 1rem; }
.qp-logo { flex-shrink: 0; }
.qp-header-right, .qp-header-user { flex-shrink: 0; }
.qp-user-name { white-space: nowrap; }

@media (max-width: 1023px) {
    .qp-header { padding: 0 1.25rem; }
    .qp-logo { gap: 1rem; }
    .qp-logo-text { font-size: 1rem; }
    .qp-header-hint { display: none; }
}
@media (max-width: 939px) {
    .qp-header { padding: 0 1rem; }
    .qp-logo-text { display: none; }
}
@media (max-width: 679px) {
    .qp-header-right { gap: 0.5rem; }
    .qp-header-right .qp-btn-outline,
    .qp-header-right .qp-btn-primary { padding: 0.45rem 0.8rem; font-size: 0.8rem; }
}
@media (max-width: 599px) {
    .qp-header { height: 64px; }
    .qp-logo img { height: 44px; }
    .qp-header-right { gap: 0.5rem; }
    .qp-header-right .qp-btn-outline,
    .qp-header-right .qp-btn-primary { padding: 0.45rem 0.8rem; font-size: 0.8rem; }
    .qp-user-name { display: none; }
}
@media (max-width: 400px) {
    .qp-logo img { height: 36px; }
}

/* ========== REGISTRIERUNG AUF SCHMALEN BILDSCHIRMEN ========== */
/* Zustimmungs-Text als normaler Fließtext, damit er umbricht (statt als starre Flex-Blöcke) */
.qp-legal-check { display: block; position: relative; padding-left: 1.6rem; overflow-wrap: break-word; }
.qp-legal-check input { position: absolute; left: 0; top: 0.1rem; margin-top: 0; }
@media (max-width: 640px) {
    .qp-register-card { width: 100%; padding: 1.5rem 1rem; }
}
@media (max-width: 420px) {
    /* Kleine Handys: nur "Anmelden" in der Kopfzeile, Registrieren ist über die Login-Seite erreichbar */
    .qp-header-right a + a { display: none; }
}

/* Inhalt darf auf sehr schmalen Bildschirmen schmaler werden als die natürliche Feldbreite */
.qp-page, .qp-search-layout, .qp-search-form-col, .qp-search-row, .qp-search-input-wrap { min-width: 0; }
.qp-search-step-input { min-width: 0; }
@media (max-width: 360px) {
    .qp-page { padding: 1rem; }
    .qp-search-hero-title { font-size: 1.2rem; }
}
.qp-search-hero-title { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 480px) {
    /* "Wie finde ich …": Schritt über den Text statt daneben */
    .qp-search-table, .qp-search-table tbody, .qp-search-table tr, .qp-search-table td { display: block; width: 100%; }
    .qp-search-table-td:first-child { padding-bottom: 0.15rem; }
}

/* Ticket-Tabelle: auf schmalen Bildschirmen innerhalb der Karte scrollen, statt die Seite zu verbreitern */
.qp-table-card { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Seiteninhalt nie breiter als das Fenster (bleibt auf großen Bildschirmen zentriert, max. 1200 px) */
.qp-page { width: 100%; }

/* ========== UMKREISSUCHE ========== */
.qp-plz-row { display: flex; gap: 0.75rem; }
.qp-plz-row .qp-search-input-wrap { flex: 1; min-width: 0; position: relative; }
.qp-radius-select { flex: 0 0 auto; width: auto; min-width: 9.5rem; cursor: pointer; background: var(--qp-white); }
.qp-result-distance {
    display: inline-block; margin-top: 0.3rem; padding: 0.1rem 0.55rem;
    border-radius: var(--qp-radius-pill); background: var(--qp-green-bg);
    color: var(--qp-green-dark); font-size: 0.75rem; font-weight: 600;
}
.qp-map-source { padding: 0.3rem 0.6rem; font-size: 0.7rem; color: var(--qp-light); text-align: right; }
.qp-map-source a { color: inherit; text-decoration: underline; }
@media (max-width: 420px) {
    .qp-plz-row { flex-direction: column; gap: 0.5rem; }
    .qp-radius-select { width: 100%; }
}

/* ========== UMKREIS JE EINSATZGEBIET ========== */
.qp-plzsel-default {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    margin: 0.6rem 0 0.2rem; font-size: 0.85rem; color: var(--qp-muted);
}
.qp-plzsel-radius {
    border: 1px solid var(--qp-border); border-radius: var(--qp-radius-pill);
    background: var(--qp-white); color: var(--qp-text);
    font: inherit; font-size: 0.75rem; padding: 0.1rem 0.4rem; cursor: pointer;
}
.qp-plzsel-chip .qp-plzsel-radius { margin-left: 0.15rem; border-color: var(--qp-green); color: var(--qp-green-dark); }

/* Karte der Einsatzgebiete (Dienstleister) */
.qp-plzmap-card { border: 1px solid var(--qp-border); border-radius: var(--qp-radius-sm); overflow: hidden; }
.qp-plzmap { height: 360px; min-height: 0; }
@media (max-width: 768px) { .qp-plzmap { height: 260px; } }
.qp-result-distance { white-space: normal; line-height: 1.35; }

/* ========== GEWINNSPIEL ========== */
.qp-register-card--gewinnspiel { border-top: 4px solid var(--qp-orange); }
.qp-reg-icon--gewinnspiel { background: linear-gradient(135deg, var(--qp-orange), var(--qp-orange-dark)); }
.qp-reg-title--gewinnspiel { color: var(--qp-blue-dark); font-size: 1.6rem; }
.qp-reg-submit--gewinnspiel { background: var(--qp-orange-dark); }
.qp-reg-submit--gewinnspiel:hover { background: #b45309; }

.qp-gw-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--qp-orange-dark);
    margin-bottom: 0.25rem;
}
.qp-gw-deadline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: var(--qp-radius-pill);
    background: var(--qp-orange-bg);
    color: var(--qp-orange-dark);
    font-size: 0.82rem;
    font-weight: 600;
}
.qp-gw-deadline svg { width: 15px; height: 15px; }

.qp-gw-status {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius);
    background: var(--qp-bg);
    color: var(--qp-text);
    font-size: 0.92rem;
    line-height: 1.55;
}
.qp-gw-status strong { color: var(--qp-heading); }
.qp-gw-status svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 0.1rem; }
.qp-gw-status--ok { background: var(--qp-green-bg); border-color: #a7f3d0; }
.qp-gw-status--ok svg { color: var(--qp-green-dark); }
.qp-gw-status--ended { display: block; background: var(--qp-orange-bg); border-color: #fde68a; }

.qp-gw-login-hint {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--qp-radius);
    background: var(--qp-blue-bg);
    color: var(--qp-text);
    font-size: 0.88rem;
    text-align: center;
}
.qp-gw-login-hint a { color: var(--qp-blue-dark); font-weight: 600; text-decoration: underline; }
.qp-gw-login-hint--highlight { background: var(--qp-orange-bg); border: 1px solid #fde68a; }

.qp-gw-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--qp-muted);
    text-align: center;
}

.qp-gw-terms {
    margin-top: 1.75rem;
    border-top: 1px solid var(--qp-border);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: var(--qp-muted);
}
.qp-gw-terms summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--qp-text);
}
.qp-gw-terms ol { margin: 0.75rem 0 0 1.25rem; line-height: 1.6; }
.qp-gw-terms li { margin-bottom: 0.35rem; }
.qp-gw-terms:target, .qp-gw-terms[open] summary { color: var(--qp-orange-dark); }

/* ========== RECHTLICHES (AGB, IMPRESSUM) + FOOTER-LINKS ========== */
.qp-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: var(--qp-light);
}
.qp-footer-links a { color: var(--qp-muted); font-weight: 500; }
.qp-footer-links a:hover { color: var(--qp-blue-dark); text-decoration: underline; }

.qp-legal-page {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 2.5rem 2rem 3rem;
}
.qp-legal-card {
    width: 100%;
    max-width: 820px;
    background: var(--qp-white);
    border: 1px solid var(--qp-border);
    border-top: 4px solid var(--qp-blue-dark);
    border-radius: var(--qp-radius-lg);
    padding: 2.5rem 3rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);
}
.qp-legal-header { margin-bottom: 1.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--qp-border); }
.qp-legal-kicker {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--qp-teal);
    margin-bottom: 0.35rem;
}
.qp-legal-title { font-size: 1.75rem; font-weight: 700; color: var(--qp-blue-dark); line-height: 1.25; margin: 0 0 0.4rem; }
.qp-legal-subtitle { font-size: 1rem; color: var(--qp-text); margin: 0 0 0.3rem; }
.qp-legal-stand { font-size: 0.82rem; color: var(--qp-muted); margin: 0; }

.qp-legal-toc {
    background: var(--qp-bg);
    border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}
.qp-legal-toc-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--qp-muted); margin-bottom: 0.5rem; }
.qp-legal-toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.qp-legal-toc li { break-inside: avoid; margin-bottom: 0.3rem; font-size: 0.88rem; }
.qp-legal-toc a { color: var(--qp-blue-dark); }
.qp-legal-toc a:hover { text-decoration: underline; }

.qp-legal-body { color: var(--qp-text); font-size: 0.95rem; line-height: 1.7; }
.qp-legal-body h2 {
    font-size: 1.1rem; font-weight: 700; color: var(--qp-heading);
    margin: 2rem 0 0.6rem; scroll-margin-top: 1rem;
}
.qp-legal-body p { margin: 0 0 0.9rem; }
.qp-legal-body ul, .qp-legal-body ol { margin: 0 0 1rem 1.4rem; padding: 0; }
.qp-legal-body li { margin-bottom: 0.35rem; }
.qp-legal-body a { color: var(--qp-green-dark); font-weight: 500; word-break: break-word; }
.qp-legal-body a:hover { text-decoration: underline; }

.qp-legal-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.25rem; font-size: 0.92rem; }
.qp-legal-table td { padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--qp-border); vertical-align: top; }
.qp-legal-table td:first-child { width: 40%; color: var(--qp-muted); }

@media (max-width: 679px) {
    .qp-legal-page { padding: 1.5rem 1rem 2rem; }
    .qp-legal-card { padding: 1.5rem 1.25rem; }
    .qp-legal-title { font-size: 1.4rem; }
    .qp-legal-toc ol { columns: 1; }
    .qp-legal-table td { display: block; width: auto !important; padding: 0.15rem 0; border: 0; }
    .qp-legal-table tr { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--qp-border); }
}
