*{box-sizing:border-box}body{margin:0;background:#f5f7fb;color:#172033;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}header{background:#0f172a;color:#fff;padding:15px max(18px,calc((100% - 1120px)/2));display:flex;justify-content:space-between;align-items:center;gap:15px}header a{color:#fff}.brand{font-size:20px}.brand span{color:#5eead4}.container{max-width:1120px;margin:auto;padding:24px 18px 60px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}h1{font-size:28px;margin:0 0 5px}h2{font-size:18px;margin:0 0 14px}h3{margin:0 0 8px;font-size:16px}.muted{color:#64748b;font-size:13px}.card{background:#fff;border:1px solid #dbe2ea;border-radius:16px;padding:18px;box-shadow:0 6px 25px #0f172a0a}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.full{grid-column:1/-1}label{display:block;font-size:13px;font-weight:750;margin:10px 0}input,select,textarea{width:100%;margin-top:6px;padding:10px 12px;border:1px solid #dbe2ea;border-radius:10px;font:inherit;background:#fff}button,.button{border:0;border-radius:10px;padding:11px 15px;font:inherit;font-weight:750;cursor:pointer;display:inline-block}.primary{background:#0f766e;color:#fff}.secondary{background:#e2e8f0;color:#172033}.danger{background:#fee2e2;color:#b91c1c}.wide{width:100%}.filters form{display:grid;grid-template-columns:1fr 180px auto;gap:8px}.filters input,.filters select{margin:0}.orders{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:18px}.order-card{background:#fff;border:1px solid #dbe2ea;border-radius:14px;padding:16px;line-height:1.8}.order-card>div:first-child{display:flex;justify-content:space-between;gap:8px}.meta{color:#475569;font-size:13px}.pill{font-size:11px;border-radius:999px;padding:4px 9px;background:#e2e8f0}.pill.offen{background:#fef3c7}.pill.in_arbeit{background:#dbeafe}.pill.fertig{background:#dcfce7}.pill.archiv{background:#e2e8f0}.empty{text-align:center;padding:40px}.auth{width:min(430px,100%)}.center{min-height:100vh;display:grid;place-items:center;padding:18px}.alert,.success,.result{padding:12px 14px;border-radius:10px;margin-bottom:15px}.alert{background:#fee2e2;color:#991b1b}.success{background:#dcfce7;color:#166534}.tooth-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:7px}.tooth-check{margin:0;padding:9px;background:#f1f5f9;border:1px solid #dbe2ea;border-radius:8px;text-align:center}.tooth-check input{width:auto;margin:0}.tooth-editor{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:14px}.tooth-panel{border:1px solid #dbe2ea;border-radius:12px;padding:12px;background:#fbfdff}.mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.analysis-mini{margin-top:10px;padding:8px;border-radius:8px;background:#ecfeff;font-size:12px}.gallery{display:grid;grid-template-columns:repeat(4,minmax(0,180px));gap:12px;margin-top:18px;align-items:start}.gallery figure{margin:0;border:1px solid #dbe2ea;border-radius:12px;overflow:hidden;background:#f8fafc}.gallery img{width:180px;max-width:100%;height:135px;object-fit:cover;display:block}.gallery figcaption{padding:8px;font-size:12px}.gallery form{margin-top:7px}.upload-form{display:grid;grid-template-columns:220px 1fr auto;gap:8px;align-items:end}.photo-list{display:flex;gap:10px;flex-wrap:wrap}.photo-select{padding:6px;background:#fff;border:1px solid #dbe2ea}.photo-select img{width:120px;height:90px;object-fit:cover;display:block}.analysis-layout{display:grid;grid-template-columns:2fr 1fr;gap:18px}.canvas-wrap{background:#0f172a;border-radius:12px;overflow:auto;display:flex;align-items:center;justify-content:center;min-height:300px}.canvas-wrap canvas{max-width:100%;height:auto}.analysis-controls{display:flex;flex-direction:column;gap:8px}.hidden{display:none}.big{font-size:23px;font-weight:850}@media(max-width:800px){.grid,.orders,.analysis-layout{grid-template-columns:1fr}.tooth-editor{grid-template-columns:1fr 1fr}.tooth-grid{grid-template-columns:repeat(4,1fr)}.gallery{grid-template-columns:repeat(2,1fr)}.upload-form,.filters form{grid-template-columns:1fr}.mini-grid{grid-template-columns:1fr}.topbar{align-items:flex-start}}
/* v2.2 – grafisches Zahnschema */
.tooth-card{overflow:hidden}
.jaw-title{text-align:center;font-size:12px;font-weight:800;letter-spacing:2px;color:#64748b;margin:5px 0 12px}
.dental-arch{display:grid;grid-template-columns:repeat(8,minmax(36px,1fr)) 5px repeat(8,minmax(36px,1fr));gap:6px;align-items:end}
.tooth-tile{position:relative;margin:0;padding:7px 2px;border:1px solid #dbe2ea;background:#f8fafc;border-radius:10px;text-align:center;cursor:pointer;transition:transform .12s,border-color .12s,background .12s,box-shadow .12s;user-select:none}
.tooth-tile input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.tooth-tile:hover{transform:translateY(-2px);border-color:#94a3b8}
.tooth-tile:has(input:focus-visible){outline:3px solid #93c5fd;outline-offset:2px}
.tooth-tile.selected{background:#ccfbf1;border:2px solid #0f766e;box-shadow:0 4px 12px rgba(15,118,110,.14)}
.tooth-icon{display:block;font-size:25px;line-height:30px}
.tooth-tile b{font-size:12px}
.midline{width:5px;height:100%;min-height:55px;background:#cbd5e1;border-radius:5px}
.arch-divider{height:1px;background:#e2e8f0;margin:18px 0}
.tooth-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:16px}
.selected-count{font-size:13px;font-weight:800;color:#0f766e}
.tooth-panel[hidden]{display:none!important}
@media(max-width:800px){
  .dental-arch{grid-template-columns:repeat(8,minmax(28px,1fr)) 3px repeat(8,minmax(28px,1fr));gap:3px}
  .tooth-tile{padding:5px 1px}
  .tooth-icon{font-size:19px;line-height:24px}
  .tooth-tile b{font-size:10px}
}
@media(max-width:560px){
  .dental-arch{grid-template-columns:repeat(4,minmax(45px,1fr));gap:5px}
  .midline{display:none}
}

.form-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:14px}.save-main{min-width:190px}.save-hint{margin:0 0 10px}.photo-placeholder{display:flex;align-items:center;gap:16px;padding:18px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc}.photo-placeholder-icon{font-size:34px}@media(max-width:560px){.dental-arch{grid-template-columns:repeat(4,minmax(42px,1fr));gap:5px}.tooth-tile{min-height:58px}.photo-placeholder{align-items:flex-start}}

/* v2.3.1: force the 16-tooth layout */
.dental-arch{display:grid!important;grid-template-columns:repeat(8,minmax(36px,1fr)) 6px repeat(8,minmax(36px,1fr))!important;gap:6px!important;width:100%}
.tooth-tile{display:block!important}
@media(max-width:800px){.dental-arch{grid-template-columns:repeat(8,minmax(28px,1fr)) 4px repeat(8,minmax(28px,1fr))!important;gap:4px!important}}
@media(max-width:560px){.dental-arch{grid-template-columns:repeat(4,minmax(42px,1fr))!important;gap:5px!important}.midline{display:none!important}}

/* v2.4 – robust dental chart: flex layout prevents the 32 teeth from becoming a vertical list */
.jaw-row{display:flex;align-items:stretch;justify-content:center;gap:10px;width:100%;overflow-x:auto;padding:2px 0 6px}
.quadrant{display:flex;flex:1 1 0;gap:5px;min-width:0}
.quadrant .tooth-tile{flex:1 1 0;min-width:42px}
.jaw-center{width:4px;flex:0 0 4px;background:#cbd5e1;border-radius:5px;margin:0 2px}
.tooth-tile{display:flex!important;flex-direction:column;align-items:center;justify-content:center;min-height:72px;padding:6px 2px!important}
.tooth-tile input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important}
.tooth-icon{font-size:27px!important;line-height:31px!important}
.tooth-tile b{font-size:12px!important;line-height:16px}
.tooth-tile.selected{border:2px solid #0f766e!important;background:#ccfbf1!important}
@media(max-width:800px){
 .jaw-row{gap:6px}.quadrant{gap:4px}.quadrant .tooth-tile{min-width:38px}.tooth-tile{min-height:64px!important}.tooth-icon{font-size:22px!important;line-height:26px!important}.tooth-tile b{font-size:11px!important}
}
@media(max-width:560px){
 .jaw-row{justify-content:flex-start;overflow-x:auto}.quadrant{flex:0 0 auto;width:calc(50% - 7px)}.quadrant .tooth-tile{min-width:40px}.jaw-center{flex-basis:3px;width:3px}
}

/* v2.5 – force a real FDI dental chart */
.tooth-card .jaw{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:flex-end!important;justify-content:center!important;width:100%!important;gap:8px!important;overflow:visible!important}
.tooth-card .quad{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;flex:1 1 0!important;gap:5px!important;min-width:0!important}
.tooth-card .tooth{display:flex!important;flex:1 1 0!important;min-width:38px!important;max-width:64px!important;flex-direction:column!important;align-items:center!important;justify-content:flex-end!important;gap:2px!important;padding:6px 2px!important;margin:0!important;border:1px solid #dbe2ea!important;background:#f8fafc!important;border-radius:10px!important;cursor:pointer!important;box-sizing:border-box!important}
.tooth-card .tooth input{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important}
.tooth-card .tooth.selected{background:#ccfbf1!important;border:2px solid #0f766e!important;box-shadow:0 4px 12px rgba(15,118,110,.15)!important}
.tooth-card .tooth-shape{display:block!important;width:25px!important;height:32px!important;background:white!important;border:2px solid #cbd5e1!important;border-radius:45% 45% 42% 42% / 35% 35% 65% 65%!important;box-shadow:inset 0 -4px 0 rgba(148,163,184,.16)!important}
.tooth-card .tooth-number{font-size:11px!important;font-weight:800!important;line-height:15px!important}
.tooth-card .centerline{flex:0 0 4px!important;width:4px!important;height:58px!important;background:#cbd5e1!important;border-radius:4px!important;margin:0 2px!important}
.tooth-card .arch-divider{height:1px!important;background:#e2e8f0!important;margin:18px 0!important}
.tooth-card .jaw-title{text-align:center!important}
@media(max-width:800px){
 .tooth-card .jaw{gap:5px!important}.tooth-card .quad{gap:3px!important}.tooth-card .tooth{min-width:28px!important;padding:5px 1px!important}.tooth-card .tooth-shape{width:21px!important;height:27px!important}.tooth-card .tooth-number{font-size:10px!important}.tooth-card .centerline{flex-basis:3px!important;width:3px!important;height:50px!important}
}
@media(max-width:560px){
 .tooth-card .jaw{overflow-x:auto!important;justify-content:flex-start!important;padding-bottom:6px!important}.tooth-card .quad{flex:0 0 calc(50% - 5px)!important}.tooth-card .tooth{min-width:34px!important}.tooth-card .centerline{flex-basis:3px!important;width:3px!important}
}

/* v2.7 – force chart layout and touch selection */
.tooth-card .jaw{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;width:100%!important;gap:8px!important;align-items:stretch!important;justify-content:center!important}
.tooth-card .quad{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;flex:1 1 0!important;gap:5px!important;min-width:0!important}
.tooth-card .tooth{display:flex!important;flex:1 1 0!important;min-width:32px!important;max-width:70px!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important}
.tooth-card .tooth.selected{background:#ccfbf1!important;border:2px solid #0f766e!important;box-shadow:0 3px 10px rgba(15,118,110,.15)!important}
.tooth-card .centerline{display:block!important;flex:0 0 4px!important;width:4px!important;background:#cbd5e1!important;border-radius:4px!important}
.upload-size-info{margin-top:6px;font-size:13px;font-weight:700;color:#0f766e}
@media(max-width:700px){.tooth-card .jaw{gap:4px!important}.tooth-card .quad{gap:3px!important}.tooth-card .tooth{min-width:27px!important}.tooth-card .centerline{flex-basis:3px!important;width:3px!important}}

/* v2.8 fallback */
.tooth-card .jaw{display:grid!important;}
.tooth-card .tooth{display:flex!important;}

/* v2.9 – unmistakable selected tooth */
.tooth-card .tooth{position:relative!important;transition:transform .12s,background .12s,border .12s,box-shadow .12s!important}
.tooth-card .tooth.selected{background:#99f6e4!important;border:3px solid #0f766e!important;box-shadow:0 0 0 3px rgba(15,118,110,.22),0 5px 14px rgba(15,118,110,.18)!important;transform:translateY(-2px)!important}
.tooth-card .tooth.selected .selected-badge{display:flex!important}
.selected-badge{display:none;position:absolute;top:3px;right:3px;width:18px;height:18px;border-radius:50%;align-items:center;justify-content:center;background:#0f766e;color:#fff;font-size:12px;font-weight:900;line-height:18px}
.tooth-card .tooth.selected .tooth-shape{border-color:#0f766e!important;box-shadow:inset 0 -4px 0 rgba(15,118,110,.16)!important}

/* v3.0 – calibration belongs to the main dashboard */
.top-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.calibration-home{display:flex;align-items:center;gap:16px;margin-bottom:18px}
.calibration-home-icon{font-size:34px;flex:0 0 auto}
.calibration-home-text{flex:1}
.calibration-home-text h2{margin:0 0 4px}
.calibration-home-text p{margin:0}
@media(max-width:650px){.calibration-home{align-items:flex-start;flex-wrap:wrap}.calibration-home .button{width:100%;text-align:center}.top-actions{width:100%}.top-actions .button{flex:1;text-align:center}}

/* v3.1 – user accounts */
.auth-links{text-align:center;margin:16px 0 0}.auth-links a{font-weight:700}.auth .success{margin-bottom:12px}

/* v3.2 – admin */
.admin-create{display:grid;grid-template-columns:1fr 1fr 180px auto;gap:12px;align-items:end}.user-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid #e2e8f0}.user-row>div:first-child{flex:1;min-width:180px}.inline-form{display:flex;gap:6px;align-items:center}@media(max-width:800px){.admin-create{grid-template-columns:1fr}.inline-form{width:100%}.inline-form input,.inline-form select,.inline-form button{flex:1}}

/* v3.3 – polished dashboard */
.topbar{align-items:center}
.orders{gap:16px}
.order-card{position:relative;display:block;padding:20px 22px;border:1px solid #dbe4ee;border-radius:18px;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 5px 18px rgba(15,23,42,.05);text-decoration:none!important;transition:transform .15s,box-shadow .15s,border-color .15s}
.order-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(15,23,42,.09);border-color:#99f6e4}
.order-card strong{font-size:20px;letter-spacing:.2px}
.order-card .pill{margin-left:8px}
.order-card .meta{margin-top:11px;display:flex;flex-wrap:wrap;gap:8px;color:#64748b;font-size:13px}
.order-card .creator{display:inline-flex;align-items:center;gap:5px;margin-top:10px;font-size:13px;color:#475569;font-weight:700}
.calibration-home{border:1px solid #dbe4ee!important;background:linear-gradient(135deg,#fff,#f0fdfa)!important;box-shadow:0 6px 22px rgba(15,23,42,.05)!important}
.calibration-home-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;background:#ccfbf1;font-size:30px}
.calibration-home .button{white-space:nowrap}
.tooth-card .tooth{position:relative!important;transition:all .15s ease!important}
.tooth-card .tooth.selected{background:#99f6e4!important;border:3px solid #0f766e!important;box-shadow:0 0 0 3px rgba(15,118,110,.18),0 5px 14px rgba(15,118,110,.16)!important;transform:translateY(-2px)!important}
.tooth-card .tooth.selected span:not(.selected-badge){border-color:#0f766e!important}
.selected-badge{display:none;position:absolute;top:3px;right:3px;width:18px;height:18px;border-radius:50%;align-items:center;justify-content:center;background:#0f766e;color:#fff;font-size:12px;font-weight:900;line-height:18px}
.tooth-card .tooth.selected .selected-badge{display:flex!important}
@media(max-width:650px){.calibration-home{gap:12px}.calibration-home .button{width:100%}.order-card{padding:16px}.order-card strong{font-size:18px}}

/* v3.4 – clean dashboard with calibration as tab */
.main-nav{display:flex;align-items:center;gap:4px}
.nav-tab{padding:9px 13px;border-radius:10px;color:#e2e8f0;text-decoration:none;font-weight:700;font-size:14px}
.nav-tab:hover,.nav-tab.active{background:rgba(255,255,255,.1);color:#fff}
.nav-user{margin-left:12px;padding-left:12px;border-left:1px solid rgba(255,255,255,.18);color:#cbd5e1;font-size:14px}
.nav-logout{color:#e2e8f0;text-decoration:none;margin-left:5px;font-weight:600;font-size:14px}
.dashboard-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:26px}
.dashboard-head h1{margin-bottom:4px}
.new-order{padding:13px 20px;font-size:15px}
.section-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 10px}
.section-head h2{margin:0;font-size:18px}
.section-head .muted{font-size:13px}
@media(max-width:760px){
 header{padding:10px 14px;align-items:flex-start;gap:8px}
 .main-nav{flex-wrap:wrap;justify-content:flex-end}
 .nav-user{display:none}
 .dashboard-head{align-items:flex-start;flex-direction:column;margin-bottom:20px}
 .new-order{width:100%;text-align:center}
 .nav-tab{font-size:13px;padding:8px 9px}
}

.calibration-home{display:none!important}

/* v4.0 – home dashboard */
.home-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:0 0 28px}
.home-stat{display:flex;flex-direction:column;gap:5px;padding:18px 20px;border:1px solid #dbe4ee;border-radius:16px;background:#fff;text-decoration:none;color:inherit;box-shadow:0 4px 16px rgba(15,23,42,.04)}
.home-stat:hover{border-color:#99f6e4;transform:translateY(-1px)}
.home-stat span{font-size:13px;color:#64748b;font-weight:700}.home-stat strong{font-size:30px;line-height:1}
.back-tab{padding:9px 13px;color:#cbd5e1;font-weight:700}
@media(max-width:800px){.home-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:500px){.home-stats{grid-template-columns:1fr 1fr;gap:9px}.home-stat{padding:14px}.home-stat strong{font-size:24px}}

/* v4.1 */
.danger{background:#dc2626!important;color:#fff!important;border:0!important}.danger:hover{background:#b91c1c!important}

/* v4.2 */
.archive-note{margin-top:3px;font-size:12px}

/* v4.3 – consistent global navigation */
header .main-nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.nav-tab{white-space:nowrap}.nav-logout{white-space:nowrap}

/* v4.8 – streamlined order form */
.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:650px){.field-grid{grid-template-columns:1fr}}

/* v4.9 */
.initial-photo-box{display:flex;flex-direction:column;gap:6px;padding:14px;border:1px dashed #b8c4d2;border-radius:12px;background:#f8fafc}.home-info-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:16px;margin:0 0 26px}.info-panel{padding:18px}.info-panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}.info-panel-head h2{margin:0;font-size:18px}.news-item{padding:11px 12px;border-left:4px solid #cbd5e1;background:#f8fafc;border-radius:8px;margin:8px 0}.news-item.important{border-left-color:#f59e0b}.news-item.success{border-left-color:#10b981}.news-item p{margin:4px 0;font-size:14px}.news-item span{font-size:11px}.activity-item{display:flex;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid #e2e8f0;text-decoration:none;color:inherit}.activity-item:last-child{border-bottom:0}.news-form{display:grid;grid-template-columns:2fr 3fr 1fr auto;gap:10px;align-items:end}.news-form label{display:flex;flex-direction:column;gap:5px}.news-admin-list{margin-top:16px}.news-admin-row{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-top:1px solid #e2e8f0}.news-admin-row form{margin:0}@media(max-width:850px){.home-info-grid{grid-template-columns:1fr}.news-form{grid-template-columns:1fr}}

/* v4.15 */
.news-comments{margin-top:10px;border-top:1px solid #e2e8f0;padding-top:8px}.news-comment{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:start;font-size:13px;padding:6px 0}.news-comment small{font-size:10px;color:#64748b}.reply-form{display:flex;gap:7px;margin-top:10px}.reply-form input[name="message"]{flex:1;min-width:0}.activity-desc{font-weight:400;color:#475569;margin-left:5px}.activity-item{align-items:center}

/* v4.17 */
.order-patient{font-size:21px;letter-spacing:.1px}.order-practice{margin-top:6px;font-size:14px}.order-number{margin-top:7px;font-size:13px;color:#64748b}

/* v4.18 */
.order-number{font-size:12px}.order-number strong{font-size:13px}.activity-desc{font-size:13px}

/* v4.19 – Auftragsnummer bewusst unauffällig */
.order-card .order-number,
.order-card .order-number strong{font-size:13px !important;font-weight:400 !important;letter-spacing:0 !important;color:#64748b !important}
.order-card .order-number strong{font-weight:600 !important}

/* v4.23 – native digital reproduction of the laboratory order sheet */
.digital-sheet{background:#fff;color:#111;border:1px solid #b8c0c9;padding:22px;max-width:1100px;margin:auto;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.2;box-shadow:0 8px 30px rgba(15,23,42,.08)}
.digital-sheet input,.digital-sheet textarea{font:inherit;color:#111;border:1px solid #c8ced5;border-radius:3px;background:#fff;box-sizing:border-box;min-width:0}
.digital-sheet input{height:28px;padding:3px 6px}.digital-sheet input[type=checkbox]{width:18px;height:18px;accent-color:#0f766e;padding:0;vertical-align:middle}
.ds-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;border-bottom:1px solid #555;padding:0 0 13px;margin-bottom:14px}.ds-title{font-size:28px;font-weight:800;letter-spacing:-.5px}.ds-title span{font-size:16px;font-weight:400;margin-left:8px}.ds-head-right{width:285px;border:1px solid #777;border-radius:5px;padding:8px 10px;display:grid;gap:7px}.ds-head-right label{display:grid;grid-template-columns:105px 1fr;align-items:center;font-weight:700}.ds-head-right input{height:24px;border:0;border-bottom:1px solid #777;border-radius:0}
.ds-table,.ds-box{border:1px solid #aeb6bf}.ds-row{display:grid}.ds-cols4{grid-template-columns:1.25fr 1fr 1.8fr 2.2fr}.ds-row>div{min-height:38px;padding:8px;border-right:1px solid #b8bec6;border-bottom:1px solid #b8bec6;display:flex;align-items:center}.ds-row>div:last-child{border-right:0}.ds-row:last-child>div{border-bottom:0}.ds-header{background:#f1f3f5;font-weight:700;text-align:center}.ds-header>div{justify-content:center}.ds-row input{width:100%;border:0;border-bottom:1px solid #9aa2aa;border-radius:0}
.ds-inline-2{display:grid;grid-template-columns:1fr 45px 1fr 45px;gap:6px;align-items:center;padding:15px 90px}.ds-inline-2 label{display:flex;align-items:center;justify-content:flex-end;gap:8px;font-weight:600}.ds-inline-2 label input[type=text]{max-width:145px}.ds-inline-2 label:nth-child(2),.ds-inline-2 label:nth-child(4){justify-content:center}
.ds-box{margin-top:12px}.ds-material-row{display:grid;grid-template-columns:140px 140px 35px 1fr;align-items:center;min-height:39px;border-bottom:1px solid #c2c7cd;padding:0 10px;gap:7px}.ds-material-row:last-child{border-bottom:0}.ds-material-row input:not([type=checkbox]){border:0;border-bottom:1px solid #9aa2aa;border-radius:0}.ds-zircon{display:grid;grid-template-columns:140px repeat(3,1fr);gap:8px;align-items:center;padding:11px 10px;border-bottom:1px solid #c2c7cd}.ds-zircon b{grid-row:1/3}.ds-zircon label{display:flex;justify-content:center;align-items:center;gap:7px}.ds-zircon>input:not([type=checkbox]){border:0;border-bottom:1px solid #9aa2aa;border-radius:0}
.ds-mini-grid{display:grid;grid-template-columns:140px 1fr 1fr 1fr 1.3fr}.ds-mini-grid>*{padding:8px;border-right:1px solid #c2c7cd;border-bottom:1px solid #c2c7cd;min-height:38px;display:flex;align-items:center;gap:6px}.ds-mini-grid>*:nth-last-child(-n+5){border-bottom:0}.ds-mini-grid .wide{width:100%;border:0;border-bottom:1px solid #9aa2aa;border-radius:0}
.ds-art-grid{display:grid;grid-template-columns:1.25fr .75fr .85fr 1fr 1fr}.ds-col{border-right:1px solid #c2c7cd;padding:8px}.ds-col:last-child{border-right:0}.ds-col>b{display:block;text-align:center;background:#f1f3f5;margin:-8px -8px 7px;padding:7px}.ds-col label{display:flex;align-items:center;justify-content:space-between;min-height:36px;gap:6px}.ds-col label input:not([type=checkbox]){width:60%}.ds-col>input:not([type=checkbox]){width:100%;margin:4px 0}.ds-bottom-line{display:grid;grid-template-columns:220px 1fr;gap:20px;padding:8px;border-top:1px solid #c2c7cd}.ds-bottom-line label{display:flex;align-items:center;gap:8px}.ds-bottom-line label:last-child input{flex:1}
.ds-lower{display:grid;grid-template-columns:1.7fr 1fr;gap:10px;margin-top:12px}.ds-services{margin-top:0}.ds-service-head,.ds-service-row{display:grid;grid-template-columns:1.7fr .65fr .8fr}.ds-service-head>*{background:#f1f3f5;padding:8px;text-align:center;border-right:1px solid #c2c7cd}.ds-service-row>*{padding:5px 8px;border-right:1px solid #c2c7cd;border-bottom:1px solid #d0d4d8}.ds-service-row input{border:0;border-bottom:1px solid #9aa2aa;border-radius:0;width:100%}.ds-lot{display:flex;gap:8px;padding:8px;align-items:center}.ds-lot input{flex:1;border:0;border-bottom:1px solid #9aa2aa;border-radius:0}.ds-options{margin-top:0;display:grid;grid-template-columns:1fr 1fr;padding-bottom:8px}.ds-options>b{grid-column:1/-1;background:#f1f3f5;padding:8px;text-align:center;border-bottom:1px solid #c2c7cd}.ds-options label{padding:7px 14px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e0e3e6}.ds-notes{padding:10px;margin-top:12px}.ds-notes textarea{display:block;width:100%;height:115px;margin-top:8px;border:0;border-bottom:1px solid #b8bec6;resize:vertical;line-height:2;background:repeating-linear-gradient(to bottom,#fff 0,#fff 31px,#cfd4da 32px,#fff 33px)}
.ds-footer{display:grid;grid-template-columns:1fr 1fr 1fr;gap:24px;margin-top:22px}.ds-footer label{display:flex;align-items:center;gap:7px}.ds-footer input{flex:1;border:0;border-bottom:1px solid #777;border-radius:0}
@media(max-width:800px){.digital-sheet{min-width:760px}.sheet-stage{overflow:auto}.ds-title{font-size:21px}.ds-head-right{width:235px}.ds-inline-2{padding:12px 30px}.ds-lower{grid-template-columns:1.5fr 1fr}}

.newest-orders{margin-bottom:34px}.newest-orders .order-card{min-height:0}.order-patient{font-size:20px}.order-number{margin-top:10px;color:#64748b;font-size:14px}.order-number strong{font-size:14px;color:#334155}.order-practice{margin-top:5px}

/* v4.26 */
.info-create-form{display:grid;grid-template-columns:1.1fr 2fr .8fr auto;gap:8px;align-items:end;margin:10px 0 14px;padding:10px;border:1px solid #dbe3eb;border-radius:10px;background:#f8fafc}.info-create-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600}.info-create-form textarea{resize:vertical}.info-create-form input,.info-create-form textarea,.info-create-form select{width:100%}
@media(max-width:800px){.info-create-form{grid-template-columns:1fr}.info-create-form button{width:100%}}

/* v4.28 – Rohling-Lagerbestand */
.rohling-stats{margin-bottom:20px}.rohling-section{margin-bottom:18px}.rohling-section .section-head{margin-bottom:10px}.rohling-section h2{margin:0}.rohling-two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}.rohling-table-wrap{overflow-x:auto}.rohling-table{width:100%;border-collapse:collapse;min-width:520px;background:#fff}.rohling-table th,.rohling-table td{border:1px solid #cbd5e1;padding:7px;text-align:center}.rohling-table thead th{background:#f1f5f9;font-weight:800}.rohling-table tbody th{background:#f8fafc;text-align:left;font-weight:800;white-space:nowrap}.rohling-table td{min-width:120px}.rohling-table .empty-cell{color:#94a3b8;background:#f8fafc}.qty-control{display:grid;grid-template-columns:30px minmax(46px,1fr) 30px;gap:4px;align-items:center}.qty-control button{height:32px;border:1px solid #cbd5e1;background:#f8fafc;border-radius:7px;font-size:20px;line-height:1;cursor:pointer}.qty-control button:hover{background:#e2e8f0}.qty-control input{width:100%;height:32px;text-align:center;font-weight:800;border:1px solid #cbd5e1;border-radius:7px;box-sizing:border-box}.rohling-save{justify-content:flex-start;margin-bottom:20px}.rohling-save .save-main{min-width:210px}@media(max-width:800px){.rohling-two-col{grid-template-columns:1fr}.rohling-table{min-width:470px}.rohling-table td{min-width:105px}.qty-control{grid-template-columns:28px minmax(44px,1fr) 28px}}@media(max-width:560px){.rohling-table{min-width:430px}.rohling-table th,.rohling-table td{padding:5px}.rohling-save{align-items:flex-start;flex-direction:column}.rohling-save .save-main{width:100%}}


/* v4.29 – editable inventory group names */
.rohling-name-edit{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:.9rem;font-weight:600}.rohling-name-edit input{max-width:260px;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font:inherit;font-weight:500}.rohling-name-edit input:focus{outline:2px solid rgba(37,99,235,.18);border-color:#2563eb}


/* v4.30 – Aufträge an Home-Dashboard angleichen */
.auftraege-page .home-stats{margin-top:0}
.auftraege-page .section-head{margin-top:0}
.auftraege-page .newest-orders{margin-top:18px}
.auftraege-page .filters{margin-top:0}
.auftraege-page .orders:not(.newest-orders){margin-top:18px}


/* v4.31 – Letzte Auftragsaktivität ein-/ausklappbar */
.activity-panel{padding:0;overflow:hidden}
.activity-toggle{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px;cursor:pointer;user-select:none}
.activity-toggle::-webkit-details-marker{display:none}
.activity-toggle::marker{display:none}
.activity-toggle:hover{background:#f8fafc}
.activity-toggle-hint{font-size:12px;color:#64748b;font-weight:600;white-space:nowrap}
.activity-chevron{display:inline-block;margin-left:4px;font-size:16px;transition:transform .18s ease}
.activity-panel[open] .activity-chevron{transform:rotate(180deg)}
.activity-list{padding:0 18px 8px}
.activity-list .activity-item:first-child{border-top:1px solid #e2e8f0}
@media(max-width:650px){.activity-toggle{padding:15px}.activity-toggle-hint{font-size:11px}.activity-list{padding:0 15px 6px}}

/* v4.32 – Auftragskarten auf der Aufträge-Seite identisch zur Home-Seite */
.auftraege-page .orders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.auftraege-page .order-card{position:relative;display:block;padding:20px 22px;border:1px solid #dbe4ee;border-radius:18px;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 5px 18px rgba(15,23,42,.05);text-decoration:none!important;transition:transform .15s,box-shadow .15s,border-color .15s;line-height:1.8}
.auftraege-page .order-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(15,23,42,.09);border-color:#99f6e4}
.auftraege-page .order-card>div:first-child{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.auftraege-page .order-card .order-patient{font-size:20px;letter-spacing:.1px}
.auftraege-page .order-card .pill{margin-left:8px;font-size:11px;border-radius:999px;padding:4px 9px}
.auftraege-page .order-card .order-practice{margin-top:5px;font-size:14px}
.auftraege-page .order-card .order-number{margin-top:7px;font-size:13px;color:#64748b}
.auftraege-page .order-card .order-number strong{font-size:13px;font-weight:600;color:#64748b}
.auftraege-page .order-card .meta{margin-top:11px;display:flex;flex-wrap:wrap;gap:8px;color:#64748b;font-size:13px}
.auftraege-page .order-card .creator{display:inline-flex;align-items:center;gap:5px;margin-top:10px;font-size:13px;color:#475569;font-weight:700}
@media(max-width:800px){.auftraege-page .orders{grid-template-columns:1fr}.auftraege-page .order-card{padding:16px}.auftraege-page .order-card .order-patient{font-size:18px}}
/* v4.33 – vollständige Aktivitätsübersicht */
.activity-panel .activity-list{padding:0}
.activity-history{padding:0;overflow:hidden}
.activity-history-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:center;padding:15px 18px;border-bottom:1px solid #e2e8f0;text-decoration:none;color:inherit}
.activity-history-item:last-child{border-bottom:0}
.activity-history-item:hover{background:#f8fafc}
.activity-history-icon{width:38px;height:38px;border-radius:10px;background:#f1f5f9;display:grid;place-items:center;font-size:18px}
.activity-history-main{min-width:0}.activity-order-no{font-size:11px;margin-left:9px}.activity-history-desc{margin-top:3px;color:#334155}.activity-history-meta{font-size:12px;margin-top:4px}
@media(max-width:650px){.activity-history-item{grid-template-columns:36px minmax(0,1fr);padding:13px}.activity-history-icon{width:34px;height:34px}.activity-history-item>.pill{grid-column:2;justify-self:start}.activity-order-no{display:block;margin:2px 0 0}}

/* v4.34 – Auftragsfotos vergrößern */
.photo-preview{display:block;width:100%;padding:0;border:0;border-radius:0;background:transparent;overflow:hidden;cursor:zoom-in}
.photo-preview img{transition:transform .18s ease;cursor:zoom-in}
.photo-preview:hover img{transform:scale(1.03)}
.photo-lightbox{position:fixed;inset:0;z-index:9999;background:rgba(15,23,42,.88);display:flex;align-items:center;justify-content:center;padding:45px 60px}
.photo-lightbox.hidden{display:none}
.photo-lightbox-content{max-width:min(82vw,1100px);max-height:82vh;display:flex;flex-direction:column;align-items:center;gap:10px}
.photo-lightbox-content img{display:block;max-width:82vw;max-height:74vh;width:auto;height:auto;object-fit:contain;border-radius:10px;box-shadow:0 20px 70px rgba(0,0,0,.45)}
.photo-lightbox-title{color:#fff;font-size:14px;text-align:center}
.photo-lightbox-close,.photo-lightbox-nav{position:absolute;border:0;background:rgba(255,255,255,.14);color:#fff;display:grid;place-items:center;cursor:pointer;line-height:1}
.photo-lightbox-close{top:18px;right:22px;width:44px;height:44px;border-radius:50%;font-size:32px;font-weight:400}
.photo-lightbox-nav{top:50%;transform:translateY(-50%);width:48px;height:64px;border-radius:12px;font-size:42px;font-weight:300}
.photo-lightbox-prev{left:18px}.photo-lightbox-next{right:18px}
.photo-lightbox-close:hover,.photo-lightbox-nav:hover{background:rgba(255,255,255,.24)}
.photo-lightbox-open{overflow:hidden}
@media(max-width:700px){.gallery{grid-template-columns:repeat(2,minmax(0,1fr));}.gallery img{width:100%;height:120px}.photo-lightbox{padding:55px 12px}.photo-lightbox-content img{max-width:90vw;max-height:72vh}.photo-lightbox-nav{width:40px;height:52px;font-size:34px}.photo-lightbox-prev{left:7px}.photo-lightbox-next{right:7px}.photo-lightbox-close{right:10px}}


/* v4.38 – separate order image viewer + polished buttons */
.button,button{ text-decoration:none; transition:transform .14s ease, box-shadow .14s ease, background-color .14s ease, border-color .14s ease; }
.button{ box-shadow:0 2px 8px rgba(15,23,42,.06); }
.button:hover,button:hover{ transform:translateY(-1px); box-shadow:0 5px 14px rgba(15,23,42,.10); }
.button:active,button:active{ transform:translateY(0); box-shadow:0 2px 6px rgba(15,23,42,.07); }
.button.primary,button.primary{ background:linear-gradient(135deg,#0f766e,#0d9488); color:#fff; }
.button.secondary,button.secondary{ background:#eef2f7; color:#172033; border:1px solid #dbe3ec; }
.button.secondary:hover,button.secondary:hover{ background:#e2e8f0; }
.button.danger,button.danger{ background:#fff1f2; color:#be123c; border:1px solid #fecdd3; }
.button.danger:hover,button.danger:hover{ background:#ffe4e6; }
.button.small,button.small{ padding:8px 11px; border-radius:9px; font-size:12px; }
.image-page-head{align-items:center}
.image-viewer-card{padding:14px}
.image-viewer-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.image-counter{font-size:13px;font-weight:800;color:#64748b}
.image-nav{min-width:115px;text-align:center}
.image-viewer-stage{min-height:420px;height:min(72vh,760px);display:flex;align-items:center;justify-content:center;background:#0f172a;border-radius:14px;overflow:hidden;padding:18px}
.image-viewer-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:8px;box-shadow:0 14px 45px rgba(0,0,0,.28)}
.image-viewer-caption{display:flex;justify-content:space-between;gap:15px;padding:11px 4px 2px;font-size:13px;color:#64748b}
.image-viewer-caption strong{color:#172033}
.image-thumbs{display:flex;gap:10px;overflow-x:auto;margin-top:12px;padding:2px 2px 8px}
.image-thumb{flex:0 0 100px;text-decoration:none;color:#475569;background:#fff;border:1px solid #dbe2ea;border-radius:10px;overflow:hidden;padding:0 0 7px;box-shadow:0 2px 8px rgba(15,23,42,.04)}
.image-thumb.active{border:2px solid #0f766e;padding-bottom:6px}
.image-thumb img{display:block;width:100px;height:72px;object-fit:cover}
.image-thumb span{display:block;padding:5px 6px 0;font-size:11px;font-weight:700;text-align:center}
.photo-preview{display:block;text-decoration:none}
.photo-preview img{display:block}
@media(max-width:650px){.image-page-head{align-items:flex-start}.image-page-head .button{width:100%;text-align:center}.image-viewer-toolbar{gap:7px}.image-nav{min-width:0;flex:1;padding:9px 8px}.image-viewer-stage{height:65vh;min-height:300px;padding:10px}.image-viewer-caption{flex-direction:column;gap:3px}}

/* v4.39 – image original-size option + consistent dashboard actions */
.image-viewer-actions{display:flex;align-items:center;gap:8px}
.image-viewer-stage.original-size{justify-content:flex-start;align-items:flex-start;overflow:auto}
.image-viewer-stage.original-size img{max-width:none;max-height:none;width:auto;height:auto;box-shadow:none}
.image-viewer-actions .image-nav{min-width:105px}
.dashboard-head .new-order,.section-head .button,.info-panel .button{box-shadow:0 3px 10px rgba(15,23,42,.07)}
.dashboard-head .new-order:hover,.section-head .button:hover,.info-panel .button:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.11)}
@media(max-width:650px){.image-viewer-actions{flex:1;justify-content:flex-end}.image-viewer-actions .image-nav{min-width:0}.image-viewer-toolbar{flex-wrap:wrap}.image-counter{order:-1;width:100%;text-align:center}.image-viewer-stage.original-size{align-items:flex-start}}


/* v4.41 – Informationen bearbeiten/löschen */
.news-item-top{display:flex;align-items:center;justify-content:space-between;gap:14px}.news-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.info-edit-form{margin-top:14px;padding:14px;border:1px solid #dbe3ef;border-radius:14px;background:#fff;display:grid;gap:10px}.info-edit-form input,.info-edit-form textarea,.info-edit-form select{width:100%;box-sizing:border-box}.button.danger{background:#fff0f0;color:#a51d2d;border:1px solid #f0caca}.button.danger:hover{background:#ffe2e2}@media(max-width:700px){.news-item-top{align-items:flex-start;flex-direction:column}.news-actions{width:100%}}

/* v4.43: Fertige Arbeiten direkt unter Aufträge, ein-/ausklappbar */
.collapsible-section{margin-top:18px;padding:0;overflow:hidden}.collapsible-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 18px;cursor:pointer;user-select:none}.collapsible-head h2{margin:0 0 3px}.collapse-chevron{font-size:22px;line-height:1;transition:transform .18s ease}.collapsible-body{padding:0 18px 18px}.collapsible-section.collapsed .collapsible-body{display:none}.collapsible-section.collapsed .collapse-chevron{transform:rotate(-90deg)}.finished-inline-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.section-actions{margin-top:14px;display:flex;justify-content:flex-end}.gallery .photo-preview{display:block;width:180px;height:135px;overflow:hidden;background:#f1f5f9}.gallery .photo-preview img{display:block!important;width:180px!important;height:135px!important;max-width:180px!important;max-height:135px!important;object-fit:cover!important}.gallery figure{max-width:180px}.gallery figcaption{max-width:180px;overflow:hidden;word-break:break-word}@media(max-width:800px){.finished-inline-grid{grid-template-columns:1fr}}@media(max-width:700px){.gallery .photo-preview,.gallery .photo-preview img{width:100%!important;max-width:100%!important;height:120px!important;max-height:120px!important}.gallery figure{max-width:none}}

/* v4.44 – Aufträge mit Hover-Untermenü für Fertige Arbeiten */
.nav-dropdown{position:relative;display:flex;align-items:stretch}
.nav-dropdown>.nav-tab{display:flex;align-items:center}
.nav-dropdown-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:210px;padding:7px;background:#fff;border:1px solid #dbe2ea;border-radius:12px;box-shadow:0 14px 32px rgba(15,23,42,.14);display:none;z-index:1000}
.nav-dropdown-menu a{display:block;padding:10px 12px;border-radius:8px;color:#172033;text-decoration:none;font-weight:700;white-space:nowrap}
.nav-dropdown-menu a:hover{background:#f1f5f9}
.nav-dropdown:hover .nav-dropdown-menu,.nav-dropdown:focus-within .nav-dropdown-menu{display:block}
@media(max-width:700px){.nav-dropdown-menu{position:static;display:none;box-shadow:none;margin:4px 0 0 8px}.nav-dropdown:hover .nav-dropdown-menu{display:none}.nav-dropdown:focus-within .nav-dropdown-menu{display:block}.nav-dropdown{display:block}.nav-dropdown>.nav-tab{width:100%}}
/* Bilder bleiben in der Auftragsseite kompakt; Originalgröße gibt es nur im Bildbetrachter. */
.photo-preview{display:block;max-width:180px;width:180px;height:135px;overflow:hidden;border-radius:10px}
.photo-preview img{display:block;width:100%;height:100%;object-fit:cover}

/* v4.46 – stabile Desktop-Navigation und saubere Auftragsfelder */
@media(min-width:761px){
  header{padding-left:max(18px,calc((100% - 1400px)/2));padding-right:max(18px,calc((100% - 1400px)/2));}
  header .main-nav{flex:1;flex-wrap:nowrap;justify-content:flex-start;min-width:0;gap:2px;}
  .nav-tab{padding:9px 11px;}
  .nav-dropdown{position:relative;flex:0 0 auto;}
  .nav-dropdown-menu{top:100%;left:0;margin-top:4px;display:none!important;}
  .nav-dropdown:hover .nav-dropdown-menu,.nav-dropdown:focus-within .nav-dropdown-menu{display:block!important;}
}
.field-grid>label{display:flex;flex-direction:column;min-width:0;}
.field-grid>label>input,.field-grid>label>select{margin-top:6px;}
@media(max-width:650px){.field-grid>label{min-height:0;}}

/* v4.47 – Desktop-Navigation wirklich einzeilig + Auftragsfelder exakt ausrichten */
@media(min-width:761px){
  header{display:flex!important;align-items:center!important;gap:18px!important;}
  header .brand{flex:0 0 145px!important;min-width:145px!important;}
  header .main-nav{flex:1 1 auto!important;min-width:0!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:1px!important;white-space:nowrap!important;}
  header .main-nav > *{flex:0 0 auto!important;}
  header .nav-tab{font-size:13px!important;padding:8px 9px!important;}
  header .nav-user{font-size:13px!important;margin-left:8px!important;padding-left:8px!important;}
  header .nav-logout{font-size:13px!important;margin-left:3px!important;}
}
/* Beide Felder einer Zeile schließen unten bündig ab – auch bei zweizeiligen Labels. */
.field-grid>label{align-self:stretch!important;}
.field-grid>label>input,
.field-grid>label>select,
.field-grid>label>textarea{margin-top:auto!important;}

/* v4.48 – finale Desktop-Navigation ohne Umbruch + bündige Auftragsfelder */
@media(min-width:761px){
  header{padding-left:18px!important;padding-right:18px!important;gap:12px!important;}
  header .brand{flex:0 0 125px!important;min-width:125px!important;font-size:19px!important;}
  header .main-nav{gap:0!important;flex-wrap:nowrap!important;white-space:nowrap!important;align-items:center!important;min-width:0!important;}
  header .nav-tab{font-size:12px!important;padding:7px 7px!important;}
  header .nav-user{font-size:12px!important;margin-left:6px!important;padding-left:6px!important;white-space:nowrap!important;}
  header .nav-logout{font-size:12px!important;margin-left:3px!important;white-space:nowrap!important;}
  .nav-dropdown-menu{top:100%!important;left:0!important;margin-top:4px!important;}
}
@media(min-width:761px){
  .field-grid>label{min-height:68px!important;justify-content:flex-start!important;}
  .field-grid>label>input,.field-grid>label>select{margin-top:auto!important;}
}

/* v4.49 – stabiler Header: Navigation und Konto sind getrennte Bereiche */
@media(min-width:761px){
header{display:grid!important;grid-template-columns:150px minmax(0,1fr) auto!important;align-items:center!important;column-gap:16px!important;padding:14px 28px!important;min-height:72px!important;}
header .brand{grid-column:1!important;white-space:nowrap!important;font-size:20px!important;line-height:1.15!important;}
header .main-nav{grid-column:2!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:1px!important;min-width:0!important;white-space:nowrap!important;}
header .main-nav>*{flex:0 0 auto!important;}
header .main-nav .nav-tab{font-size:13px!important;padding:8px 8px!important;}
.header-account{grid-column:3!important;display:flex!important;align-items:center!important;gap:9px!important;white-space:nowrap!important;}
.header-account .nav-tab{font-size:13px!important;padding:8px 8px!important;}
.header-account .nav-user{margin:0!important;padding:0 0 0 9px!important;border-left:1px solid rgba(255,255,255,.18)!important;font-size:13px!important;white-space:nowrap!important;}
.header-account .nav-logout{margin:0!important;font-size:13px!important;white-space:nowrap!important;}
}
@media(max-width:760px){
header{display:flex!important;flex-wrap:wrap!important;align-items:center!important;}
header .main-nav{order:2!important;width:100%!important;display:flex!important;flex-wrap:wrap!important;}
.header-account{order:3!important;width:100%!important;display:flex!important;align-items:center!important;gap:10px!important;margin-top:4px!important;}
}
/* Auftragsfelder: alle Beschriftungen bekommen dieselbe Höhe */
.field-grid>label{display:grid!important;grid-template-rows:42px auto!important;align-content:start!important;min-height:0!important;margin:10px 0!important;}
.field-grid>label .field-label{display:block!important;line-height:1.35!important;}
.field-grid>label>input,.field-grid>label>select{margin-top:6px!important;}
@media(max-width:650px){.field-grid>label{grid-template-rows:auto auto!important;}}

/* v4.51 – Letzte Auftragsaktivität: kein Überlaufen, saubere Spalten */
.activity-panel .activity-list{width:100%;min-width:0;box-sizing:border-box;}
.activity-panel .activity-item{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 178px!important;
  align-items:center!important;
  gap:12px!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
.activity-panel .activity-item>span:first-child{
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}
.activity-panel .activity-desc{
  display:inline!important;
  margin-left:6px!important;
  font-weight:400!important;
  color:#475569!important;
}
.activity-panel .activity-item>span:last-child{
  display:block!important;
  width:178px!important;
  min-width:0!important;
  max-width:178px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  text-align:right!important;
  justify-self:end!important;
}
@media(max-width:700px){
  .activity-panel .activity-item{
    grid-template-columns:minmax(0,1fr)!important;
    gap:4px!important;
    align-items:start!important;
  }
  .activity-panel .activity-item>span:last-child{
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    white-space:normal!important;
    text-align:left!important;
    justify-self:start!important;
  }
}

/* v4.53 – Aktivitätsbox sauber innerhalb der Karte ausrichten */
.activity-panel .activity-list{
  padding:0 18px 0!important;
  margin:0!important;
  width:auto!important;
  box-sizing:border-box!important;
}
.activity-panel .activity-item{
  grid-template-columns:minmax(0,1fr) 168px!important;
  gap:18px!important;
  padding:13px 0!important;
  min-height:52px!important;
  align-items:center!important;
  overflow:hidden!important;
}
.activity-panel .activity-item>span:first-child{
  min-width:0!important;
  line-height:1.35!important;
}
.activity-panel .activity-desc{
  white-space:normal!important;
}
.activity-panel .activity-item>span:last-child{
  width:168px!important;
  max-width:168px!important;
  text-align:right!important;
  white-space:normal!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}
.activity-panel > div:last-child{
  margin-top:0!important;
  padding:10px 18px 14px!important;
  box-sizing:border-box!important;
}
@media(max-width:700px){
  .activity-panel .activity-list{padding:0 15px!important}
  .activity-panel .activity-item{grid-template-columns:minmax(0,1fr)!important;gap:4px!important}
  .activity-panel .activity-item>span:last-child{width:auto!important;max-width:100%!important;text-align:left!important}
  .activity-panel > div:last-child{padding:8px 15px 12px!important}
}

/* v4.54 – Letzte Auftragsaktivität im Stil des Informationsbereichs */
.activity-panel .activity-list{
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  margin:8px 0 0!important;
  padding:0!important;
}
.activity-panel .activity-item{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:18px!important;
  width:100%!important;
  min-height:64px!important;
  padding:12px 14px!important;
  margin:0!important;
  box-sizing:border-box!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  color:inherit!important;
  text-decoration:none!important;
  overflow:hidden!important;
}
.activity-panel .activity-item + .activity-item{margin-top:8px!important;}
.activity-panel .activity-item:hover{background:#f1f5f9!important;}
.activity-panel .activity-item>span:first-child{
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}
.activity-panel .activity-item>span:first-child strong{
  display:inline!important;
  margin-right:6px!important;
}
.activity-panel .activity-desc{
  display:inline!important;
  margin-left:0!important;
  font-weight:400!important;
  color:#475569!important;
}
.activity-panel .activity-item>span:last-child{
  display:block!important;
  width:auto!important;
  min-width:145px!important;
  max-width:210px!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  text-align:right!important;
  justify-self:end!important;
  line-height:1.35!important;
}
.activity-panel > div:last-child{
  margin-top:12px!important;
}
@media(max-width:700px){
  .activity-panel .activity-item{
    grid-template-columns:minmax(0,1fr)!important;
    gap:5px!important;
    min-height:0!important;
    padding:11px 12px!important;
  }
  .activity-panel .activity-item>span:last-child{
    min-width:0!important;
    max-width:100%!important;
    white-space:normal!important;
    text-align:left!important;
    justify-self:start!important;
  }
}


/* v4.55 – Aktivitätskarten sauber und luftig, besonders auf iPhone */
.activity-panel .activity-list{
  padding:0 12px 4px!important;
  margin:10px 0 0!important;
  gap:9px!important;
}
.activity-panel .activity-item{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  gap:5px!important;
  min-height:0!important;
  padding:13px 14px!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  overflow:hidden!important;
}
.activity-panel .activity-item>span:first-child{
  min-width:0!important;
  width:100%!important;
  line-height:1.4!important;
  overflow-wrap:anywhere!important;
  font-size:14px!important;
}
.activity-panel .activity-item>span:first-child strong{
  font-size:16px!important;
  line-height:1.3!important;
  margin-right:7px!important;
}
.activity-panel .activity-desc{
  font-size:14px!important;
  margin:0!important;
  color:#475569!important;
}
.activity-panel .activity-item>span:last-child{
  grid-column:1!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  text-align:left!important;
  justify-self:stretch!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:12px!important;
  line-height:1.35!important;
  color:#64748b!important;
}
.activity-panel > div:last-child{
  margin-top:12px!important;
  padding:0 12px 12px!important;
}
@media(min-width:701px){
  .activity-panel .activity-list{padding:0 14px 4px!important;}
  .activity-panel .activity-item{grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto!important;align-items:center!important;}
  .activity-panel .activity-item>span:last-child{grid-column:2!important;width:auto!important;min-width:0!important;text-align:right!important;white-space:nowrap!important;font-size:12px!important;}
  .activity-panel > div:last-child{padding:0 14px 12px!important;}
}

/* v4.56 – Aktivitätsbereich wie Informationen mit sauberem Innenabstand */
.activity-panel{
  padding:18px!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}
.activity-panel .info-panel-head{
  margin:0 0 12px!important;
  padding:0!important;
}
.activity-panel .activity-list{
  margin:0!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  width:100%!important;
  box-sizing:border-box!important;
}
.activity-panel .activity-item{
  width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:12px 14px!important;
  border:1px solid #dbe3ec!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  overflow:hidden!important;
}
.activity-panel > div:last-child{
  margin:12px 0 0!important;
  padding:0!important;
}
@media(max-width:700px){
  .activity-panel{padding:16px!important;}
  .activity-panel .activity-list{gap:9px!important;}
  .activity-panel .activity-item{padding:12px 13px!important;}
}


/* v4.57 – Auftragszettel direkt bei Auftragsdaten */
.section-heading-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;}
.section-heading-row h2{margin:0;}
.sheet-open-button{white-space:nowrap;}
@media(max-width:760px){.section-heading-row{align-items:flex-start;flex-direction:column;gap:10px;}.sheet-open-button{width:100%;text-align:center;box-sizing:border-box;}}


/* v4.58 – mehrere Fotos für die Kalibrierung */
.cal-shots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.cal-shot{border:1px solid #dbe2ea;border-radius:12px;padding:10px;background:#f8fafc}.cal-shot-title{font-weight:800;font-size:13px;margin-bottom:8px}.cal-shot .canvas-wrap{min-height:180px}.cal-shot canvas{max-width:100%;height:auto;cursor:crosshair}.cal-shot-info{padding:7px 2px 0}.cal-average{margin-top:14px;padding:11px 13px;border-radius:10px;background:#ecfeff;border:1px solid #bae6fd;font-weight:700}@media(max-width:800px){.cal-shots{grid-template-columns:1fr}}
