:root {
    --color-bg: #f3f4f6;
    --color-surface: #ffffff;
    --color-primary: #c00000;
    --color-primary-soft: #fde7e7;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-head: #9f9f9f;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 10px 25px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

.page {
    min-height: 100vh;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--color-head);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header-title {
    display: flex;
    flex-direction: column;
}

.app-logo {
    font-weight: 700;
    letter-spacing: 0.05em;
}

.app-subtitle {
    font-size: 12px;
    color: var(--color-muted);
}

.app-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.app-main {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Cards */

.card {
    /*background: var(--color-surface);*/
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}

.card-dl {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

.card-highlight {
    background: linear-gradient(135deg, var(--color-primary), #e11d48);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}

.card-highlight p {
    color: #fee2e2;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary);
}

.btn-block {
    width: 100%;
    margin-top: 12px;
}

.btn-icon {
    border-radius: 999px;
    border: none;
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #000;
}

/* Forms */

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-label {
    font-size: 14px;
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-input, textarea, select {
    border-radius: var(--radius-md);
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #f9fafb;
}

.form-input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-inline {
    display: flex;
    gap: 8px;
}

.form-inline .form-input {
    flex: 1;
}

/* Tabs */

.tabs {
    display: flex;
    gap: 8px;
    margin: 8px 0 16px;
    padding: 0 2px;
}

.tab-btn {
    flex: 1;
    border-radius: 999px;
    border: none;
    padding: 8px 10px;
    font-size: 14px;
    background: #e5e7eb;
    color: #374151;
}

.tab-btn.active {
    background: var(--color-primary);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Lists */

.list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 14px;
}

/* QR */

.qr-reader {
    margin-top: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #111827;
}

/* Alerts */

.alert {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 12px;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

/* Auth */

.page-login {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.auth-card {
    background: var(--color-surface);
    border-radius: 20px;
    padding: 24px 22px 26px;
    box-shadow: var(--shadow-soft);
}

.auth-logo {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 4px;
}

.auth-logo span {
    color: var(--color-primary);
}
.page-login {
    background: url('../../../media/hintergrund.jpeg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
/* Login-Logo über der Card */
.login-logo {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: -20px;
    position: relative;
    z-index: 3;
}

.login-logo img {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}
/* Header Logo */
.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 38px;
    width: auto;
    display: block;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-logo-small {
    height: 32px;
    width: auto;
}

/* Header Layout verbessern */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    /*background: var(--color-surface);*/
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header-title {
    text-align: center;
    flex: 1;
}

.app-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Timeout Overlay */
.timeout-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

/* Popup Box */
.timeout-box {
    background: #fff;
    padding: 22px 24px;
    border-radius: 16px;
    width: 85%;
    max-width: 360px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    text-align: center;
    animation: fadeIn 0.25s ease-out;
}

.timeout-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.timeout-text {
    color: #444;
    margin-bottom: 14px;
}

.timeout-btn {
    width: 100%;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.list-item {
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
    cursor: pointer;
}

.list-item:hover {
    background: #eef2ff;
    border-color: #c00000;
}
.dashboard-button {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* --- GLOBAL --- */
body {
    margin: 0;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
}

/* --- HEADER --- */
.app-header {
    /*background: #c00000;*/
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}



.header-center {
    font-size: 20px;
    font-weight: 600;
}

/* --- MAIN --- */
.app-main {
    padding: 18px;
}

/* --- CARDS --- */
.card {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
}

/* --- BUTTONS --- */
.btn-primary,
.btn-secondary,
.btn-warning {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    margin-top: 10px;
}

.btn-primary {
    background: #c00000;
    color: #fff;
}

.btn-secondary {
    background: #444;
    color: #fff;
}

.btn-warning {
    background: #ff9800;
    color: #fff;
}

/* --- INPUTS --- */
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ccc;
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: 16px;
}

/* --- LIST ITEMS --- */
.list-item {
    display: block;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.list-item strong {
    font-size: 17px;
}

/* --- STOCK DISPLAY --- */
.stock-display {
    font-size: 18px;
    margin-bottom: 12px;
}

/* --- SCANNER FULLSCREEN --- */
#qr-reader {
    border-radius: 12px;
    overflow: hidden;
}
