:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#192c36;background:#f3f6f7;font-size:15px}*{box-sizing:border-box}body{margin:0}header{background:white;border-bottom:1px solid #dce4e7;padding:20px 5%;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{font-weight:800;font-size:24px;color:#11746b;text-decoration:none}.brand span{font-size:15px;color:#30434b;margin-left:18px}.header-actions{display:flex;align-items:center;gap:12px}.header-actions form{margin:0}.header-link{color:#335968;text-decoration:none;font-weight:600;padding:10px 4px}main{max-width:1440px;margin:auto;padding:42px 5%}h1{font-size:40px;letter-spacing:-1.5px;margin:8px 0}h2{font-size:19px;margin:0 0 14px}h3{font-size:14px;margin:26px 0 12px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:700;color:#137a70}.intro,.hint,footer{color:#61737c}.intro{margin-bottom:30px}section{background:white;border:1px solid #dce4e7;border-radius:12px;padding:24px;margin-bottom:20px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.metrics span{display:block;color:#61737c}.metrics strong{display:block;font-size:34px;margin-top:12px}small{font-size:12px;font-weight:400;color:#61737c}td small{display:block;margin-top:7px}.filters,.confirm{display:flex;align-items:end;gap:16px;flex-wrap:wrap}.filters{margin:12px 0 8px}.live-filters{justify-content:space-between}.filter-count{color:#61737c;font-size:13px;font-weight:600;padding-bottom:13px}label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600}input:not([type=checkbox]),select{padding:12px;border:1px solid #bcccd1;border-radius:7px;font:inherit;background:white;min-width:220px}input[type=checkbox]{width:18px;height:18px;accent-color:#11746b}button{border:0;border-radius:7px;background:#11746b;color:white;padding:13px 20px;font:inherit;font-weight:600;cursor:pointer}button:hover{filter:brightness(.92)}.secondary{background:#e8eff1;color:#263f4a}.customer{padding:0;overflow:hidden}.customer-title{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px}.customer-title h2{margin:0}.customer-title span,.confirm span{color:#61737c;font-size:12px}.scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left}th{background:#f8fafb;color:#61737c;font-size:11px;text-transform:uppercase;letter-spacing:.5px;padding:13px 20px}td{border-top:1px solid #e7edef;padding:17px 20px;font-size:13px}td a{color:#204c61;text-decoration:none;font-weight:600}.badge{background:#edf3f6;border-radius:20px;padding:5px 9px;white-space:nowrap;font-size:11px}.error,.success{padding:18px;border-radius:8px}.error{background:#fff0ed;color:#9b3020}.error a{color:inherit}.success{background:#eaf8f1;color:#236744}.login{max-width:380px;display:grid;gap:20px;background:white;padding:28px;border-radius:12px}.cancel{color:#335968;margin-left:15px}li{margin:10px 0}footer{font-size:12px;margin-top:30px}:focus-visible{outline:3px solid #c78b24;outline-offset:3px}.button{display:inline-block;border-radius:7px;background:#11746b;color:white;padding:13px 20px;text-decoration:none;font-weight:600}.button.secondary{background:#e8eff1;color:#263f4a}.project-card{display:flex;align-items:center;justify-content:space-between;gap:20px;border-left:5px solid var(--instance-color,#11746b);transition:opacity .15s ease,transform .15s ease,box-shadow .15s ease}.project-card.is-match{opacity:1;transform:translateY(-1px);box-shadow:0 8px 24px rgba(17,116,107,.08)}.project-card.is-dimmed{opacity:.28;transform:none;box-shadow:none}.project-card h2{margin:0}.project-info>span{color:#61737c}.project-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}.instance-badge,.test-badge{display:inline-flex;align-items:center;border-radius:20px;padding:5px 9px;white-space:nowrap;font-size:11px;font-weight:700}.instance-badge{background:var(--instance-bg,#e7f5f2);color:var(--instance-color,#11746b)}.test-badge{background:#fff4d8;color:#8b6514}.detail-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:14px 0 24px}.export-text{display:block;width:100%;resize:vertical;padding:18px;border:1px solid #bcccd1;border-radius:7px;background:#fafcfc;color:#192c36;font:14px/1.7 Consolas,monospace}.actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.check-label{display:flex;flex-direction:row;align-items:center;margin:20px 0;gap:10px}summary{cursor:pointer;font-size:18px;font-weight:600}details[open] summary{margin-bottom:20px}.search-empty{margin-top:20px}

.instance-teal{--instance-color:#11746b;--instance-bg:#e7f5f2}.instance-blue{--instance-color:#2e67a6;--instance-bg:#eaf2fb}.instance-orange{--instance-color:#bd641f;--instance-bg:#fff0e4}.instance-violet{--instance-color:#7652a8;--instance-bg:#f1ebfa}.instance-red{--instance-color:#a94646;--instance-bg:#faeaea}.instance-green{--instance-color:#397b4b;--instance-bg:#e9f5ec}.instance-slate{--instance-color:#5f6f78;--instance-bg:#edf1f3}.instance-gold{--instance-color:#9a7418;--instance-bg:#fff4d5}

.settings-form{max-width:1180px}.settings-card{border-top:5px solid var(--instance-color,#11746b)}.settings-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:20px}.settings-title-row h2{margin:8px 0 0}.toggle-label{flex-direction:row;align-items:center;gap:9px;padding-top:4px}.settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.settings-grid label{min-width:0}.settings-grid input,.settings-grid select{width:100%;min-width:0}.db-grid{grid-template-columns:1.4fr .6fr 1.2fr 1.2fr 1.4fr}.settings-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:22px}.connection-result{margin:0;font-size:13px}.connection-ok{color:#236744}.connection-error{color:#9b3020}.settings-save{margin-top:24px}code{background:#e9eff1;border-radius:4px;padding:2px 5px;font-size:.92em}

@media(max-width:980px){.settings-grid,.db-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){main{padding:25px 16px}.metrics{grid-template-columns:1fr;gap:0}.customer-title{align-items:start;flex-direction:column}h1{font-size:32px}.confirm{align-items:stretch;flex-direction:column}.filters label,.filters input,.filters select{width:100%}.header-actions{gap:6px}.header-link{display:none}.settings-grid,.db-grid{grid-template-columns:1fr}.settings-title-row{align-items:flex-start;flex-direction:column}.filter-count{padding:0}.live-filters{align-items:stretch;flex-direction:column}}
@media(max-width:600px){.project-card{align-items:stretch;flex-direction:column}.project-card .button{text-align:center}.brand span{display:none}}


.open-ticket-summary{display:flex;align-items:center;justify-content:space-between;gap:24px}.open-ticket-summary .metric-label{display:block;color:#61737c;font-size:12px}.open-ticket-summary strong{display:block;font-size:34px;margin-top:6px}.open-ticket-summary .hint{margin:0}.open-ticket-list{padding:0;overflow:hidden}.age-table td{transition:background-color .15s ease}.age-table tr.age-critical td{background:#f9e3e3}.age-table tr.age-old td{background:#fbeceb}.age-table tr.age-warning td{background:#fff1df}.age-table tr.age-watch td{background:#fff8df}.age-table tr.age-fresh td{background:#eaf6ed}.age-table tr:hover td{filter:brightness(.985)}.age-badge{display:inline-flex;align-items:center;border-radius:20px;padding:5px 9px;white-space:nowrap;font-size:11px;font-weight:700;background:rgba(255,255,255,.7)}.ticket-date{white-space:nowrap;font-weight:600}.age-table td strong{font-size:13px}.age-table .instance-badge{margin-right:5px}
@media(max-width:760px){.open-ticket-summary{align-items:flex-start;flex-direction:column}.age-table{min-width:880px}}

.header-link.active{color:#11746b;position:relative}.header-link.active:after{content:"";position:absolute;left:4px;right:4px;bottom:4px;height:2px;background:#11746b;border-radius:2px}.dashboard-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.dashboard-metrics small,.billing-metrics small{display:block;margin-top:7px}.dashboard-section{padding:0;overflow:hidden}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;border-bottom:1px solid #e7edef}.section-heading h2{margin:0 0 5px}.section-heading .hint{margin:0}.dashboard-table th,.dashboard-table td{white-space:nowrap}.dashboard-table td:first-child,.dashboard-table td:nth-child(3){white-space:normal}.money-cell{font-weight:700;white-space:nowrap}.table-action{text-align:right}.table-more{margin:0;padding:16px 24px;border-top:1px solid #e7edef;color:#61737c}.table-more a{color:#204c61;font-weight:600;text-decoration:none}.value-hint{margin:-8px 0 24px}.billing-metrics{margin-bottom:28px}.project-info>span strong{color:#192c36}.dashboard-section .instance-badge{margin-right:5px}
@media(max-width:1100px){.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.dashboard-metrics{grid-template-columns:1fr}.section-heading{align-items:flex-start;flex-direction:column}.dashboard-table{min-width:860px}}

.support-list{padding:0;overflow:hidden}.support-table{min-width:1160px}.support-table th,.support-table td{vertical-align:middle}.support-comment{white-space:normal;min-width:280px;max-width:560px}.support-action-cell{width:128px;white-space:nowrap}.inline-action-form{margin:0;display:inline-block}.support-done-button,.support-restore-button{padding:10px 14px;white-space:nowrap}.support-restore-button{font-size:12px}.marker-metric{font-size:24px!important}.empty-dashboard-message{padding:22px 24px;margin:0}.support-dashboard-table td:nth-child(3){white-space:normal;min-width:300px}.dashboard-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.support-archive-heading{margin:38px 0 0;background:#fff;border:1px solid #dce4e7;border-bottom:0;border-radius:12px 12px 0 0}.support-archive-heading .hint{margin:0}.archive-count{color:#61737c;font-size:13px;font-weight:600;white-space:nowrap}.support-archive-list{border-radius:0 0 12px 12px}.archive-table tbody tr{opacity:.78}.archive-table tbody tr:hover{opacity:1}
@media(max-width:1250px){.dashboard-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.dashboard-metrics{grid-template-columns:1fr}}

.support-search-row{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:20px 0 12px}.support-search-row label{flex:1;max-width:520px}.support-search-row input{width:100%;min-width:0}.support-archive-search-row{margin-top:12px}.archive-search-hint{margin:0;padding:18px 22px;color:#61737c;border-bottom:1px solid #e7edef;background:#fafcfc}.support-action-cell{width:150px;min-width:150px;text-align:right;position:sticky;right:0;background:#fff;z-index:2}.support-table th.support-action-cell,.support-table th.table-action{min-width:150px}.support-table th.table-action{position:sticky;right:0;background:#f8fafb;z-index:3}.support-table td.table-action{position:sticky;right:0;background:#fff;z-index:2}.archive-table tbody tr td.table-action{background:#fff}.support-done-button,.support-restore-button{min-width:112px}.support-restore-button{min-width:122px}.support-table{min-width:1080px}.support-table tr:hover td.table-action{filter:none}@media(max-width:760px){.support-search-row{align-items:stretch;flex-direction:column}.support-search-row label{max-width:none}.support-action-cell{min-width:132px;width:132px}}

/* Projektbezogene Abrechnungs-Stammdaten */
.support-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.project-settings-card{border-left:5px solid #11746b}.project-settings-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.project-settings-heading h2{margin-bottom:6px}.project-settings-heading .hint{margin:0}.project-settings-form{margin:0}.project-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.project-settings-grid label{min-width:0}.project-settings-grid input,.project-settings-grid select,.project-settings-grid textarea{width:100%;min-width:0}.project-settings-grid textarea{padding:12px;border:1px solid #bcccd1;border-radius:7px;font:inherit;background:white;resize:vertical}.project-settings-wide{grid-column:1/-1}.project-settings-footer{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-top:18px}.project-settings-footer .hint{margin:0}.project-settings-heading .button{white-space:nowrap}
@media(max-width:760px){.support-metrics,.project-settings-grid{grid-template-columns:1fr}.project-settings-wide{grid-column:auto}.project-settings-heading{flex-direction:column}.project-settings-heading .button{width:100%;text-align:center}}

/* Dynamische Verbindungsverwaltung */
.settings-card-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.remove-connection{background:#fff0ed;color:#9b3020;padding:10px 14px}.remove-connection:hover{background:#fbe2dd}.add-connection{margin-top:4px}.billing-archive-table{min-width:1120px}.billing-archive-table td:nth-child(4){white-space:normal;min-width:320px;max-width:560px}
@media(max-width:760px){.settings-card-controls{width:100%;justify-content:space-between}.add-connection{width:100%;text-align:center}}

/* Gemeinsamer Bereich Tickets & Supports verrechnen */
.combined-billing-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.billing-section-heading{padding:0;border:0;margin:34px 0 12px}.billing-section-heading h2{margin-bottom:5px}.support-project-heading{margin-top:42px}.support-project-card .badge{font-weight:700}.support-project-card{scroll-margin-top:20px}
@media(max-width:1100px){.combined-billing-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.combined-billing-metrics{grid-template-columns:1fr}.billing-section-heading{margin-top:28px}}

/* Performance / Datenstand */
.data-sync-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:-20px 0 18px;color:#61737c;font-size:12px}.compact-button{padding:8px 12px;font-size:12px}.compact-button:disabled{opacity:.55;cursor:wait}.archive-project{font-weight:700}.support-archive-list tbody:empty{display:table-row-group}
@media(max-width:760px){.data-sync-bar{margin:0 0 18px;justify-content:space-between;align-items:center;flex-wrap:wrap}}

.billing-dashboard-table{min-width:1100px}.billing-position-cell{white-space:normal!important;min-width:260px;max-width:520px}.billing-dashboard-table .table-action{white-space:nowrap}

.billing-list-toolbar{display:flex;align-items:end;gap:18px;flex-wrap:wrap;margin:12px 0 8px}.billing-list-toolbar>label{flex:1 1 320px}.billing-sort-control{display:flex;flex-direction:column;gap:8px}.billing-sort-control>span{font-size:13px;font-weight:600}.billing-sort-buttons{display:flex;gap:6px}.billing-sort-buttons button{padding:12px 16px}.billing-sort-buttons button.is-active{background:#11746b;color:white}.project-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;flex:0 0 auto}.billing-project-card .project-info{min-width:0;flex:1}.billing-project-card .project-actions .button{white-space:nowrap}
@media(max-width:760px){.billing-list-toolbar{align-items:stretch;flex-direction:column}.billing-list-toolbar>label,.billing-list-toolbar input{width:100%}.billing-sort-buttons{width:100%}.billing-sort-buttons button{flex:1}.project-actions{width:100%;justify-content:stretch}.project-actions .button{flex:1;text-align:center}}


/* Einheitliche Detailtabellen für Tickets und Supports */
.unified-billing-table{table-layout:fixed;min-width:980px}.unified-billing-table th,.unified-billing-table td{vertical-align:middle}.unified-billing-table .billing-col-date{width:16%}.unified-billing-table .billing-col-position{width:14%}.unified-billing-table .billing-col-title{width:30%}.unified-billing-table .billing-col-employee{width:18%}.unified-billing-table .billing-col-hours{width:11%}.unified-billing-table .billing-col-amount{width:11%}.unified-billing-table th:nth-child(1),.unified-billing-table td:nth-child(1),.unified-billing-table th:nth-child(2),.unified-billing-table td:nth-child(2),.unified-billing-table th:nth-child(5),.unified-billing-table td:nth-child(5),.unified-billing-table th:nth-child(6),.unified-billing-table td:nth-child(6){white-space:nowrap}.unified-billing-table td:nth-child(3),.unified-billing-table td:nth-child(4){white-space:normal;overflow-wrap:anywhere}

/* Mehrbenutzerverwaltung */
.user-chip{display:inline-flex;align-items:center;padding:7px 10px;border-radius:18px;background:#eef3f5;color:#3c515b;font-size:12px;font-weight:700;white-space:nowrap}
.settings-tabs{display:flex;gap:8px;margin:0 0 24px;border-bottom:1px solid #dce4e7}
.settings-tabs a{display:inline-block;padding:11px 15px;margin-bottom:-1px;color:#335968;text-decoration:none;font-weight:700;border-bottom:3px solid transparent}
.settings-tabs a.active{color:#11746b;border-bottom-color:#11746b}
.user-create-card{max-width:1180px}
.user-list{max-width:1180px}
.user-card{border-left:5px solid #11746b}
.user-card.is-locked{border-left-color:#bd641f}
.user-card.is-inactive{border-left-color:#7d8b92;opacity:.78}
.user-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}
.user-card-head h2{margin:0 0 5px}
.user-card-head .hint{margin:0}
.user-form-grid{display:grid;grid-template-columns:1.2fr 1.5fr .8fr 1.2fr .55fr;gap:14px;align-items:end}
.user-form-grid input,.user-form-grid select{width:100%;min-width:0}
.user-active{align-self:end;min-height:45px;padding-bottom:11px}
.user-meta{display:flex;gap:18px;flex-wrap:wrap;margin-top:14px;color:#61737c;font-size:12px}
.user-actions{margin-top:16px}
.user-statuses{display:flex;gap:8px;flex-wrap:wrap}
.status-pill{display:inline-flex;align-items:center;border-radius:20px;padding:5px 10px;font-size:11px;font-weight:800}
.status-active{background:#e9f5ec;color:#397b4b}.status-locked{background:#fff0e4;color:#a75518}.status-inactive{background:#edf1f3;color:#5f6f78}
@media(max-width:1050px){.user-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.user-active{align-self:center}}
@media(max-width:650px){.user-form-grid{grid-template-columns:1fr}.user-card-head{flex-direction:column}.user-chip{display:none}}
