/* ==========================
   Reset
========================== */

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

/* ==========================
   Farben
========================== */

:root{
    /* Farben */
    --primary:#004a36;
    --primary-dark:#004a82;
    --secondary:#f5f7fa;
    --secondary-dark:#e7edf5;
    --success:#2e7d32;
    --warning:#ef6c00;
    --danger:#c62828;
    --text:#2f3640;
    --text-light:#6b7280;
    --border:#d8dee6;
    --background:#f2f5f9;
	--surface:#ffffff;
    --card:#ffffff;
    /* Abstände */
    --space-xs:4px;
    --space-sm:8px;
    --space-md:16px;
    --space-lg:24px;
    --space-xl:32px;
    /* Rundungen */
    --radius:10px;
}

/* ==========================
   Grundlayout
========================== */

html{
    font-size:16px;
}

body{
	font-family:Arial,Helvetica,sans-serif;
	background:var(--background);
	color:var(--text);
	line-height:1.4;
}

/* ==========================================
   LOGIN
========================================== */

.login-page{
    min-height:100vh;
    margin:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:#f4f6f8;
}


/* WRAPPER */

.login-wrapper{
    width:100%;
    max-width:420px;
}


/* KARTE */

.login-card{
    width:100%;
    padding:32px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:0 8px 30px rgba(0,0,0,.08);
}


/* KOPF */

.login-header{
    margin-bottom:28px;
    text-align:center;
}

.login-header h1{
    margin:12px 0 5px;
    font-size:1.45rem;
}

.login-header p{
    margin:0;
    color:var(--text-light);
    font-size:.9rem;
}


/* LOGO */

.login-logo{
    width:96px;
    height:96px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--primary);
    color:#fff;
    border-radius:18px;
    font-size:1.35rem;
    font-weight:700;
    letter-spacing:.05em;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
}


/* FORMULAR */

.login-form{
    display:flex;
    flex-direction:column;

    gap:18px;
}

.login-field{
    display:flex;
    flex-direction:column;

    gap:6px;
}

.login-field label{
    font-size:.9rem;
    font-weight:600;

    color:var(--text);
}

.login-field input{
    width:100%;
    height:50px;

    padding:0 14px;

    box-sizing:border-box;

    border:1px solid var(--border);
    border-radius:10px;

    background:var(--card);

    color:var(--text);

    font-size:1rem;

    outline:none;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.login-field input:focus{
    border-color:var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(0,0,0,.05);
}


/* LOGIN BUTTON */

.login-submit{
    width:100%;
    min-height:52px;

    margin-top:5px;

    font-size:1rem;
    font-weight:700;
}


/* FOOTER */

.login-footer{
    margin-top:24px;

    text-align:center;

    color:var(--text-light);

    font-size:.78rem;
}


/* ==========================================
   SMARTPHONE
========================================== */

@media(max-width:500px){

    .login-page{
        padding:15px;
    }

    .login-card{
        padding:24px 20px;
    }

}

/* ==========================
   Wrapper
========================== */

.wrapper{
	max-width:520px;
	margin:auto;
	padding:15px;
}

.app-container{
	padding:10px;
}

/* ==========================
   Header
========================== */

.header{
    position:relative;
    overflow:hidden;
    padding:20px;
    background-color:var(--primary);
    color:#fff;
}


.logo{
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    gap:14px;
    max-width:520px;
    margin:auto;
    color:#fff;
    text-decoration:none;
}

.logo-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 96px;
    width:96px;
    height:96px;
}

.logo-text{
    min-width:0;
    font-size:1.45rem;
    font-weight:700;
    line-height:1.15;
}

.logo-text small{
    display:block;
    margin-top:5px;
    font-size:.82rem;
    font-weight:400;
    opacity:.85;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* ==========================
   Karten
========================== */

.card{
	background:white;
	border-radius:var(--radius);
	padding:15px;
	margin:15px 0;
	box-shadow:0 2px 8px rgba(0,0,0,.08);
}

/* ==========================================
   NAVIGATIONSKACHELN
========================================== */

.nav{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
    max-width:520px;
    margin:16px auto;
    padding:0 15px;
}

.nav-button{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height:108px;
    padding:16px 10px;
    background:var(--card);
    color:var(--text);
    border:1px solid var(--border);
    border-radius:var(--radius);
    text-decoration:none;
    text-align:center;
    font-size:.92rem;
    font-weight:600;
    box-shadow:0 3px 10px rgba(0,0,0,.06);
}

.nav-button .icon{
    width:30px;
    height:30px;
    color:var(--primary);
}

.nav-button:active{
    background:var(--secondary);
}

@media (max-width:350px){
    .nav{
        grid-template-columns:1fr;
    }
    .nav-button{
        min-height:76px;
        flex-direction:row;
        justify-content:flex-start;
        padding:14px 18px;
        text-align:left;
    }
}

@media (min-width:760px){
    .nav{
        max-width:760px;
        grid-template-columns:repeat(4, minmax(0, 1fr));
    }
}

.icon{
	width:24px;
    height:24px;
	flex-shrink:0;
	fill:currentColor;
}

.card-button{
	display:flex;
    align-items:center;
	gap:15px;
	background:var(--surface);
	padding:18px;
	border-radius:var(--radius);
	margin-bottom:15px;
	text-decoration:none;
	color:var(--text);
	box-shadow:0 3px 10px rgba(0,0,0,.08);
	transition:.2s;
}

.card-button:hover{
	transform:translateY(-2px);
	box-shadow:0 6px 16px rgba(0,0,0,.15);
}

/* ==========================
   Auftragskarte
========================== */

.order-card{
	background:var(--card);
	border:1px solid var(--border);
	border-radius: var(--radius);
	padding:20px;
	margin:15px 0;
	box-shadow:0 3px 10px rgba(0,0,0,.08);
	display:block;
	text-decoration:none;
	color:inherit;
}

.order-card-link {
    cursor:pointer;
}

.order-card-link:active {
    opacity:.92;
}

.order-title{
	display:flex;
    align-items:center;
	gap:10px;
	font-size:1.1rem;
    font-weight:700;
	margin-bottom:15px;
}

.order-object{
	font-size:1.2rem;
    font-weight:600;
	margin-bottom:10px;
}

.order-text{
	color:var(--text-light);
	line-height:1.5;
	margin-bottom:15px;
}

.order-date{
	display:flex;
    align-items:center;
	gap:8px;
	font-size:.95rem;
	color:var(--text-light);
	margin-bottom:15px;
}

.order-button{
	display:inline-block;
	background:var(--primary);
	color:white;
	text-decoration:none;
	padding:10px 18px;
	border-radius:8px;
}

.order-urgent{
    border-left:5px solid #e53935;
}

.order-done{
    opacity:.7;
}

.badge{
    display:inline-block;
    padding:4px 10px;
    border-radius:20px;
    font-size:.75rem;
    font-weight:600;
    margin-left:10px;
    white-space:nowrap;
}

.badge-red{
    background:#fdeaea;
    color:#c62828;
}

.badge-yellow{
    background:#fff8e1;
    color:#ef6c00;
}

.badge-green{
    background:#e8f5e9;
    color:#2e7d32;
}

.form-group{
    margin-bottom:18px;
}

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

.form-group input,
.form-group textarea,
.form-group select{
    width:100%;
    padding:12px;
    border:1px solid var(--border);
    border-radius:8px;
    background:white;
    font-size:1rem;
    transition:.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus{
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(0,90,156,.15);
}

.button{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:100%;
    padding:16px;
    border:none;
    border-radius:10px;
    background:var(--primary);
    color:white;
    font-size:1rem;
    font-weight:600;
    cursor:pointer;
}

.button:hover{
    background:var(--primary-dark);
}

.mobilediv{
    padding:18px;
}

.mobilediv h1{
    margin-bottom:25px;
}

.m-section{
    margin-bottom:20px;
}

.m-section label{
    display:block;
    margin-bottom:6px;
    font-weight:600;
    color:var(--text);
}

.m-section input[type=text],
.m-section input[type=number],
.m-section input[type=email],
.m-section input[type=date],
.m-section input[type=password],
.m-section select,
.m-section textarea{
    width:100%;
    padding:12px;
    border:1px solid #d6dce5;
    border-radius:10px;
    font-size:1rem;
    box-sizing:border-box;
    transition:.2s;
    background:white;
	height:48px;
}

.m-section:last-child{
    margin-top:30px;
}

.radio-group{
    display:flex;
    gap:25px;
    margin-top:8px;
}

.radio-group label{
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
    font-weight:400;
}

input[type=file]{
    display:none;
}

.upload-button{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:100%;
    padding:14px;
    background:var(--secondary);
    color:var(--primary);
	border:2px dashed var(--border);
    border-radius:10px;
    cursor:pointer;
    font-weight:600;
}

.upload-button svg{
    width:22px;
    height:22px;
}

.upload-info{
    margin-top:12px;
    text-align:center;
    color:var(--text-light);
    font-size:.9rem;
}
.upload-info.has-file{
    color:var(--success);
    font-weight:600;
}

/* ==========================================
   TOASTS
========================================== */

.toast-container{
    position:fixed;
    left:50%;
    bottom:24px;
    z-index:9999;
    width:min(92%, 420px);
    transform:translateX(-50%);
    display:flex;
    flex-direction:column;
    gap:10px;
    pointer-events:none;
}

.toast{
    display:flex;
    align-items:center;
    gap:10px;
    padding:14px 16px;
	background:var(--card);
    color:var(--text);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:0 8px 24px rgba(0,0,0,.16);
    opacity:0;
    transform:translateY(12px);
    transition:opacity .2s ease,transform .2s ease;
    pointer-events:auto;
}

.toast.is-visible{
    opacity:1;
    transform:translateY(0);
}

.toast-success{
    border-left:5px solid var(--success);
}

.toast-warning{
    border-left:5px solid var(--warning);
}

.toast-error{
    border-left:5px solid var(--danger);
}

.toast-info{
    border-left:5px solid var(--primary);
}

.toast-message{
    flex:1;
}

.toast-close{
    padding:4px;
    border:0;
    background:transparent;
    color:var(--text-light);
    font-size:1.2rem;
    line-height:1;
    cursor:pointer;
}

/* ==========================================
   ARCHIV / ACCORDION
========================================== */

.archive-page{
    padding:var(--space-md);
}

.accordion{
    margin-bottom:var(--space-md);
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:0 3px 10px rgba(0,0,0,.06);
    overflow:hidden;
}

.accordion-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:var(--space-md);
    width:100%;
    padding:16px 18px;
    border:0;
    background:var(--card);
    color:var(--text);
    font:inherit;
    font-weight:600;
    text-align:left;
    cursor:pointer;
}

.accordion-title{
    display:flex;
    align-items:center;
    gap:10px;
}

.accordion-arrow{
    display:flex;
    transition:transform .2s ease;
}

.accordion.is-open .accordion-arrow{
    transform:rotate(180deg);
}

.accordion-body{
    border-top:1px solid var(--border);
}

.accordion-body[hidden]{
    display:none;
}

.accordion-body > h2{
    margin:18px;
    color:var(--text-light);
    font-size:.95rem;
    font-weight:400;
}

/* ==========================================
   ARCHIV-TABELLEN
========================================== */

.archive-page .tabelle{
    width:100%;
    border-collapse:collapse;
    table-layout:auto;
}

.archive-page .tabelle th{
    padding:12px 10px;
    background:var(--secondary);
    color:var(--text);
    font-size:.9rem;
    font-weight:700;
    text-align:left;
    border-bottom:1px solid var(--border);
}

.archive-page .tabelle td{
    padding:12px 10px;
    vertical-align:middle;
    border-bottom:1px solid var(--border);
}

.archive-page .tabelle td:first-child{
    width:70px;
    text-align:center;
}

.archive-page .tabelle tbody tr:last-child td{
    border-bottom:0;
}

.archive-page .tabelle tbody tr:nth-child(even){
    background:#fafbfd;
}

.archive-page .tabelle tbody tr:hover{
    background:var(--secondary);
}

.archive-page .tabelle a{
    color:var(--text);
    text-decoration:none;
}

.archive-page .tabelle .jinplace{
    display:block;
    min-height:1.2em;
}

/* ==========================================
   ARCHIV-DATEIEN – MOBILE
========================================== */

@media (max-width:700px){

    .archive-page .accordion-body{
        padding:0;
    }

    .archive-page .tabelle,
    .archive-page .tabelle tbody{
        display:block;
        width:100%;
    }

    .archive-page .tabelle thead{
        display:none;
    }

    .archive-page .tabelle tr{
        display:grid;
        grid-template-columns:64px minmax(0, 1fr);
        gap:5px 12px;
        padding:14px 16px;
        border-bottom:1px solid var(--border);
    }

    .archive-page .tabelle tr:last-child{
        border-bottom:0;
    }

    .archive-page .tabelle td{
        display:block;
        width:auto !important;
        padding:0;
        border:0;
    }

    .archive-page .tabelle td:nth-child(1){
        grid-column:1;
        grid-row:1 / span 4;
        align-self:start;
    }

    .archive-page .tabelle td:nth-child(2){
        grid-column:2;
        font-weight:700;
        overflow-wrap:anywhere;
    }

    .archive-page .tabelle td:nth-child(3){
        grid-column:2;
        color:var(--text-light);
        overflow-wrap:anywhere;
    }

    .archive-page .tabelle td:nth-child(4),
    .archive-page .tabelle td:nth-child(5){
        grid-column:2;
        color:var(--text-light);
        font-size:.84rem;
    }

    .archive-page .tabelle td:nth-child(4)::before{
        content:"Erstellt: ";
        font-weight:600;
    }

    .archive-page .tabelle td:nth-child(5)::before{
        content:"Von: ";
        font-weight:600;
    }

    .archive-page .tabelle td:first-child img{
        max-width:56px;
        max-height:64px;
    }

    .archive-page .tabelle a.fotoarchiv img{
        width:56px;
        height:64px !important;
    }
}

.archive-page .tabelle a.fotoarchiv img{
    width:72px;
    height:72px !important;
    margin:0 !important;
    object-fit:cover;
    border-radius:8px;
}

.attachment-thumbnail{
    display:block;
    width:72px;
    height:72px;
    object-fit:cover;
    border-radius:8px;
}

/* ==========================================
   IMAGE DIALOG
========================================== */

.image-dialog{
    width:auto;
    max-width:94vw;
    max-height:94vh;
    padding:0;
    border:0;
    background:transparent;
    overflow:visible;
}

.image-dialog::backdrop{
    background:rgba(0,0,0,.82);
}

.image-dialog-content{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    margin:0;
	max-width:94vw;
    max-height:92vh;
    background:#111;
    border-radius:var(--radius);
    overflow:hidden;
}

.image-dialog-image{
    display:block;
    width:auto;
    height:auto;
    max-width:94vw;
    max-height:82vh;
    object-fit:contain;
}

.image-dialog-caption{
    box-sizing:border-box;
    width:100%;
    padding:12px 16px;
    background:rgba(0,0,0,.82);
    color:#fff;
    text-align:center;
}

.image-dialog-caption:empty{
    display:none;
}

.image-dialog-close{
    position:absolute;
    top:-14px;
    right:-14px;
    z-index:2;
    width:42px;
    height:42px;
    border:0;
    border-radius:50%;
    background:white;
    color:#111;
    font-size:1.8rem;
    line-height:1;
    cursor:pointer;
    box-shadow:0 4px 14px rgba(0,0,0,.3);
}

@media (max-width:700px){

    .image-dialog{
        width:100vw;
        max-width:100vw;
        height:100vh;
        max-height:100vh;
        margin:0;
    }

    .image-dialog-content{
        width:100%;
        height:100%;
        max-width:none;
        max-height:none;
        border-radius:0;
    }

    .image-dialog-image{
        max-width:100vw;
        max-height:calc(100vh - 64px);
    }

    .image-dialog-close{
        top:12px;
        right:12px;
    }
}

/* ==========================================
   ATTACHMENTS
========================================== */

.attachment-list{
    display:flex;
    flex-direction:column;
}

.attachment-item{
    display:flex;
    align-items:center;
	margin:10px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);

    overflow:hidden;
}

.attachment-file{
    display:flex;
    align-items:center;
    gap:14px;

    flex:1;
    min-width:0;

    padding:12px;

    color:var(--text);
    text-decoration:none;
}

.attachment-preview{
    flex:0 0 58px;

    width:58px;
    height:58px;

    display:flex;
    align-items:center;
    justify-content:center;

    overflow:hidden;

    border-radius:10px;

    background:var(--background);
}

.attachment-preview img{
    max-width:100%;
    max-height:100%;

    object-fit:contain;
}

.image-dialog-link .attachment-preview img{
    width:100%;
    height:100%;

    object-fit:cover;
}

.attachment-content{
    flex:1;
    min-width:0;
}

.attachment-name{
    font-weight:600;
    font-size:1rem;

    line-height:1.3;

    overflow-wrap:anywhere;
}

.attachment-description{
    margin-top:3px;

    color:var(--text-light);

    font-size:.9rem;
    line-height:1.3;

    overflow-wrap:anywhere;
}

.attachment-meta{
    margin-top:6px;

    color:var(--text-light);

    font-size:.78rem;
}

.attachment-meta-separator{
    margin:0 4px;
}

.attachment-arrow{
    flex:0 0 auto;

    color:var(--primary);
}

.attachment-arrow .icon{
    width:18px;
    height:18px;
}

.attachment-delete{
    flex:0 0 46px;

    width:46px;
    height:46px;

    margin-right:8px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:0;
    border-radius:10px;

    background:transparent;
    color:var(--danger);

    cursor:pointer;
}

.attachment-delete .icon{
    width:18px;
    height:18px;
}

.attachment-public{
    padding-left:12px;
}

.attachment-empty{
    padding:16px;

    color:var(--text-light);

    text-align:center;
}

/* ==========================================
   GETRÄNKEAUSGABE
========================================== */


/* ---------- TABS ---------- */

.app-tabs{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:10px;

    margin:15px 0 25px;
}

.app-tab{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;

    min-height:58px;
    padding:12px 18px;

    border:1px solid var(--border);
    border-radius:var(--radius);

    background:var(--card);
    color:var(--text);

    font-size:1rem;
    font-weight:600;

    cursor:pointer;
}

.app-tab .icon{
    width:22px;
    height:22px;
}

.app-tab.is-active{
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
}

.tab-panel{
    display:none;
}

.tab-panel.is-active{
    display:block;
}


/* ---------- AUSGABE / RÜCKNAHME ---------- */

.transaction-switch{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:10px;
}

.transaction-switch label{
    cursor:pointer;
}

.transaction-switch input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.transaction-switch span{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    min-height:52px;
    padding:10px 16px;

    border:2px solid var(--border);
    border-radius:var(--radius);

    background:var(--card);

    font-weight:600;
}

.transaction-switch input:checked + span{
    border-color:var(--primary);
    background:var(--secondary);
    color:var(--primary);
}

.transaction-switch .icon{
    width:20px;
    height:20px;
}


/* ---------- POSITIONEN ---------- */

.transaction-items{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-bottom:15px;
}

.transaction-item{
    display:grid;
    grid-template-columns:auto minmax(230px, .9fr) minmax(220px, 1.5fr) 46px;
    gap:12px;
    align-items:center;
    padding:14px;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:0 2px 8px rgba(0,0,0,.05);
}


/* ---------- MENGEN-STEPPER ---------- */

.quantity-stepper{
    display:grid;
    grid-template-columns:48px 60px 48px;

    height:48px;

    border:1px solid var(--border);
    border-radius:10px;

    overflow:hidden;
}

.quantity-button{
    display:flex;
    align-items:center;
    justify-content:center;

    padding:0;

    border:0;

    background:var(--secondary);
    color:var(--primary);

    cursor:pointer;
}

.quantity-button .icon{
    width:22px;
    height:22px;
}

.quantity-button:active{
    background:var(--primary);
    color:#fff;
}

.quantity-value{
    width:100% !important;
    height:48px;

    padding:0 !important;

    border:0 !important;
    border-left:1px solid var(--border) !important;
    border-right:1px solid var(--border) !important;
    border-radius:0 !important;

    background:#fff;

    text-align:center;

    font-size:1.15rem;
    font-weight:700;

    appearance:textfield;
}

.quantity-value::-webkit-inner-spin-button,
.quantity-value::-webkit-outer-spin-button{
    appearance:none;
    margin:0;
}


/* ---------- SELECTS ---------- */

.transaction-item select{
    width:100%;
    min-width:0;
    height:48px;

    margin:0;
}

/* ---------- GEBINDE ---------- */

.package-switch{
    display:grid;
    grid-template-columns:repeat(3, 1fr);

    min-width:230px;

    border:1px solid var(--border);
    border-radius:10px;

    overflow:hidden;
}

.package-switch label{
    margin:0;
    cursor:pointer;
}

.package-switch label.is-disabled{
    cursor:not-allowed;
}

.package-switch label.is-disabled span{
    background:#f3f4f6;
    color:#b0b6bf;

    opacity:.65;
}

.package-switch label.is-disabled span:active{
    background:#f3f4f6;
}

.package-switch input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.package-switch span{
    display:flex;
    align-items:center;
    justify-content:center;

    height:48px;
    padding:0 6px;

    background:var(--card);
    color:var(--text);

    border-right:1px solid var(--border);

    font-size:.9rem;
    font-weight:600;

    user-select:none;
}

.package-switch label:last-child span{
    border-right:0;
}

.package-switch input:checked + span{
    background:var(--primary);
    color:#fff;
}

.package-switch span:active{
    background:var(--secondary);
}


/* ---------- POSITION LÖSCHEN ---------- */

.transaction-remove{
    display:flex;
    align-items:center;
    justify-content:center;

    width:46px;
    height:46px;

    padding:0;

    border:0;
    border-radius:10px;

    background:transparent;
    color:var(--text-light);

    cursor:pointer;
}

.transaction-remove .icon{
    width:20px;
    height:20px;
}

.transaction-remove:active{
    background:var(--secondary);
}


/* ---------- FORM ACTIONS ---------- */

.form-actions{
    display:flex;
    justify-content:flex-end;

    margin-top:20px;
}

.button-large{
    min-height:56px;
    padding:14px 28px;

    font-size:1.05rem;
}


/* ==========================================
   KUNDEN
========================================== */

.page-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;

    margin-bottom:20px;
}

.page-header h1{
    margin:0;
}

.customer-list{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:12px;
}

.customer-card{
    display:flex;
    align-items:center;
    gap:12px;

    min-height:70px;
    padding:12px;

    background:var(--card);

    border:1px solid var(--border);
    border-radius:var(--radius);

    box-shadow:0 2px 8px rgba(0,0,0,.05);
}

.customer-icon{
    display:flex;
    align-items:center;
    justify-content:center;

    flex:0 0 44px;

    width:44px;
    height:44px;

    border-radius:50%;

    background:var(--secondary);
    color:var(--primary);
}

.customer-icon .icon{
    width:21px;
    height:21px;
}

.customer-content{
    flex:1;
    min-width:0;
}

.customer-name{
    font-weight:600;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.customer-edit{
    display:flex;
    align-items:center;
    justify-content:center;

    width:40px;
    height:40px;

    border:0;
    border-radius:8px;

    background:transparent;
    color:var(--primary);

    cursor:pointer;
}


/* ==========================================
   SMARTPHONE
========================================== */

@media (max-width:600px){

    .app-tab{
        min-height:52px;
        padding:10px;

        font-size:.9rem;
    }

    .app-tab .icon{
        width:19px;
        height:19px;
    }

    .transaction-item{
        grid-template-columns:1fr 46px;
    }

    .product-select{
        grid-column:1 / -1;
        grid-row:1;
    }

    .quantity-stepper{
        grid-column:1;
    }

    .package-select{
        grid-column:1;
    }

    .transaction-remove{
        grid-column:2;
        grid-row:2 / span 2;
        align-self:center;
    }

    .customer-list{
        grid-template-columns:1fr;
    }

    .page-header{
        align-items:flex-start;
        flex-direction:column;
    }

    .form-actions .button{
        width:100%;
    }

}

/* ==========================================
   BUCHUNGSÜBERSICHT
========================================== */

.page-subtitle{
    margin-top:4px;
    color:var(--text-light);
    font-size:.9rem;
}


/* FILTER */

.booking-filter-card{
    margin-bottom:25px;
}

.booking-filter{
    display:grid;

    grid-template-columns:
        minmax(200px,1.5fr)
        minmax(150px,.8fr)
        minmax(145px,.7fr)
        minmax(145px,.7fr)
        auto;

    gap:12px;

    align-items:end;
}

.booking-filter .m-section{
    margin:0;
}

.booking-filter-actions{
    display:flex;
    gap:8px;
    align-items:center;
}


/* ERGEBNISKOPF */

.booking-result-header{
    display:flex;
    align-items:center;
    justify-content:space-between;

    margin:22px 0 12px;
}

.booking-result-header h2{
    margin:0;
}

.booking-count{
    color:var(--text-light);
    font-size:.88rem;
}


/* LISTE */

.booking-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}


/* KARTE */

.booking-card{
    padding:15px 16px;

    background:var(--card);

    border:1px solid var(--border);
    border-radius:var(--radius);

    box-shadow:0 2px 8px rgba(0,0,0,.05);
}


/* KOPF */

.booking-header{
    display:flex;

    align-items:flex-start;
    justify-content:space-between;

    gap:15px;

    margin-bottom:13px;
}

.booking-customer-name{
    font-size:1rem;
    font-weight:700;
}

.booking-meta{
    display:flex;
    flex-wrap:wrap;
    gap:6px;

    margin-top:4px;

    color:var(--text-light);
    font-size:.8rem;
}


/* BADGES */

.booking-badges{
    display:flex;
    align-items:center;
    gap:7px;
}

.booking-type,
.booking-status{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-height:30px;

    padding:4px 10px;

    border-radius:20px;

    font-size:.78rem;
    font-weight:700;

    white-space:nowrap;
}

.booking-type.is-output{
    background:var(--primary);
    color:#fff;
}

.booking-type.is-return{
    background:#e7f6ec;
    color:#24763d;
}

.booking-status.is-cancelled{
    background:#f4e6e6;
    color:#a33;
}


/* POSITIONEN */

.booking-positions{
    display:flex;
    flex-direction:column;

    gap:2px;
}

.booking-position{
    display:grid;

    grid-template-columns:
        45px
        85px
        1fr;

    gap:8px;

    align-items:center;

    min-height:38px;

    padding:5px 8px;

    border-top:1px solid var(--border);
}

.booking-position:first-child{
    border-top:0;
}

.booking-quantity{
    font-size:1rem;
    font-weight:700;

    color:var(--primary);
}

.booking-package{
    color:var(--text-light);
    font-size:.88rem;
}

.booking-product{
    font-weight:500;
}


/* BEMERKUNG */

.booking-note{
    margin-top:12px;
    padding-top:10px;

    border-top:1px solid var(--border);

    color:var(--text-light);
    font-size:.85rem;
}


/* STORNIERT */

.booking-card.is-cancelled{
    opacity:.6;
}

.booking-card.is-cancelled
.booking-position{
    text-decoration:line-through;
}


/* LEER */

.booking-empty{
    color:var(--text-light);
    text-align:center;

    padding:30px 15px;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media(max-width:900px){

    .booking-filter{
        grid-template-columns:
            1.4fr
            1fr
            1fr
            1fr;
    }

    .booking-filter-actions{
        grid-column:1 / -1;
    }

}


@media(max-width:600px){

    .booking-filter{
        grid-template-columns:
            1fr
            1fr;
    }

    .booking-filter .m-section:first-of-type{
        grid-column:1 / -1;
    }

    .booking-filter-actions{
        grid-column:1 / -1;
    }

    .booking-filter-actions .button{
        flex:1;
    }

    .booking-header{
        gap:8px;
    }

    .booking-badges{
        flex-direction:column;
        align-items:flex-end;
    }

    .booking-position{
        grid-template-columns:
            35px
            70px
            1fr;
    }

}