/* ============================================================
   Kundenmenü – kasse und papier® | Corporate Design Stylesheet
   Farben: Petrol #0d5c6e | Orange #f39325 | Text #333
   Font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif
   Border-radius: 6px | Sidebar: 240px
   ============================================================ */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
    --color-primary:       #0d5c6e;   /* Petrol */
    --color-primary-hover: #094752;   /* Petrol dunkler */
    --color-accent:       #f39325;   /* Orange */
    --color-accent-hover: #d97d17;   /* Orange dunkler */
    --color-text:         #333333;
    --color-text-light:   #666666;
    --color-border:       #ddd;
    --color-bg:           #f5f5f5;
    --color-white:        #ffffff;
    --sidebar-width:      240px;
    --topbar-height:      56px;
    --radius:             6px;
    --shadow:             0 2px 8px rgba(0,0,0,.12);
    --font:               'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --transition:         .2s ease;
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform .1s;
    white-space: nowrap;
    line-height: 1.4;
    gap: 6px;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 2px 6px rgba(243,147,37,.35);
}
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-approve {
    background: #27a06a;
    color: #fff;
    padding: 7px 14px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(39,160,106,.25);
}
.btn-approve:hover { background: #228a5e; }

.btn-reject {
    background: #e53935;
    color: #fff;
    padding: 7px 14px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(229,57,53,.2);
}
.btn-reject:hover { background: #c62828; }

.btn-full { width: 100%; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-white);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0,0,0,.06);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 14px;
    border-bottom: 1px solid #eee;
}

.sidebar-logo img {
    width: 36px; height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.sidebar-brand strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
}

.sidebar-brand span {
    font-size: 11px;
    color: var(--color-text-light);
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--color-text);
    border-left: 3px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.sidebar-link:hover {
    background: #f0f4f6;
    color: var(--color-primary);
    text-decoration: none;
}

.sidebar-link.active {
    background: #eaf3f5;
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    font-weight: 600;
}

.sidebar-link .badge {
    background: var(--color-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.sidebar-bottom {
    border-top: 1px solid #eee;
    padding: 10px 0;
}

.sidebar-user {
    display: block;
    padding: 6px 16px 4px;
    font-size: 12px;
    color: var(--color-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sidebar-bottom .sidebar-link {
    font-size: 13px;
    color: var(--color-text-light);
}

.sidebar-bottom .sidebar-link:hover {
    color: #e53935;
    background: #fdf0ef;
}

/* ── Main Content ────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--color-primary);
    display: flex;
    align-items: center;
    padding: 0 28px;
    box-shadow: 0 2px 6px rgba(13,92,110,.2);
    z-index: 90;
}

.topbar-title {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
}

.content-area {
    flex: 1;
    padding: 28px;
}

/* ── Login / Register ────────────────────────────────────────── */
.login-page {
    background: linear-gradient(135deg, #0d5c6e 0%, #0e6577 50%, #f39325 200%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 0 16px;
    text-align: center;
}

.login-card {
    background: var(--color-white);
    border-radius: calc(var(--radius) * 2);
    padding: 36px 32px 28px;
    box-shadow: 0 8px 32px rgba(13,92,110,.25);
}

.login-logo {
    margin-bottom: 24px;
}

.login-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin: 0 auto 12px;
}

.login-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -.01em;
}

.login-subtitle {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 2px;
}

.login-footer-link {
    margin-top: 20px;
    font-size: 13px;
    color: var(--color-text-light);
}

.login-footer-brand {
    margin-top: 20px;
    font-size: 12px;
    color: rgba(255,255,255,.75);
}

/* ── Admin Page ──────────────────────────────────────────────── */
.admin-page { background: var(--color-bg); }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.alert-error {
    background: #fdf0ef;
    border: 1px solid #e53935;
    color: #b71c1c;
}

.alert-success {
    background: #e8f5e9;
    border: 1px solid #27a06a;
    color: #1b5e20;
}

.alert-info {
    background: #e3f2fd;
    border: 1px solid #1976d2;
    color: #0d47a1;
}

/* ── Forms ───────────────────────────────────────────────────── */
.login-form { text-align: left; }

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13,92,110,.12);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* ── Panel / Cards ───────────────────────────────────────────── */
.panel {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.panel-form .form-row {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 14px;
}

/* ── Dashboard ───────────────────────────────────────────────── */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--color-primary) 0%, #126b83 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 28px 28px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(13,92,110,.2);
}

.dashboard-welcome h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.dashboard-welcome p {
    opacity: .9;
    font-size: 14px;
    line-height: 1.6;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.dash-card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--color-primary);
    transition: transform var(--transition), box-shadow var(--transition);
}

.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
}

.dash-card-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.dash-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.dash-card p {
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.5;
    margin-bottom: 4px;
}

/* ── Tables ──────────────────────────────────────────────────── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 13px;
}

.admin-table thead tr {
    background: var(--color-primary);
    color: #fff;
}

.admin-table th {
    padding: 11px 14px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.admin-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background var(--transition);
}

.admin-table tbody tr:hover { background: #f8fafb; }

.admin-table td {
    padding: 10px 14px;
    vertical-align: middle;
}

.admin-table td.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead tr {
    background: #f0f4f6;
}

.data-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover { background: #fafbfc; }

/* ── Status Badge ────────────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.status-open, .status-in-progress { background: #e3f2fd; color: #1565c0; }
.status-resolved, .status-closed { background: #e8f5e9; color: #2e7d32; }
.status-pending { background: #fff8e1; color: #f57f17; }

/* ── Inline Inputs (Admin table) ─────────────────────────────── */
.input-inline {
    width: 110px;
    padding: 5px 8px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 12px;
    font-family: var(--font);
    color: var(--color-text);
    background: #fff;
}

.input-inline:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-light);
}

.empty-state-text {
    text-align: center;
    padding: 24px;
    color: var(--color-text-light);
    font-size: 14px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar-logo { border-bottom: none; padding: 10px 14px; }
    .sidebar-logo img { width: 28px; height: 28px; }
    .sidebar-brand { display: none; }
    .sidebar-nav { display: flex; flex: none; padding: 0; }
    .sidebar-link { padding: 10px 12px; border-left: none; border-bottom: 2px solid transparent; }
    .sidebar-link.active { border-left-color: transparent; border-bottom-color: var(--color-primary); }
    .sidebar-bottom { border-top: none; margin-left: auto; display: flex; align-items: center; }
    .sidebar-user { display: none; }

    .main-content { margin-left: 0; }
    .topbar { padding: 0 16px; }
    .content-area { padding: 16px; }
    .panel-form .form-row { grid-template-columns: 1fr; }
    .dashboard-cards { grid-template-columns: 1fr; }

    .admin-table { font-size: 12px; overflow-x: auto; display: block; }
    .admin-table td.actions { flex-direction: column; }
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {
    .sidebar, .topbar { display: none; }
    .main-content { margin-left: 0; }
}