* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    color: #111827;
}

a {
    color: #2563eb;
    text-decoration: none;
}

.page {
    min-height: 100vh;
}

/* AUTH */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.auth-card.wide {
    max-width: 900px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.brand h1 {
    margin: 0;
    font-size: 26px;
}

.brand p {
    margin: 4px 0 0;
    color: #6b7280;
}

/* FORMS */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid h2 {
    grid-column: 1 / -1;
    margin: 20px 0 0;
    font-size: 18px;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
    resize: vertical;
}

.full-width {
    grid-column: 1 / -1;
}

/* BUTTONS */
.primary-button,
.secondary-button {
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 800;
    cursor: pointer;
}

.primary-button {
    grid-column: 1 / -1;
    background: #2563eb;
    color: #ffffff;
}

.secondary-button {
    background: #e5e7eb;
    color: #111827;
}

.primary-link-button,
.secondary-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
    text-decoration: none;
}

.primary-link-button {
    background: #2563eb;
    color: #ffffff;
}

.secondary-link-button {
    background: #e5e7eb;
    color: #111827;
}

.danger-button {
    border: none;
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 800;
    cursor: pointer;
    background: #fee2e2;
    color: #991b1b;
}

.danger-button:hover {
    background: #fecaca;
}

.success-main-button,
.danger-main-button {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 16px 20px;
    margin-top: 16px;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
}

.success-main-button {
    background: #16a34a;
    color: #ffffff;
}

.success-main-button:hover {
    background: #15803d;
}

.danger-main-button {
    background: #dc2626;
    color: #ffffff;
}

.danger-main-button:hover {
    background: #b91c1c;
}

/* MINI BUTTONS / TABLE ACTIONS */
.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.mini-button,
.mini-danger-button,
.mini-success-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.mini-button {
    background: #e5e7eb;
    color: #111827;
}

.mini-danger-button {
    background: #fee2e2;
    color: #991b1b;
}

.mini-danger-button:hover {
    background: #fecaca;
}

.mini-success-button {
    background: #dcfce7;
    color: #166534;
}

.mini-success-button:hover {
    background: #bbf7d0;
}

/* ICON ACTION BUTTONS */
.icon-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-action-row form {
    margin: 0;
}

.icon-action-button {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    transition: transform 0.12s ease, background 0.12s ease;
}

.icon-action-button:hover {
    transform: translateY(-1px);
}

.icon-action-button.edit {
    background: #dbeafe;
    color: #1d4ed8;
}

.icon-action-button.edit:hover {
    background: #bfdbfe;
}

.icon-action-button.delete {
    background: #fee2e2;
    color: #991b1b;
}

.icon-action-button.delete:hover {
    background: #fecaca;
}

/* ALERTS */
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 700;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.small-link {
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
}

/* DASHBOARD */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 32px;
}

.header-actions,
.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.eyebrow {
    margin: 0 0 6px;
    color: #2563eb;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 36px;
}

.dashboard-header p {
    margin: 8px 0 0;
    color: #6b7280;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
}

.dashboard-card h2 {
    margin: 0 0 16px;
}

.dashboard-card p {
    color: #374151;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.card-title-row h2 {
    margin: 0;
}

/* TIME TRACKING */
.time-action-card {
    border: 2px solid #dbeafe;
}

.time-status {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 12px;
}

.time-status.active {
    background: #dcfce7;
    color: #166534;
}

.time-status.inactive {
    background: #e5e7eb;
    color: #374151;
}

.time-summary-card {
    margin: 20px 0;
}

.dashboard-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.compact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.compact-form .primary-button {
    grid-column: 1 / -1;
}

.compact-table {
    min-width: 420px;
}

.muted {
    color: #6b7280;
}

/* TABLES */
.table-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
    margin-top: 20px;
}

.table-card h2 {
    margin-top: 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

th {
    color: #374151;
    background: #f8fafc;
    font-weight: 800;
}

td {
    color: #111827;
}

/* STATUS */
.status-pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.active {
    background: #dcfce7;
    color: #166534;
}

.status-pill.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-pill.neutral {
    background: #e5e7eb;
    color: #374151;
}

/* EMPTY */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state h2 {
    margin: 0 0 10px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 22px;
}

/* EMPLOYEE FORM */
.employee-form-card {
    max-width: 1000px;
    margin: 0;
}

.checkbox-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #f8fafc;
}

.checkbox-card input {
    width: auto;
    margin-top: 4px;
}

.checkbox-card span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-card small {
    color: #6b7280;
    font-weight: 400;
}

/* ORG CHART */
.org-chart-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
}

.org-chart,
.org-chart ul {
    list-style: none;
    margin: 0;
    padding-left: 36px;
    position: relative;
}

.org-chart {
    padding-left: 0;
    min-width: 700px;
}

.org-chart li {
    position: relative;
    padding: 12px 0 12px 32px;
}

.org-chart li::before {
    content: "";
    position: absolute;
    top: 34px;
    left: 0;
    width: 24px;
    height: 1px;
    background: #cbd5e1;
}

.org-chart li::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: #cbd5e1;
}

.org-chart > li::before,
.org-chart > li::after {
    display: none;
}

.org-chart li:last-child::after {
    height: 34px;
}

.org-node {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 280px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.org-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.org-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.org-info strong {
    color: #111827;
}

.org-info span {
    color: #374151;
    font-size: 14px;
}

.org-info small {
    color: #6b7280;
    font-size: 12px;
}

/* PROJECT OVERVIEW */
.project-card-wide {
    grid-column: span 2;
}

.project-hours-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    max-height: 210px;
    overflow-y: auto;
    padding-right: 4px;
}

.project-hour-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.project-hour-row span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.project-hour-row strong {
    color: #111827;
}

.project-hour-row small {
    color: #6b7280;
    font-size: 12px;
}

.project-chart-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: center;
    margin-top: 18px;
}

.pie-chart {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    border: 12px solid #ffffff;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
    background: #e5e7eb;
}

.project-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-row {
    display: grid;
    grid-template-columns: 16px 1fr auto auto;
    gap: 10px;
    align-items: center;
    font-size: 14px;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 999px;
}

.legend-row strong {
    color: #111827;
}

.legend-row small {
    color: #6b7280;
}

.inline-create-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-top: 22px;
}

.inline-create-form .primary-button {
    grid-column: auto;
    white-space: nowrap;
}

/* GOOGLE STYLE CALENDAR */
.google-calendar-card {
    margin-top: 24px;
}

.google-calendar-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.google-calendar-header h2 {
    margin: 0;
    font-size: 28px;
}

.google-calendar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-picker-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 18px;
    align-items: end;
}

.calendar-picker-form .primary-button {
    grid-column: auto;
    height: 46px;
}

.calendar-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.google-calendar-summary {
    margin-bottom: 18px;
}

.calendar-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 900;
}

.calendar-badge.planned {
    background: #dbeafe;
    color: #1d4ed8;
}

.calendar-badge.vacation-approved {
    background: #dcfce7;
    color: #166534;
}

.calendar-badge.vacation-pending {
    background: #fef3c7;
    color: #92400e;
}

.calendar-badge.vacation-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.calendar-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 20px;
}

.calendar-meta-grid div {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
}

.calendar-meta-grid strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
}

.calendar-meta-grid span {
    color: #4b5563;
    font-size: 14px;
}

.google-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(170px, 1fr));
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow-x: auto;
    background: #e5e7eb;
    gap: 1px;
}

.google-calendar-weekday {
    background: #f8fafc;
    padding: 12px;
    font-weight: 900;
    color: #374151;
    text-align: center;
    min-width: 170px;
}

.google-calendar-weekday.weekend {
    background: #f1f5f9;
    color: #64748b;
}

.google-calendar-day {
    min-height: 190px;
    min-width: 170px;
    background: #ffffff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.google-calendar-day.outside-month {
    background: #f8fafc;
    color: #9ca3af;
}

.google-calendar-day.weekend {
    background: #f8fafc;
}

.google-calendar-day.today {
    outline: 3px solid #2563eb;
    outline-offset: -3px;
}

.google-calendar-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.google-calendar-day-head span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.google-calendar-day.today .google-calendar-day-head span {
    background: #2563eb;
    color: #ffffff;
}

.google-calendar-day-head small {
    color: #6b7280;
    font-weight: 800;
}

.google-calendar-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 145px;
    overflow-y: auto;
    padding-right: 2px;
}

.google-calendar-event {
    border-radius: 10px;
    padding: 7px 8px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-left: 4px solid transparent;
}

.google-calendar-event strong {
    color: #111827;
}

.google-calendar-event span {
    color: #374151;
    font-weight: 800;
}

.google-calendar-event small {
    color: #6b7280;
    line-height: 1.25;
}

.google-calendar-event select {
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12px;
}

.google-calendar-event .mini-button {
    width: 100%;
    padding: 7px 8px;
    font-size: 12px;
}

.google-calendar-event.planned {
    background: #eff6ff;
    border-left-color: #60a5fa;
}

.google-calendar-event.vacation-approved {
    background: #dcfce7;
    border-left-color: #22c55e;
}

.google-calendar-event.vacation-pending {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.google-calendar-event.vacation-rejected {
    background: #fee2e2;
    border-left-color: #ef4444;
}

.editable-calendar-event {
    margin: 0;
}

.empty-calendar-day {
    color: #9ca3af;
    font-size: 12px;
    margin: 0;
}
.calendar-bulk-form {
    margin: 0;
}

.calendar-bulk-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.calendar-bulk-actions .primary-button {
    grid-column: auto;
    width: auto;
    min-width: 220px;
}

.calendar-cell-select-only {
    display: block;
    margin: 0;
}

.calendar-cell-select-only select {
    width: 100%;
}

.company-logo-upload-box {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    background: #f8fafc;
}

.company-logo-upload-box h3 {
    margin: 0 0 12px;
}

.company-logo-preview {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 12px 0;
}

.company-logo-preview img {
    max-width: 180px;
    max-height: 90px;
    object-fit: contain;
    border-radius: 14px;
    background: white;
    border: 1px solid #e5e7eb;
    padding: 10px;
}

.brand-logo.image-logo {
    background: white;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    padding: 4px;
}

.brand-logo.image-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.login-card {
    text-align: center;
}

.login-title {
    margin: 0 0 22px;
    font-size: 32px;
    font-weight: 900;
    color: #111827;
    text-align: center;
}

.login-logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.login-logo {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    overflow: hidden;
}

.login-logo.image-logo {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 6px;
}

.login-logo.image-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-company-name {
    margin: -6px 0 24px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.login-form {
    text-align: left;
}

.login-form .primary-button {
    margin-top: 2px;
}

.login-register-link {
    text-align: center;
}
.checkbox-label {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
}

.muted-text {
    color: #6b7280;
}
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-flex;
}

.legend-dot.planned {
    background: #60a5fa;
}

.legend-dot.vacation-approved {
    background: #22c55e;
}

.legend-dot.vacation-pending {
    background: #f59e0b;
}

.legend-dot.vacation-rejected {
    background: #ef4444;
}

.legend-dot.weekend {
    background: #94a3b8;
}

/* EMPLOYEE PLANNING CALENDAR */
.company-calendar-card {
    grid-column: 1 / -1;
}

.calendar-filter-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 12px;
    margin-bottom: 18px;
    align-items: end;
}

.calendar-filter-form .primary-button {
    grid-column: auto;
    height: 46px;
    white-space: nowrap;
}

.planning-calendar-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    max-height: 720px;
}

.planning-calendar {
    width: 100%;
    min-width: 1850px;
    border-collapse: separate;
    border-spacing: 0;
}

.planning-calendar th,
.planning-calendar td {
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    padding: 10px;
    font-size: 13px;
    vertical-align: middle;
}

.planning-calendar th {
    position: sticky;
    top: 0;
    z-index: 6;
    background: #f8fafc;
    color: #374151;
    font-weight: 900;
    text-align: center;
}

.planning-calendar th span {
    display: block;
    font-size: 14px;
}

.planning-calendar th small {
    display: block;
    color: #6b7280;
    font-size: 11px;
    margin-top: 3px;
}

.sticky-col {
    position: sticky;
    z-index: 5;
    background: #ffffff;
}

.planning-calendar th.sticky-col {
    z-index: 8;
    background: #f8fafc;
}

.employee-col {
    left: 0;
    min-width: 145px;
    max-width: 145px;
}

.position-col {
    left: 145px;
    min-width: 115px;
    max-width: 115px;
}

.location-col {
    left: 260px;
    min-width: 105px;
    max-width: 105px;
}

.employee-col strong,
.employee-col small {
    display: block;
}

.employee-col strong {
    color: #111827;
}

.employee-col small {
    color: #6b7280;
    margin-top: 4px;
    font-size: 12px;
}

.calendar-cell {
    min-width: 130px;
    max-width: 130px;
    text-align: center;
}

.calendar-cell.empty {
    background: #ffffff;
}

.calendar-cell.weekend {
    background: #f8fafc;
}

.calendar-cell.planned {
    background: #eff6ff;
}

.calendar-cell.vacation-approved {
    background: #dcfce7;
    color: #166534;
    font-weight: 900;
}

.calendar-cell.vacation-pending {
    background: #fef3c7;
    color: #92400e;
    font-weight: 900;
}

.calendar-cell.vacation-rejected {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 900;
}

.weekend-head {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.calendar-cell-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    font-weight: 900;
    font-size: 12px;
}

.calendar-cell-form {
    display: grid;
    grid-template-columns: 1fr 34px;
    gap: 6px;
    align-items: center;
    margin: 0;
}

.calendar-cell-form select {
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 12px;
    min-height: 34px;
}

.calendar-cell-form button {
    min-width: 34px;
    height: 34px;
    padding: 0;
}

.superadmin-company-table {
  min-width: 1450px;
}

.superadmin-admin-box {
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.superadmin-admin-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.superadmin-admin-meta strong {
  color: #111827;
}

.superadmin-admin-meta small {
  color: #6b7280;
  font-size: 12px;
}

.superadmin-admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}

.superadmin-admin-form label {
  gap: 5px;
  font-size: 12px;
}

.superadmin-admin-form input {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.superadmin-admin-form .mini-button {
  height: 37px;
  white-space: nowrap;
}

.superadmin-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
/* SUPERADMIN SUBSCRIPTION DASHBOARD UPDATE */
.superadmin-hero-header {
  align-items: flex-start;
}

.superadmin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.superadmin-kpi-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.superadmin-kpi-card.primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 62%, #60a5fa 100%);
  color: #ffffff;
  border-color: transparent;
}

.superadmin-kpi-card.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.superadmin-kpi-card span {
  color: #6b7280;
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.superadmin-kpi-card.primary span,
.superadmin-kpi-card.primary small {
  color: rgba(255,255,255,0.84);
}

.superadmin-kpi-card strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.superadmin-kpi-card small {
  color: #6b7280;
  font-weight: 800;
}

.superadmin-overview-grid {
  margin-bottom: 20px;
}

.superadmin-status-stack,
.superadmin-plan-distribution,
.superadmin-warning-list,
.superadmin-limit-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.superadmin-status-stack > div,
.superadmin-plan-row,
.superadmin-warning-item,
.superadmin-limit-stack > div {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px 14px;
}

.superadmin-status-stack > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.superadmin-status-stack strong {
  font-size: 24px;
}

.superadmin-status-stack span,
.superadmin-limit-stack span {
  color: #6b7280;
  font-weight: 800;
  font-size: 13px;
}

.superadmin-plan-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.superadmin-plan-row span,
.superadmin-warning-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.superadmin-plan-row small,
.superadmin-warning-item small {
  color: #6b7280;
  font-size: 12px;
}

.superadmin-plan-row em {
  color: #374151;
  font-style: normal;
  font-weight: 800;
}

.superadmin-plan-row b {
  color: #111827;
}

.superadmin-dashboard-table {
  min-width: 1180px;
}

.superadmin-subscription-table {
  min-width: 1900px;
}

.superadmin-subscription-form {
  min-width: 330px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.superadmin-subscription-form label {
  gap: 5px;
  font-size: 12px;
}

.superadmin-subscription-form input,
.superadmin-subscription-form select {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.superadmin-subscription-form .full-width,
.superadmin-subscription-form button.full-width {
  grid-column: 1 / -1;
}

.superadmin-limit-stack > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  min-width: 260px;
}

.superadmin-limit-stack strong {
  color: #111827;
  white-space: nowrap;
}

.superadmin-limit-stack small {
  color: #6b7280;
  font-weight: 800;
}

.limit-warning {
  color: #b45309 !important;
}

.superadmin-subscription-status-pill {
  margin-top: 8px;
}

.superadmin-company-actions-top {
  margin-top: 0;
  justify-content: flex-end;
}

.superadmin-package-top {
  align-items: start;
}

.superadmin-package-form .checkbox-card {
  min-height: 86px;
}

.superadmin-package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.superadmin-package-card {
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.05);
}

.superadmin-package-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.compact-package-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.superadmin-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.superadmin-feature-grid label {
  flex-direction: row;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
  font-size: 13px;
}

.superadmin-feature-grid input {
  width: auto;
}

@media (max-width: 1050px) {
  .superadmin-kpi-grid,
  .superadmin-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .superadmin-kpi-grid,
  .superadmin-package-grid,
  .superadmin-dashboard-columns,
  .superadmin-package-top {
    grid-template-columns: 1fr !important;
  }

  .superadmin-plan-row,
  .superadmin-limit-stack > div {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .superadmin-subscription-form,
  .compact-package-edit-grid,
  .superadmin-feature-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-company-actions-top,
  .superadmin-company-actions-top a {
    width: 100%;
  }
}


/* COMPANY LOGO + HORIZONTAL ORG CHART UPDATE */
.company-overview-logo-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 4px 0 18px;
}

.company-overview-logo-row img {
  max-width: 160px;
  max-height: 78px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  padding: 10px;
}

.company-overview-logo-fallback {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.company-org-chart-card {
  grid-column: 1 / -1;
  overflow: hidden;
}

.company-org-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.company-org-header h2 {
  margin: 0;
  font-size: 28px;
}

.company-org-header p {
  margin: 6px 0 0;
}

.company-org-logo-wrap {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.company-org-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.company-org-logo-fallback {
  width: 100%;
  height: 100%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.08em;
}

.horizontal-org-chart-wrap {
  width: 100%;
  overflow: auto;
  padding: 28px 0 18px;
}

.horizontal-org-chart,
.horizontal-org-chart ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 26px;
}

.horizontal-org-chart {
  min-width: max-content;
  padding: 0 22px;
}

.horizontal-org-chart li {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.horizontal-org-chart li::before,
.horizontal-org-chart li::after {
  content: none;
  display: none;
}

.horizontal-org-chart li > ul {
  margin-top: 42px;
}

.horizontal-org-chart li > ul::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 0;
  right: 0;
  height: 1px;
  background: #cbd5e1;
}

.horizontal-org-chart li > ul > li::before {
  content: "";
  display: block;
  position: absolute;
  top: -22px;
  left: 50%;
  width: 1px;
  height: 22px;
  background: #cbd5e1;
}

.horizontal-org-chart > li::before {
  content: none;
  display: none;
}

.horizontal-org-node {
  min-width: 260px;
  max-width: 300px;
  white-space: normal;
}

@media (max-width: 900px) {
  .company-org-header {
    align-items: flex-start;
  }

  .company-org-logo-wrap {
    width: 72px;
    height: 72px;
  }

  .horizontal-org-node {
    min-width: 230px;
  }
}
/* COMPANY ORG DEPARTMENT + LOCATION GROUP FILTER UPDATE */
.org-people-overview {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #f8fafc;
  padding: 18px;
  margin: 0 0 18px;
}

.org-filter-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.org-filter-toolbar label {
  margin: 0;
}

.org-filter-reset-button {
  height: 46px;
  white-space: nowrap;
}

.org-filter-summary {
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 11px 13px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.org-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.org-group-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
}

.org-group-card h3 {
  margin: 0;
  font-size: 18px;
}

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

.org-group-button {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.org-group-button:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.org-group-button.active {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
}

.org-group-button-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.org-group-button-head strong {
  color: #111827;
  font-size: 14px;
}

.org-group-button-head em {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.org-group-button small {
  display: block;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.horizontal-org-node.org-node-match {
  border-color: #2563eb;
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.18);
  transform: translateY(-2px);
}

.horizontal-org-node.org-node-muted {
  opacity: 0.34;
  filter: grayscale(0.3);
}

@media (max-width: 1100px) {
  .org-group-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .org-filter-toolbar,
  .org-group-grid {
    grid-template-columns: 1fr;
  }

  .org-filter-reset-button {
    width: 100%;
  }
}
/* COMPANY CALENDAR EXCEL EXPORT UPDATE */
.calendar-export-form {
  margin: 0;
}

.calendar-export-form input[type="hidden"] {
  display: none;
}

.calendar-export-button {
  grid-column: auto;
  width: auto;
  white-space: nowrap;
  min-height: 46px;
}

@media (max-width: 820px) {
  .google-calendar-header {
    flex-direction: column;
  }

  .calendar-export-form,
  .calendar-export-button {
    width: 100%;
  }
}

/* SHIFT + ABSENCE CALENDAR UPDATE */
.calendar-cell-planning-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-assignment-select,
.calendar-shift-select {
  width: 100%;
  min-width: 118px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
}

.calendar-shift-select {
  background: #f8fafc;
  font-weight: 800;
}

.legend-dot.absence-manual {
  background: #ec4899;
}
/* CALENDAR SHIFT HOTFIX */
.calendar-shift-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f3f4f6;
  color: #6b7280;
}

.calendar-cell-planning-form {
  gap: 6px;
}
/* Planungskalender: Abteilung + Projekt als zentrale Planungsinfos */
.calendar-filter-form {
  grid-template-columns: repeat(7, minmax(0, 1fr)) auto;
}

.calendar-filter-form label select {
  min-width: 0;
}

.planning-info-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.department-col {
  left: 145px;
  min-width: 120px;
  max-width: 120px;
}

.position-col {
  left: 265px;
  min-width: 120px;
  max-width: 120px;
}

.location-col {
  left: 385px;
  min-width: 115px;
  max-width: 115px;
}

.planning-calendar {
  min-width: 2020px;
}

.department-col,
.position-col,
.location-col {
  font-size: 12px;
  line-height: 1.25;
}

@media (max-width: 1100px) {
  .calendar-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-filter-form .primary-button {
    grid-column: 1 / -1;
  }

  .planning-info-grid {
    grid-template-columns: 1fr;
  }
}

/* COMPANY ORG CHART ZOOM + AUTO-FIT UPDATE */
.org-zoom-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.org-zoom-toolbar .mini-button {
  min-width: 42px;
}

.org-zoom-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f1f5f9;
  color: #374151;
  font-size: 12px;
  font-weight: 900;
}

.horizontal-org-chart-wrap {
  width: 100%;
  overflow: auto;
  padding: 26px 16px 18px;
  scroll-behavior: smooth;
}

.horizontal-org-chart-stage {
  position: relative;
  margin: 0 auto;
}

.horizontal-org-chart-scale {
  position: absolute;
  top: 0;
  left: 50%;
  transform-origin: top center;
  transition: transform 0.18s ease;
}

.horizontal-org-chart {
  min-width: max-content;
}

.company-org-chart-card {
  grid-column: 1 / -1;
  overflow: hidden;
}

@media (max-width: 900px) {
  .org-zoom-toolbar {
    justify-content: flex-start;
  }

  .horizontal-org-chart-wrap {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* HEADER DROPDOWN MENU */
.top-menu-dropdown {
    position: relative;
    display: inline-block;
}

.top-menu-dropdown summary {
    list-style: none;
    user-select: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 900;
    background: #2563eb;
    color: #ffffff;
    min-width: 130px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.top-menu-dropdown summary:hover {
    background: #1d4ed8;
}

.top-menu-dropdown[open] summary {
    background: #1d4ed8;
}

.top-menu-dropdown summary::-webkit-details-marker {
    display: none;
}

.menu-icon {
    font-size: 18px;
    line-height: 1;
}

.top-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 9999;
    width: 280px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.top-menu-panel a,
.top-menu-panel button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: none;
    border-radius: 12px;
    padding: 12px 12px;
    background: transparent;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.top-menu-panel a:hover,
.top-menu-panel button:hover {
    background: #f1f5f9;
}

.top-menu-panel form {
    margin: 6px 0 0;
    padding-top: 6px;
    border-top: 1px solid #e5e7eb;
}

.top-menu-panel form button {
    color: #991b1b;
}

.top-menu-panel form button:hover {
    background: #fee2e2;
}

/* VACATION DECISION FORMS */
.vacation-action-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 260px;
}

.vacation-decision-form {
    display: grid;
    grid-template-columns: 1fr 42px;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.vacation-decision-form input {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.vacation-decision-form button {
    height: 38px;
}

/* MOBILE */
@media (max-width: 800px) {
    .auth-shell {
        padding: 20px;
    }

    .auth-card {
        padding: 24px;
        border-radius: 20px;
    }

    .form-grid,
    .dashboard-grid,
    .dashboard-two-columns,
    .compact-form,
    .calendar-picker-form {
        grid-template-columns: 1fr;
    }

    .dashboard {
        padding: 28px 18px;
    }

    .dashboard-header,
    .google-calendar-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-header h1 {
        font-size: 28px;
    }

    .full-width {
        grid-column: auto;
    }

    .header-actions,
    .google-calendar-actions {
        width: 100%;
    }

    .primary-link-button,
    .secondary-link-button {
        width: 100%;
    }

    .table-card {
        padding: 16px;
    }

    .org-chart {
        min-width: 640px;
    }

    .project-card-wide {
        grid-column: auto;
    }

    .project-chart-layout {
        grid-template-columns: 1fr;
    }

    .pie-chart {
        margin: 0 auto;
    }

    .inline-create-form {
        grid-template-columns: 1fr;
    }

    .inline-create-form .primary-button,
    .calendar-picker-form .primary-button {
        grid-column: auto;
        width: 100%;
    }

    .calendar-meta-grid {
        grid-template-columns: 1fr;
    }

    .calendar-summary {
        width: 100%;
    }

    .google-calendar-grid {
        grid-template-columns: repeat(7, minmax(160px, 1fr));
    }

    .google-calendar-day,
    .google-calendar-weekday {
        min-width: 160px;
    }

    .top-menu-dropdown,
    .top-menu-dropdown summary {
        width: 100%;
    }

    .top-menu-panel {
        left: 0;
        right: auto;
        width: 100%;
    }

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

        .calendar-filter-form .primary-button {
            grid-column: auto;
            width: 100%;
        }

        .planning-calendar-wrap {
            max-height: 620px;
        }

        .planning-calendar {
            min-width: 1500px;
        }

        .employee-col {
            left: 0;
            min-width: 180px;
            max-width: 180px;
        }

        .position-col {
            left: 180px;
            min-width: 145px;
            max-width: 145px;
        }

        .location-col {
            left: 325px;
            min-width: 135px;
            max-width: 135px;
        }

        .calendar-cell {
            min-width: 115px;
            max-width: 115px;
        }

}
/* TIMEANDPEOPLE MOBILE RESPONSIVE UPDATE
   Ziel: gesamte App auf Handy/Tablet besser bedienbar machen.
   Diese Datei ans Ende von static/css/app.css kopieren. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

/* iOS zoomt automatisch in Inputs unter 16px hinein. */
@media (max-width: 900px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .page {
    width: 100%;
    overflow-x: hidden;
  }

  .dashboard {
    width: 100%;
    max-width: 100%;
    padding: 24px 14px;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
  }

  .dashboard-header h1 {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.08;
    word-break: break-word;
  }

  .dashboard-header p {
    font-size: 14px;
    line-height: 1.45;
  }

  .header-actions,
  .button-row,
  .google-calendar-actions,
  .calendar-bulk-actions {
    width: 100%;
    align-items: stretch;
  }

  .button-row > *,
  .header-actions > *,
  .primary-link-button,
  .secondary-link-button,
  .primary-button,
  .secondary-button,
  .danger-button,
  .success-main-button,
  .danger-main-button,
  .calendar-bulk-actions .primary-button {
    width: 100%;
  }

  .dashboard-grid,
  .dashboard-two-columns,
  .form-grid,
  .compact-form,
  .inline-create-form,
  .calendar-picker-form,
  .calendar-filter-form,
  .calendar-meta-grid,
  .planning-info-grid,
  .org-filter-toolbar,
  .org-group-grid,
  .project-chart-layout {
    grid-template-columns: 1fr !important;
  }

  .dashboard-card,
  .table-card,
  .auth-card,
  .auth-card.wide,
  .employee-form-card,
  .company-logo-upload-box,
  .org-people-overview,
  .org-group-card {
    border-radius: 18px;
    padding: 18px;
  }

  .full-width,
  .project-card-wide,
  .company-calendar-card,
  .company-org-chart-card {
    grid-column: auto !important;
  }

  label {
    font-size: 13px;
  }

  .auth-shell {
    min-height: 100svh;
    padding: 18px;
    align-items: flex-start;
  }

  .login-title {
    font-size: 28px;
  }

  .login-logo {
    width: 58px;
    height: 58px;
  }

  /* Menü: auf Handy nicht über den Bildschirm hinausragen. */
  .top-menu-dropdown,
  .top-menu-dropdown summary {
    width: 100%;
  }

  .top-menu-dropdown summary {
    min-width: 0;
  }

  .top-menu-panel {
    position: static;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  }

  .top-menu-panel a,
  .top-menu-panel button {
    min-height: 44px;
  }

  /* Tabellen bleiben vollständig nutzbar, aber sauber scrollbar. */
  .table-card {
    overflow: hidden;
  }

  .table-wrap,
  .planning-calendar-wrap,
  .horizontal-org-chart-wrap,
  .org-chart-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 900px;
  }

  th,
  td {
    padding: 10px 9px;
    font-size: 13px;
  }

  .compact-table {
    min-width: 520px;
  }

  .status-pill {
    white-space: nowrap;
  }

  /* Projektübersicht / Diagramme */
  .pie-chart {
    width: min(230px, 70vw);
    height: min(230px, 70vw);
    margin: 0 auto;
  }

  .legend-row {
    grid-template-columns: 16px 1fr;
    row-gap: 6px;
  }

  .legend-row small,
  .legend-row strong + small {
    grid-column: 2;
  }

  /* Organigramm */
  .company-org-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .company-org-logo-wrap {
    width: 68px;
    height: 68px;
  }

  .org-zoom-toolbar {
    justify-content: flex-start;
  }

  .horizontal-org-chart-wrap {
    padding: 20px 8px 14px;
  }

  .horizontal-org-node,
  .org-node {
    min-width: 220px;
    max-width: 260px;
  }

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

  /* Planungskalender */
  .google-calendar-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .calendar-export-form,
  .calendar-export-button {
    width: 100%;
  }

  .calendar-filter-form .primary-button,
  .calendar-picker-form .primary-button,
  .inline-create-form .primary-button,
  .compact-form .primary-button {
    grid-column: auto;
    width: 100%;
  }

  .planning-calendar-wrap {
    max-height: 70svh;
    border-radius: 14px;
  }

  .planning-calendar {
    min-width: 1780px;
  }

  .planning-calendar th,
  .planning-calendar td {
    padding: 8px;
    font-size: 12px;
  }

  .employee-col {
    left: 0 !important;
    min-width: 155px !important;
    max-width: 155px !important;
  }

  .department-col {
    left: 155px !important;
    min-width: 118px !important;
    max-width: 118px !important;
  }

  .position-col {
    left: 273px !important;
    min-width: 120px !important;
    max-width: 120px !important;
  }

  .location-col {
    left: 393px !important;
    min-width: 115px !important;
    max-width: 115px !important;
  }

  .calendar-cell {
    min-width: 112px;
    max-width: 112px;
  }

  .calendar-cell-planning-form,
  .calendar-cell-form {
    gap: 5px;
  }

  .calendar-cell-form {
    grid-template-columns: 1fr;
  }

  .calendar-cell-form button {
    width: 100%;
    min-height: 34px;
  }

  .calendar-assignment-select,
  .calendar-shift-select,
  .calendar-cell-form select {
    min-width: 0;
    font-size: 12px;
  }

  .google-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .google-calendar-day,
  .google-calendar-weekday {
    min-width: 145px;
  }

  .google-calendar-day {
    min-height: 160px;
  }
}

@media (max-width: 560px) {
  .dashboard {
    padding: 18px 10px;
  }

  .dashboard-card,
  .table-card,
  .auth-card,
  .auth-card.wide,
  .employee-form-card,
  .company-logo-upload-box,
  .org-people-overview,
  .org-group-card {
    padding: 15px;
    border-radius: 16px;
  }

  .dashboard-header h1 {
    font-size: 26px;
  }

  .eyebrow {
    font-size: 12px;
  }

  input,
  select,
  textarea {
    padding: 11px 12px;
    border-radius: 11px;
  }

  .primary-button,
  .secondary-button,
  .primary-link-button,
  .secondary-link-button,
  .danger-button {
    min-height: 46px;
    padding: 12px 14px;
  }

  .planning-calendar {
    min-width: 1650px;
  }

  .employee-col {
    min-width: 145px !important;
    max-width: 145px !important;
  }

  .department-col {
    left: 145px !important;
    min-width: 110px !important;
    max-width: 110px !important;
  }

  .position-col {
    left: 255px !important;
    min-width: 112px !important;
    max-width: 112px !important;
  }

  .location-col {
    left: 367px !important;
    min-width: 108px !important;
    max-width: 108px !important;
  }

  .calendar-cell {
    min-width: 105px;
    max-width: 105px;
  }

  .superadmin-admin-form,
  .vacation-decision-form {
    grid-template-columns: 1fr;
  }

  .superadmin-admin-form .mini-button,
  .vacation-decision-form button {
    width: 100%;
  }
}

/* Sehr schmale Geräte: Priorität auf Bedienbarkeit statt perfekte Desktop-Sticky-Spalten. */
@media (max-width: 430px) {
  .employee-col,
  .department-col,
  .position-col,
  .location-col {
    position: static !important;
  }

  .planning-calendar th.sticky-col,
  .sticky-col {
    position: static !important;
  }

  .planning-calendar {
    min-width: 1320px;
  }
}
/* EMPLOYEE PROFILE UPDATE */
.employee-profile-page {
  max-width: 1220px;
}

.employee-profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.employee-profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.employee-profile-hero-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.employee-profile-hero-text h2 {
  margin: 0;
  font-size: 26px;
}

.employee-profile-hero-text p {
  margin: 0;
}

.employee-profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.employee-profile-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.employee-profile-section h2 {
  margin-bottom: 2px;
}

.profile-field {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-field span,
.profile-edit-label span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-field strong {
  color: #111827;
  font-size: 15px;
}

.profile-edit-label {
  gap: 7px;
}

.profile-edit-label em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  margin-left: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  font-style: normal;
  font-size: 12px;
}

.employee-profile-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.employee-profile-actions .primary-button {
  grid-column: auto;
  width: auto;
}

.readonly-profile .employee-profile-section p {
  margin: 0;
  color: #374151;
  line-height: 1.55;
}

.employee-profile-table-link {
  color: #111827;
  font-weight: 900;
  text-decoration: none;
}

.employee-profile-table-link:hover {
  color: #2563eb;
}

.icon-action-button.neutral {
  background: #e5e7eb;
  color: #111827;
}

.icon-action-button.neutral:hover {
  background: #d1d5db;
}

@media (max-width: 900px) {
  .employee-profile-hero {
    align-items: flex-start;
  }

  .employee-profile-layout {
    grid-template-columns: 1fr;
  }

  .employee-profile-actions,
  .employee-profile-actions .primary-button,
  .employee-profile-actions .secondary-link-button {
    width: 100%;
  }

  .employee-profile-actions {
    justify-content: stretch;
  }
}

@media (max-width: 640px) {
  .employee-profile-hero {
    flex-direction: column;
  }

  .employee-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 21px;
  }

  .employee-profile-hero-text h2 {
    font-size: 23px;
  }
}
/* EMPLOYEE PHOTO + PROFESSIONAL PROFILE UPDATE */
.employee-profile-pro-page {
  max-width: 1240px;
}

.employee-profile-form-shell {
  margin: 0;
}

.employee-profile-cover-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
  margin-bottom: 22px;
}

.employee-profile-cover-bg {
  height: 118px;
  background:
    radial-gradient(circle at 18% 30%, rgba(37, 99, 235, 0.25), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #93c5fd 100%);
}

.employee-profile-cover-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: end;
  padding: 0 28px 28px;
  margin-top: -56px;
}

.employee-profile-photo-wrap {
  width: 128px;
  height: 128px;
  border-radius: 34px;
  background: #ffffff;
  border: 6px solid #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.20);
  overflow: hidden;
  flex-shrink: 0;
}

.employee-profile-photo,
.employee-profile-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.employee-profile-photo {
  object-fit: cover;
}

.employee-profile-photo-fallback {
  background: #2563eb;
  color: #ffffff;
  font-size: 38px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.employee-profile-identity {
  min-width: 0;
  padding-top: 10px;
}

.employee-profile-name-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.employee-profile-name-row h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  color: #0f172a;
}

.employee-profile-role-line {
  margin: 8px 0 12px;
  color: #475569;
  font-weight: 700;
}

.employee-profile-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-profile-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.employee-profile-chip.editable {
  background: #dbeafe;
  color: #1d4ed8;
}

.employee-profile-chip.readonly {
  background: #e5e7eb;
  color: #374151;
}

.employee-profile-pro-grid {
  align-items: start;
}

.employee-profile-photo-card .muted {
  margin: -4px 0 4px;
  line-height: 1.5;
}

.profile-photo-upload-box {
  border: 1px dashed #93c5fd;
  border-radius: 20px;
  background: #eff6ff;
  padding: 16px;
  cursor: pointer;
}

.profile-photo-upload-box input {
  background: #ffffff;
  border-style: solid;
}

.profile-photo-upload-box small {
  color: #64748b;
  font-weight: 700;
}

.profile-photo-delete {
  border: 1px solid #fee2e2;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff7f7;
  color: #991b1b;
  font-weight: 800;
}

.profile-photo-delete input {
  width: auto;
}

.employee-profile-table-person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.employee-profile-table-photo,
.employee-profile-table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex-shrink: 0;
}

.employee-profile-table-photo {
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.employee-profile-table-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.org-avatar-photo-wrap {
  overflow: hidden;
  padding: 0;
}

.org-avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.horizontal-org-node .org-avatar-photo-wrap,
.org-node .org-avatar-photo-wrap {
  background: #ffffff;
  border: 1px solid #dbe3ef;
}

@media (max-width: 760px) {
  .employee-profile-cover-bg {
    height: 96px;
  }

  .employee-profile-cover-content {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    padding: 0 18px 22px;
    margin-top: -46px;
  }

  .employee-profile-photo-wrap {
    width: 104px;
    height: 104px;
    border-radius: 28px;
  }

  .employee-profile-photo-fallback {
    font-size: 30px;
  }

  .employee-profile-name-row h2 {
    font-size: 26px;
  }

  .employee-profile-chip-row {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-profile-chip {
    justify-content: center;
  }
}

/* EMPLOYEE PHOTO + PROFESSIONAL PROFILE UPDATE */
.employee-profile-pro-page {
  max-width: 1240px;
}

.employee-profile-form-shell {
  margin: 0;
}

.employee-profile-cover-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
  margin-bottom: 22px;
}

.employee-profile-cover-bg {
  height: 118px;
  background:
    radial-gradient(circle at 18% 30%, rgba(37, 99, 235, 0.25), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #93c5fd 100%);
}

.employee-profile-cover-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: end;
  padding: 0 28px 28px;
  margin-top: -56px;
}

.employee-profile-photo-wrap {
  width: 128px;
  height: 128px;
  border-radius: 34px;
  background: #ffffff;
  border: 6px solid #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.20);
  overflow: hidden;
  flex-shrink: 0;
}

.employee-profile-photo,
.employee-profile-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.employee-profile-photo {
  object-fit: cover;
}

.employee-profile-photo-fallback {
  background: #2563eb;
  color: #ffffff;
  font-size: 38px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.employee-profile-identity {
  min-width: 0;
  padding-top: 10px;
}

.employee-profile-name-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.employee-profile-name-row h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  color: #0f172a;
}

.employee-profile-role-line {
  margin: 8px 0 12px;
  color: #475569;
  font-weight: 700;
}

.employee-profile-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-profile-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.employee-profile-chip.editable {
  background: #dbeafe;
  color: #1d4ed8;
}

.employee-profile-chip.readonly {
  background: #e5e7eb;
  color: #374151;
}

.employee-profile-pro-grid {
  align-items: start;
}

.employee-profile-photo-card .muted {
  margin: -4px 0 4px;
  line-height: 1.5;
}

.profile-photo-upload-box {
  border: 1px dashed #93c5fd;
  border-radius: 20px;
  background: #eff6ff;
  padding: 16px;
  cursor: pointer;
}

.profile-photo-upload-box input {
  background: #ffffff;
  border-style: solid;
}

.profile-photo-upload-box small {
  color: #64748b;
  font-weight: 700;
}

.profile-photo-delete {
  border: 1px solid #fee2e2;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff7f7;
  color: #991b1b;
  font-weight: 800;
}

.profile-photo-delete input {
  width: auto;
}

.employee-profile-table-person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.employee-profile-table-photo,
.employee-profile-table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex-shrink: 0;
}

.employee-profile-table-photo {
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.employee-profile-table-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.org-avatar-photo-wrap {
  overflow: hidden;
  padding: 0;
}

.org-avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.horizontal-org-node .org-avatar-photo-wrap,
.org-node .org-avatar-photo-wrap {
  background: #ffffff;
  border: 1px solid #dbe3ef;
}

@media (max-width: 760px) {
  .employee-profile-cover-bg {
    height: 96px;
  }

  .employee-profile-cover-content {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    padding: 0 18px 22px;
    margin-top: -46px;
  }

  .employee-profile-photo-wrap {
    width: 104px;
    height: 104px;
    border-radius: 28px;
  }

  .employee-profile-photo-fallback {
    font-size: 30px;
  }

  .employee-profile-name-row h2 {
    font-size: 26px;
  }

  .employee-profile-chip-row {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-profile-chip {
    justify-content: center;
  }
}
/* EMPLOYEE PHOTO + PROFESSIONAL PROFILE UPDATE */
.employee-profile-pro-page {
  max-width: 1240px;
}

.employee-profile-form-shell {
  margin: 0;
}

.employee-profile-cover-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
  margin-bottom: 22px;
}

.employee-profile-cover-bg {
  height: 118px;
  background:
    radial-gradient(circle at 18% 30%, rgba(37, 99, 235, 0.25), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #93c5fd 100%);
}

.employee-profile-cover-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: end;
  padding: 0 28px 28px;
  margin-top: -56px;
}

.employee-profile-photo-wrap {
  width: 128px;
  height: 128px;
  border-radius: 34px;
  background: #ffffff;
  border: 6px solid #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.20);
  overflow: hidden;
  flex-shrink: 0;
}

.employee-profile-photo,
.employee-profile-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.employee-profile-photo {
  object-fit: cover;
}

.employee-profile-photo-fallback {
  background: #2563eb;
  color: #ffffff;
  font-size: 38px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.employee-profile-identity {
  min-width: 0;
  padding-top: 10px;
}

.employee-profile-name-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.employee-profile-name-row h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  color: #0f172a;
}

.employee-profile-role-line {
  margin: 8px 0 12px;
  color: #475569;
  font-weight: 700;
}

.employee-profile-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-profile-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.employee-profile-chip.editable {
  background: #dbeafe;
  color: #1d4ed8;
}

.employee-profile-chip.readonly {
  background: #e5e7eb;
  color: #374151;
}

.employee-profile-pro-grid {
  align-items: start;
}

.employee-profile-photo-card .muted {
  margin: -4px 0 4px;
  line-height: 1.5;
}

.profile-photo-upload-box {
  border: 1px dashed #93c5fd;
  border-radius: 20px;
  background: #eff6ff;
  padding: 16px;
  cursor: pointer;
}

.profile-photo-upload-box input {
  background: #ffffff;
  border-style: solid;
}

.profile-photo-upload-box small {
  color: #64748b;
  font-weight: 700;
}

.profile-photo-delete {
  border: 1px solid #fee2e2;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff7f7;
  color: #991b1b;
  font-weight: 800;
}

.profile-photo-delete input {
  width: auto;
}

.employee-profile-table-person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.employee-profile-table-photo,
.employee-profile-table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex-shrink: 0;
}

.employee-profile-table-photo {
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.employee-profile-table-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.org-avatar-photo-wrap {
  overflow: hidden;
  padding: 0;
}

.org-avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.horizontal-org-node .org-avatar-photo-wrap,
.org-node .org-avatar-photo-wrap {
  background: #ffffff;
  border: 1px solid #dbe3ef;
}

@media (max-width: 760px) {
  .employee-profile-cover-bg {
    height: 96px;
  }

  .employee-profile-cover-content {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    padding: 0 18px 22px;
    margin-top: -46px;
  }

  .employee-profile-photo-wrap {
    width: 104px;
    height: 104px;
    border-radius: 28px;
  }

  .employee-profile-photo-fallback {
    font-size: 30px;
  }

  .employee-profile-name-row h2 {
    font-size: 26px;
  }

  .employee-profile-chip-row {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-profile-chip {
    justify-content: center;
  }
}
/* EMPLOYEE ABSENCE REQUESTS UPDATE */
.employee-dashboard-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.employee-dashboard-avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.22);
}

.employee-dashboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.absence-request-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.absence-request-form label:first-child {
  grid-column: 1 / -1;
}

.vacation-action-stack {
  align-items: stretch;
}

.vacation-decision-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.vacation-decision-form input {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .employee-dashboard-title-row {
    align-items: flex-start;
  }

  .employee-dashboard-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .absence-request-form,
  .vacation-decision-form {
    grid-template-columns: 1fr;
  }
}
/* POSITION RIGHTS UPDATE */
.position-select-label {
  gap: 8px;
}

.position-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.position-manage-button {
  height: 46px;
  white-space: nowrap;
  padding-inline: 14px;
}

.positions-page .table-card {
  overflow: visible;
}

.position-intro-card .card-title-row p {
  margin: 6px 0 0;
}

.position-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.position-create-form .primary-button {
  grid-column: 1 / -1;
}

.position-active-create,
.position-active-toggle {
  align-self: end;
  min-height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f8fafc;
}

.position-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.position-permission-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  min-height: 82px;
  font-weight: 700;
}

.position-permission-check input {
  width: auto;
  margin-top: 4px;
  flex: 0 0 auto;
}

.position-permission-check span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.position-permission-check small {
  color: #6b7280;
  font-weight: 400;
  line-height: 1.25;
}

.positions-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.position-card-form {
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  padding: 18px;
  background: #f8fafc;
}

.position-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.position-title-edit {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 12px;
}

.position-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.position-card-actions .primary-button {
  grid-column: auto;
  width: auto;
  min-width: 190px;
}

.position-delete-form {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 0;
}

@media (max-width: 980px) {
  .position-create-form,
  .position-card-head,
  .position-title-edit,
  .position-permission-grid {
    grid-template-columns: 1fr;
  }

  .position-active-create,
  .position-active-toggle {
    align-self: stretch;
  }
}

@media (max-width: 640px) {
  .position-select-row {
    grid-template-columns: 1fr;
  }

  .position-manage-button,
  .position-card-actions .primary-button {
    width: 100%;
  }

  .position-delete-form {
    justify-content: stretch;
  }

  .position-delete-form button {
    width: 100%;
  }
}
/* MENU PERMISSION NAVIGATION UPDATE */
.top-menu-panel[data-permission-menu-ready="true"] a.active {
  background: #eff6ff;
  color: #1d4ed8;
}

.top-menu-panel .menu-divider {
  width: 100%;
  height: 1px;
  background: #e5e7eb;
  margin: 8px 0 6px;
}

.organization-chart-page-card {
  overflow: hidden;
}

.organization-title-row {
  align-items: flex-start;
}

.organization-node-link {
  color: inherit;
  text-decoration: none;
}

.organization-node-link:hover {
  border-color: #bfdbfe;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.org-node-muted {
  opacity: 0.32;
  filter: grayscale(0.3);
}

.org-node-match {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10), 0 18px 45px rgba(15, 23, 42, 0.10);
}

@media (max-width: 760px) {
  .organization-title-row {
    flex-direction: column;
  }

  .organization-title-row .secondary-link-button {
    width: 100%;
  }
}
/* ORG CHART PROFILE CLICK UPDATE */
.organization-node-link,
.org-chart a.org-node {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.organization-node-link:hover,
.org-chart a.org-node:hover,
.organization-node-link:focus-visible,
.org-chart a.org-node:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10), 0 18px 45px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.organization-node-link .org-info strong::after,
.org-chart a.org-node .org-info strong::after {
  content: "  Profil öffnen";
  font-size: 11px;
  font-weight: 800;
  color: #2563eb;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.organization-node-link:hover .org-info strong::after,
.org-chart a.org-node:hover .org-info strong::after,
.organization-node-link:focus-visible .org-info strong::after,
.org-chart a.org-node:focus-visible .org-info strong::after {
  opacity: 1;
}
/* TIME ENTRIES EXCEL EXPORT + READONLY EMPLOYEE PLANNING UPDATE */
.time-entry-filter-title-row {
  align-items: flex-start;
}

.time-entry-export-form {
  margin: 0;
}

.time-entry-export-form input[type="hidden"] {
  display: none;
}

.time-entry-export-form .secondary-button,
.time-entry-export-form .mini-button {
  white-space: nowrap;
}

.employee-planning-link-card {
  border: 1px solid #dbeafe;
}

.employee-planning-summary-grid {
  margin-bottom: 20px;
}

.employee-planning-calendar-card {
  grid-column: 1 / -1;
}

.employee-planning-picker-form {
  grid-template-columns: 1fr 1fr auto;
  max-width: 760px;
}

.employee-readonly-planning-wrap {
  max-height: 720px;
}

.employee-readonly-planning-calendar .department-col {
  left: 145px;
  min-width: 115px;
  max-width: 115px;
}

.employee-readonly-planning-calendar .position-col {
  left: 260px;
  min-width: 115px;
  max-width: 115px;
}

.employee-readonly-planning-calendar .location-col {
  left: 375px;
  min-width: 105px;
  max-width: 105px;
}

.employee-readonly-planning-cell {
  min-width: 132px;
  max-width: 132px;
}

.own-planning-row .employee-col,
.own-planning-row .department-col,
.own-planning-row .position-col,
.own-planning-row .location-col {
  background: #eff6ff;
}

.own-planning-row .employee-col strong {
  color: #1d4ed8;
}

.planning-nav-actions {
  align-items: center;
}

@media (max-width: 820px) {
  .time-entry-filter-title-row,
  .employee-planning-calendar-card .google-calendar-header {
    flex-direction: column;
    align-items: stretch;
  }

  .time-entry-export-form,
  .time-entry-export-form .secondary-button,
  .time-entry-export-form .mini-button,
  .secondary-export-form {
    width: 100%;
  }

  .employee-planning-picker-form {
    grid-template-columns: 1fr;
  }

  .employee-planning-picker-form .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .planning-nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}


/* =========================================================
   TAP CSS CLEANUP + MOBILE STABILITY UPDATE
   Ziel: finale Override-Schicht für saubere Mobile-Ansicht,
   besseres Menü, weniger Overflow und stabilere Planungstabellen.
   ========================================================= */
:root {
  --tap-blue: #2563eb;
  --tap-blue-dark: #1d4ed8;
  --tap-bg: #f4f7fb;
  --tap-card: #ffffff;
  --tap-text: #111827;
  --tap-muted: #6b7280;
  --tap-border: #e5e7eb;
  --tap-soft: #f8fafc;
  --tap-radius-card: 22px;
  --tap-radius-control: 14px;
  --tap-shadow-card: 0 15px 40px rgba(15, 23, 42, 0.06);
}

html {
  width: 100%;
  min-width: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background: var(--tap-bg);
  color: var(--tap-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

button,
a,
summary,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
.primary-button,
.secondary-button,
.primary-link-button,
.secondary-link-button,
.mini-button,
.mini-danger-button,
.mini-success-button {
  touch-action: manipulation;
}

.dashboard,
.employee-profile-page,
.employee-planning-page,
.positions-page {
  width: 100%;
  max-width: 1220px;
  padding-left: clamp(14px, 3vw, 24px);
  padding-right: clamp(14px, 3vw, 24px);
}

.dashboard-card,
.table-card,
.auth-card {
  min-width: 0;
}

.dashboard-header,
.card-title-row,
.google-calendar-header,
.organization-title-row,
.employee-profile-title-row,
.time-entry-filter-title-row {
  min-width: 0;
}

.dashboard-header > div,
.card-title-row > div,
.google-calendar-header > div,
.organization-title-row > div,
.employee-profile-title-row > div,
.time-entry-filter-title-row > div {
  min-width: 0;
}

.dashboard-header h1,
.card-title-row h2,
.google-calendar-header h2,
.table-card h2,
.dashboard-card h2 {
  overflow-wrap: anywhere;
}

/* Menü: einheitlich, scrollbar und auf Mobile nie ausserhalb des Bildschirms. */
.top-menu-dropdown {
  z-index: 10000;
}

.top-menu-dropdown summary {
  min-height: 46px;
  white-space: nowrap;
}

.top-menu-panel {
  max-height: min(680px, calc(100svh - 110px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.top-menu-panel a,
.top-menu-panel button {
  min-height: 44px;
  line-height: 1.25;
}

.top-menu-panel[data-permission-menu-ready="true"] a.active {
  background: #eff6ff;
  color: var(--tap-blue-dark);
}

/* Formulare: keine abgeschnittenen Controls und bessere Touch-Ziele. */
input,
select,
textarea {
  min-width: 0;
}

.form-grid,
.compact-form,
.calendar-picker-form,
.calendar-filter-form,
.inline-create-form,
.position-create-form,
.position-title-edit,
.employee-planning-picker-form {
  min-width: 0;
}

.form-grid > *,
.compact-form > *,
.calendar-picker-form > *,
.calendar-filter-form > *,
.inline-create-form > *,
.position-create-form > *,
.position-title-edit > *,
.employee-planning-picker-form > * {
  min-width: 0;
}

.full-width {
  min-width: 0;
}

/* Tabellen: sauberer Touch-Scroll statt Seiten-Overflow. */
.table-wrap,
.planning-calendar-wrap,
.org-chart-wrap,
.horizontal-org-chart-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-wrap table {
  width: 100%;
}

.compact-table {
  min-width: 680px;
}

/* Mitarbeiterliste: Profilbilder bleiben rund und stabil. */
.employee-profile-table-person,
.employee-profile-table-link {
  min-width: 0;
}

.employee-profile-table-photo,
.employee-profile-table-avatar,
.org-avatar-photo,
.employee-dashboard-avatar-photo,
.employee-profile-photo {
  object-fit: cover;
}

/* Positionen & Rechte: Karten bleiben auch am Handy lesbar. */
.positions-list,
.position-card-form,
.position-delete-form {
  min-width: 0;
}

.position-permission-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.position-permission-check {
  min-width: 0;
}

.position-permission-check span {
  min-width: 0;
}

/* Planung: Desktop-Sticky-Spalten konsolidieren. */
.planning-calendar-wrap {
  overflow: auto;
  max-height: min(720px, 72svh);
}

.planning-calendar {
  min-width: 2020px;
}

.planning-calendar .employee-col {
  left: 0;
  min-width: 155px;
  max-width: 155px;
}

.planning-calendar .department-col {
  left: 155px;
  min-width: 120px;
  max-width: 120px;
}

.planning-calendar .position-col {
  left: 275px;
  min-width: 120px;
  max-width: 120px;
}

.planning-calendar .location-col {
  left: 395px;
  min-width: 120px;
  max-width: 120px;
}

.employee-readonly-planning-calendar {
  min-width: 1960px;
}

.employee-readonly-planning-calendar .employee-col {
  left: 0;
  min-width: 155px;
  max-width: 155px;
}

.employee-readonly-planning-calendar .department-col {
  left: 155px;
  min-width: 115px;
  max-width: 115px;
}

.employee-readonly-planning-calendar .position-col {
  left: 270px;
  min-width: 115px;
  max-width: 115px;
}

.employee-readonly-planning-calendar .location-col {
  left: 385px;
  min-width: 115px;
  max-width: 115px;
}

.calendar-cell,
.employee-readonly-planning-cell {
  overflow-wrap: anywhere;
}

.calendar-cell-label {
  width: 100%;
  line-height: 1.25;
  white-space: normal;
}

.calendar-cell-planning-form,
.calendar-cell-form {
  min-width: 0;
}

.calendar-assignment-select,
.calendar-shift-select,
.calendar-cell-form select {
  min-width: 0;
}

/* Organigramm: Profilkarten klickbar und auf kleinen Displays scrollbar. */
.organization-node-link,
.org-chart a.org-node {
  color: inherit;
  text-decoration: none;
}

.org-zoom-toolbar {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.org-zoom-toolbar .mini-button {
  white-space: nowrap;
}

/* Zeitexport: Button bleibt sichtbar und bricht sauber um. */
.time-entry-export-form {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.time-entry-export-form .secondary-button,
.time-entry-export-form .mini-button {
  min-height: 42px;
}

/* Desktop / Tablet Zwischenstufe */
@media (max-width: 1180px) {
  .dashboard-grid,
  .employee-planning-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card-wide,
  .company-calendar-card,
  .employee-planning-calendar-card {
    grid-column: 1 / -1;
  }

  .calendar-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-filter-form .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .planning-info-grid,
  .calendar-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .position-permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .dashboard {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .dashboard-header,
  .google-calendar-header,
  .card-title-row,
  .organization-title-row,
  .employee-profile-title-row,
  .time-entry-filter-title-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .dashboard-header h1 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .header-actions,
  .button-row,
  .google-calendar-actions,
  .planning-nav-actions,
  .landing-actions,
  .landing-hero-actions,
  .landing-cta-actions {
    width: 100%;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .top-menu-dropdown {
    width: auto;
    max-width: 100%;
  }

  .top-menu-dropdown summary {
    width: auto;
    min-width: 132px;
  }

  .top-menu-panel {
    position: fixed;
    top: 78px;
    right: 12px;
    left: auto;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100svh - 96px);
    border-radius: 20px;
  }

  .dashboard-grid,
  .dashboard-two-columns,
  .employee-planning-summary-grid,
  .project-chart-layout,
  .landing-feature-grid,
  .landing-workflow,
  .landing-preview-grid,
  .landing-cta-box {
    grid-template-columns: 1fr !important;
  }

  .form-grid,
  .compact-form,
  .calendar-picker-form,
  .calendar-filter-form,
  .inline-create-form,
  .position-create-form,
  .position-title-edit,
  .employee-planning-picker-form,
  .superadmin-admin-form,
  .vacation-decision-form,
  .absence-request-form {
    grid-template-columns: 1fr !important;
  }

  .primary-button,
  .secondary-button,
  .primary-link-button,
  .secondary-link-button,
  .danger-button,
  .calendar-export-button,
  .position-manage-button,
  .employee-planning-picker-form .primary-button,
  .calendar-picker-form .primary-button,
  .calendar-filter-form .primary-button,
  .compact-form .primary-button,
  .inline-create-form .primary-button {
    width: 100%;
    grid-column: 1 / -1;
  }

  .time-entry-export-form,
  .time-entry-export-form .secondary-button,
  .time-entry-export-form .mini-button,
  .secondary-export-form {
    width: 100%;
  }

  .planning-nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .planning-nav-actions .mini-button {
    width: 100%;
  }

  .calendar-meta-grid,
  .planning-info-grid,
  .position-permission-grid {
    grid-template-columns: 1fr !important;
  }

  .table-card,
  .dashboard-card,
  .auth-card,
  .company-logo-upload-box,
  .org-people-overview,
  .org-group-card,
  .position-card-form {
    border-radius: 18px;
    padding: 18px;
  }

  table {
    min-width: 860px;
  }

  .compact-table {
    min-width: 660px;
  }

  .planning-calendar {
    min-width: 1780px;
  }

  .employee-readonly-planning-calendar {
    min-width: 1700px;
  }

  .planning-calendar th,
  .planning-calendar td {
    padding: 8px;
    font-size: 12px;
  }

  .calendar-cell,
  .employee-readonly-planning-cell {
    min-width: 108px;
    max-width: 108px;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    align-items: flex-start;
    padding: 18px 12px;
  }

  .dashboard {
    padding: 20px 10px;
  }

  .dashboard-header {
    margin-bottom: 20px;
  }

  .dashboard-card,
  .table-card,
  .auth-card,
  .auth-card.wide,
  .employee-form-card,
  .company-logo-upload-box,
  .org-people-overview,
  .org-group-card,
  .position-card-form {
    padding: 15px;
    border-radius: 16px;
  }

  .dashboard-header h1 {
    font-size: 26px;
    line-height: 1.08;
  }

  .eyebrow {
    font-size: 12px;
  }

  .top-menu-panel {
    top: 72px;
    right: 10px;
    width: calc(100vw - 20px);
  }

  .top-menu-panel a,
  .top-menu-panel button {
    min-height: 46px;
    font-size: 15px;
  }

  .card-title-row .mini-button,
  .card-title-row .primary-link-button,
  .card-title-row .secondary-link-button {
    width: 100%;
  }

  .button-row,
  .table-actions,
  .icon-action-row {
    align-items: stretch;
  }

  .table-actions .mini-button,
  .table-actions .mini-danger-button,
  .table-actions form,
  .table-actions form button {
    width: 100%;
  }

  .employee-profile-hero,
  .employee-dashboard-title-row,
  .company-org-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-org-logo-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .org-node,
  .horizontal-org-node {
    min-width: 230px;
    max-width: 260px;
  }

  .org-avatar {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .google-calendar-grid {
    grid-template-columns: repeat(7, minmax(136px, 1fr));
  }

  .google-calendar-day,
  .google-calendar-weekday {
    min-width: 136px;
  }

  .google-calendar-day {
    min-height: 150px;
  }

  .planning-calendar-wrap {
    max-height: 66svh;
  }

  .planning-calendar,
  .employee-readonly-planning-calendar {
    min-width: 1360px;
  }
}

/* Sehr kleine Geräte: Sticky-Spalten deaktivieren, damit nichts überlappt. */
@media (max-width: 440px) {
  .planning-calendar .sticky-col,
  .planning-calendar th.sticky-col,
  .employee-readonly-planning-calendar .sticky-col,
  .employee-readonly-planning-calendar th.sticky-col {
    position: static !important;
    left: auto !important;
  }

  .planning-calendar,
  .employee-readonly-planning-calendar {
    min-width: 1180px;
  }

  .calendar-cell,
  .employee-readonly-planning-cell {
    min-width: 98px;
    max-width: 98px;
  }

  .planning-nav-actions {
    grid-template-columns: 1fr;
  }
}
/* PLANNING VIEW MIRROR UPDATE */
.employee-planning-mirror-card {
  grid-column: 1 / -1;
}

.employee-planning-filter-form {
  grid-template-columns: repeat(7, minmax(120px, 1fr)) auto;
}

.employee-planning-summary-grid {
  margin-bottom: 20px;
}

.employee-planning-info-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.employee-readonly-planning-wrap {
  max-height: 720px;
}

.employee-readonly-planning-calendar .employee-col {
  left: 0;
  min-width: 145px;
  max-width: 145px;
}

.employee-readonly-planning-calendar .department-col {
  left: 145px;
  min-width: 120px;
  max-width: 120px;
}

.employee-readonly-planning-calendar .position-col {
  left: 265px;
  min-width: 120px;
  max-width: 120px;
}

.employee-readonly-planning-calendar .location-col {
  left: 385px;
  min-width: 115px;
  max-width: 115px;
}

.own-planning-row .sticky-col {
  background: #f8fafc;
}

.own-planning-row .employee-col strong::after {
  content: " · ich";
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.employee-readonly-planning-cell {
  min-width: 130px;
  max-width: 130px;
  padding: 9px;
  text-align: center;
}

.readonly-planning-shift,
.readonly-planning-main,
.readonly-planning-absence {
  display: block;
  line-height: 1.25;
}

.readonly-planning-shift {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #111827;
  margin-bottom: 4px;
}

.readonly-planning-main {
  font-size: 12px;
  font-weight: 800;
  color: #111827;
}

.readonly-planning-absence {
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .employee-planning-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-planning-filter-form .primary-button {
    grid-column: 1 / -1;
  }

  .employee-planning-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .employee-planning-summary-grid,
  .employee-planning-info-grid,
  .employee-planning-filter-form {
    grid-template-columns: 1fr !important;
  }

  .employee-planning-mirror-card .google-calendar-header {
    flex-direction: column;
  }

  .employee-planning-mirror-card .google-calendar-actions,
  .employee-planning-mirror-card .google-calendar-actions .mini-button {
    width: 100%;
  }

  .employee-readonly-planning-calendar {
    min-width: 1180px;
  }

  .employee-readonly-planning-calendar .employee-col {
    min-width: 120px;
    max-width: 120px;
  }

  .employee-readonly-planning-calendar .department-col,
  .employee-readonly-planning-calendar .position-col,
  .employee-readonly-planning-calendar .location-col {
    position: static;
    min-width: 105px;
    max-width: 105px;
  }

  .employee-readonly-planning-cell {
    min-width: 96px;
    max-width: 96px;
  }
}
/* TIME BALANCE + ABSENCE RULES UPDATE */
.saldo-overview-card {
  grid-column: span 2;
}

.saldo-hero-value {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f8fafc;
  margin-bottom: 16px;
}

.saldo-hero-value span {
  color: #6b7280;
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.saldo-hero-value strong {
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.saldo-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.saldo-metric-grid div {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  padding: 13px;
  min-height: 94px;
}

.saldo-metric-grid small {
  display: block;
  color: #6b7280;
  font-weight: 900;
  margin-bottom: 7px;
}

.saldo-metric-grid strong {
  display: block;
  color: #111827;
  font-size: 18px;
  margin-bottom: 4px;
}

.saldo-metric-grid span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.saldo-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 16px 0;
}

.saldo-absence-grid div:last-child {
  grid-column: span 1;
}

@media (max-width: 980px) {
  .saldo-overview-card {
    grid-column: 1 / -1;
  }

  .saldo-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .saldo-hero-value {
    align-items: flex-start;
    flex-direction: column;
  }

  .saldo-metric-grid {
    grid-template-columns: 1fr;
  }
}
/* EMPLOYEE EVENTS + DASHBOARD CLEANUP UPDATE */
.employee-data-combined-card .employee-data-divider {
  width: 100%;
  height: 1px;
  background: #e5e7eb;
  margin: 14px 0;
}

.employee-event-create-card {
  grid-column: 1 / -1;
}

.employee-event-form {
  margin-top: 12px;
}

.employee-event-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.employee-event-pill,
.employee-event-calendar-item {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.employee-event-pill.public,
.employee-event-calendar-item.public {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.employee-event-pill.private,
.employee-event-calendar-item.private {
  border-color: #e5e7eb;
  background: #f8fafc;
}

.planning-event-row td {
  background: #f8fafc;
}

.employee-event-calendar-cell {
  vertical-align: top;
}

.employee-event-calendar-item {
  width: 100%;
  margin-bottom: 6px;
  white-space: normal;
  text-align: left;
}

.employee-event-calendar-item small {
  color: #6b7280;
  font-weight: 800;
}

@media (max-width: 760px) {
  .employee-event-form {
    grid-template-columns: 1fr !important;
  }

  .employee-event-list {
    flex-direction: column;
  }

  .employee-event-pill {
    width: 100%;
  }
}
/* EVENT EDIT + LIVE TIME UPDATE */
.live-work-duration-box {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.live-work-duration-box small {
  color: #6b7280;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.live-work-duration-box strong {
  font-size: 28px;
  font-weight: 950;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

.employee-event-manage-list {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.employee-event-manage-list h3 {
  margin: 0;
  font-size: 17px;
}

.employee-event-manage-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
  background: #ffffff;
}

.employee-event-manage-card.public {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.employee-event-manage-card.private {
  background: #f8fafc;
}

.employee-event-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 240px;
  gap: 12px;
  align-items: end;
}

.employee-event-actions {
  display: flex;
  justify-content: flex-end;
}

.employee-event-delete-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.employee-event-readonly-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.employee-event-readonly-card .employee-event-date {
  color: #6b7280;
  font-weight: 900;
  font-size: 12px;
}

.employee-event-calendar-item small {
  display: block;
}

.own-planning-row .employee-col strong {
  color: #2563eb;
}

@media (max-width: 900px) {
  .employee-event-edit-form {
    grid-template-columns: 1fr;
  }

  .employee-event-actions,
  .employee-event-delete-form {
    justify-content: stretch;
  }

  .employee-event-actions .mini-success-button,
  .employee-event-delete-form .mini-danger-button {
    width: 100%;
  }

  .live-work-duration-box {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* OVERTIME + EMPLOYEE LIST CLEANUP UPDATE */
.employee-list-compact-table {
  min-width: 760px;
}

.employee-list-compact-table th,
.employee-list-compact-table td {
  white-space: nowrap;
}

.employee-list-compact-table td:nth-child(2),
.employee-list-compact-table th:nth-child(2) {
  min-width: 220px;
}

.overtime-hero-value small {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.saldo-allowance-grid {
  grid-template-columns: 1fr;
}

.saldo-allowance-grid > div {
  min-height: 92px;
}

@media (max-width: 760px) {
  .employee-list-compact-table {
    min-width: 680px;
  }

  .employee-list-compact-table th,
  .employee-list-compact-table td {
    padding: 11px 10px;
    font-size: 13px;
  }

  .overtime-hero-value strong {
    font-size: clamp(28px, 12vw, 46px);
  }
}
/* LIVE TIMER + BACKUP + PROJECT COLOR UPDATE */
.project-color-create-form {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 120px auto;
}

.project-color-create-form input[type="color"],
.project-management-page input[type="color"] {
  min-height: 46px;
  padding: 5px;
  cursor: pointer;
}

.project-color-dot {
  width: 20px;
  height: 20px;
  display: inline-flex;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #d1d5db;
}

.project-management-table {
  min-width: 860px;
}

.project-edit-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.project-edit-meta p {
  margin: 0;
}

.icon-action-button.download {
  background: #dbeafe;
  color: #1d4ed8;
}

.icon-action-button.delete,
.mini-danger-button {
  background: #fee2e2;
  color: #991b1b;
}

.icon-action-button.edit {
  background: #e5e7eb;
  color: #111827;
}

.live-work-duration-box strong {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .project-color-create-form {
    grid-template-columns: 1fr !important;
  }

  .project-color-create-form .primary-button {
    width: 100%;
  }

  .project-edit-meta {
    grid-template-columns: 1fr;
  }
}

/* MEINE PLANUNG TODAY AUTO SCROLL UPDATE */
.employee-readonly-planning-wrap {
  scroll-behavior: auto;
}

.employee-readonly-planning-calendar .planning-today-column {
  box-shadow: inset 3px 0 0 #2563eb, inset -3px 0 0 #2563eb;
}

.employee-readonly-planning-calendar th.planning-today-column,
.employee-readonly-planning-calendar .planning-today-header {
  background: #dbeafe !important;
  color: #1e3a8a;
}

.employee-readonly-planning-calendar td.planning-today-column {
  background-image: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
}

/* COMPANY OVERVIEW CALENDAR COMPACT LEFT COLUMNS v1
   Strafft in der Firmenübersicht die fixierten Spalten Mitarbeiter, Abteilung,
   Position und Standort. Dadurch rücken die Tages-Spalten deutlich weiter nach links. */
.company-calendar-card .planning-calendar {
  table-layout: fixed !important;
  width: max-content !important;
  min-width: max-content !important;
}

.company-calendar-card .planning-calendar .sticky-col {
  padding: 9px 10px !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.company-calendar-card .planning-calendar th.employee-col,
.company-calendar-card .planning-calendar td.employee-col {
  width: 138px !important;
  min-width: 138px !important;
  max-width: 138px !important;
  left: 0 !important;
}

.company-calendar-card .planning-calendar th.department-col,
.company-calendar-card .planning-calendar td.department-col {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  left: 138px !important;
}

.company-calendar-card .planning-calendar th.position-col,
.company-calendar-card .planning-calendar td.position-col {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  left: 230px !important;
}

.company-calendar-card .planning-calendar th.location-col,
.company-calendar-card .planning-calendar td.location-col {
  width: 84px !important;
  min-width: 84px !important;
  max-width: 84px !important;
  left: 334px !important;
}

.company-calendar-card .planning-calendar th.employee-col,
.company-calendar-card .planning-calendar th.department-col,
.company-calendar-card .planning-calendar th.position-col,
.company-calendar-card .planning-calendar th.location-col {
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.company-calendar-card .planning-calendar td.employee-col,
.company-calendar-card .planning-calendar td.department-col,
.company-calendar-card .planning-calendar td.position-col,
.company-calendar-card .planning-calendar td.location-col {
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.company-calendar-card .planning-calendar td.employee-col strong {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.company-calendar-card .planning-calendar td.employee-col small {
  display: block !important;
  margin-top: 4px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

.company-calendar-card .planning-calendar th:not(.sticky-col),
.company-calendar-card .planning-calendar td:not(.sticky-col) {
  min-width: 122px !important;
}

.company-calendar-card .planning-calendar-wrap {
  overflow-x: auto !important;
}

/* MEINE PLANUNG PROJECT SHIFT COLORS v1
   Zeigt Projektfarben aus Project.color_hex direkt im Meine-Planung-Kalender
   und unterscheidet Früh/Normal/Spät optisch. */
.employee-planning-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin: 14px 0 16px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
}

.employee-planning-color-legend-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.employee-planning-color-legend-section strong {
  margin-right: 2px;
  font-size: 12px;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.employee-planning-project-chip {
  --project-color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #e5e7eb;
  border-left: 5px solid var(--project-color);
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.employee-planning-project-chip-dot,
.readonly-project-color-dot {
  --project-color: #2563eb;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--project-color);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
  flex: 0 0 auto;
}

.employee-readonly-planning-calendar td.has-project-color {
  --project-color: #2563eb;
  position: relative;
  border-left: 6px solid var(--project-color) !important;
  background: #ffffff !important;
  background-image: linear-gradient(90deg, var(--project-color) 0 6px, rgba(255, 255, 255, 0.94) 6px 100%) !important;
}

.employee-readonly-planning-calendar td.has-project-color::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--project-color) 35%, #e5e7eb);
  pointer-events: none;
}

.employee-readonly-planning-calendar td.has-project-color .readonly-planning-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #0f172a;
  font-weight: 800;
}

.employee-readonly-planning-calendar td.has-project-color .readonly-planning-shift {
  margin-bottom: 6px;
}

.readonly-planning-shift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.readonly-planning-shift.shift-early,
.employee-readonly-planning-calendar td.shift-early .readonly-planning-shift {
  color: #92400e;
  background: #fef3c7;
  border-color: #f59e0b;
}

.readonly-planning-shift.shift-normal,
.employee-readonly-planning-calendar td.shift-normal .readonly-planning-shift {
  color: #1e40af;
  background: #dbeafe;
  border-color: #60a5fa;
}

.readonly-planning-shift.shift-late,
.employee-readonly-planning-calendar td.shift-late .readonly-planning-shift {
  color: #5b21b6;
  background: #ede9fe;
  border-color: #a78bfa;
}

.employee-readonly-planning-calendar td.has-project-color.shift-early {
  box-shadow: inset 0 4px 0 #f59e0b;
}

.employee-readonly-planning-calendar td.has-project-color.shift-normal {
  box-shadow: inset 0 4px 0 #60a5fa;
}

.employee-readonly-planning-calendar td.has-project-color.shift-late {
  box-shadow: inset 0 4px 0 #a78bfa;
}

.employee-readonly-planning-calendar td.has-project-color.shift-early::before,
.employee-readonly-planning-calendar td.has-project-color.shift-normal::before,
.employee-readonly-planning-calendar td.has-project-color.shift-late::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--project-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

@supports not (color: color-mix(in srgb, #000 20%, #fff)) {
  .employee-readonly-planning-calendar td.has-project-color::after {
    border-color: #e5e7eb;
  }
}

/* HOURLY WAGE DASHBOARD UPDATE v1
   Zeigt das berechnete Lohnguthaben für Stundenlöhner: Arbeitszeit × Stundenlohn. */
.hourly-wage-overview-card,
.hourly-wage-self-card {
  border-color: #bfdbfe !important;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%) !important;
}

.hourly-wage-summary-grid,
.hourly-wage-self-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.hourly-wage-summary-grid > div,
.hourly-wage-self-grid > div,
.hourly-wage-hero-value {
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.hourly-wage-summary-grid small,
.hourly-wage-self-grid small,
.hourly-wage-hero-value span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hourly-wage-summary-grid strong,
.hourly-wage-self-grid strong,
.hourly-wage-hero-value strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
}

.hourly-wage-hero-value strong {
  font-size: 34px;
}

.hourly-wage-summary-grid span,
.hourly-wage-self-grid span,
.hourly-wage-hero-value small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.hourly-wage-table td strong {
  color: #0f172a;
}

.hourly-wage-table td small {
  display: block;
  margin-top: 3px;
  color: #64748b;
}

/* HOURLY WAGE SALDO CARD UPDATE v2
   Lohnguthaben gehört in die Saldo-Kachel des Mitarbeiter-Dashboards. */
.saldo-hourly-wage-box {
  border-color: #bfdbfe !important;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.saldo-hourly-wage-box small {
  color: #1d4ed8 !important;
}

.saldo-hourly-wage-box strong {
  color: #0f172a !important;
  font-size: 24px;
}

.saldo-hourly-wage-box span {
  color: #475569 !important;
  font-weight: 600;
}

/* TAP Aufgaben-Tracking Feldtest */
.task-switch-form {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.75);
}

.task-switch-form .muted {
  margin-top: 0.5rem;
  font-size: 0.88rem;
}

.alert.success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

/* TASK COLUMN UPDATE - Time entries v5 */
.time-entry-task-pill {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.time-entry-project-cell,
.time-entry-task-cell {
    min-width: 130px;
}

.time-entry-note-cell {
    min-width: 180px;
    max-width: 320px;
    white-space: normal;
    word-break: break-word;
}


/* TAP UPDATE 2026-06-08 - Company Overview Downloads + separate Firmen Planung */

.project-card-wide,
.company-overview-projects-wide {
  grid-column: 1 / -1 !important;
}

.company-download-split-card {
  min-height: 100%;
}

.company-download-split-card h2 {
  margin-bottom: 8px;
}

.company-download-split-card p {
  margin-top: 0;
}

.company-download-split-links,
.company-download-split-card .download-export-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.company-planning-page {
  max-width: 1720px;
}

.company-planning-header {
  align-items: flex-start;
}

.planning-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 22px;
  align-items: stretch;
  padding: 26px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
}

.planning-hero-card h2 {
  margin: 6px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
}

.planning-hero-card p {
  max-width: 760px;
  color: #64748b;
}

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

.planning-hero-stats div {
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.planning-hero-stats strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: #0f172a;
}

.planning-hero-stats span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}

.planning-filter-card,
.planning-calendar-card {
  grid-column: 1 / -1;
}

.planning-filter-form {
  align-items: end;
}

.planning-month-nav {
  justify-content: flex-end;
}

.planning-calendar-title-row {
  align-items: flex-start;
}

.planning-mode-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.planning-mode-panel > span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.planning-mode-panel label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.professional-planning-calendar-wrap {
  max-height: calc(100vh - 310px);
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.professional-planning-calendar {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.professional-planning-calendar th,
.professional-planning-calendar td {
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.professional-planning-calendar thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  min-width: 112px;
  padding: 12px 10px;
  background: #f8fafc;
  color: #475569;
  text-align: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.professional-planning-calendar thead th.weekend-head {
  background: #fff7ed;
  color: #c2410c;
}

.professional-planning-calendar thead th span,
.professional-planning-calendar thead th small {
  display: block;
}

.professional-planning-calendar thead th span {
  margin-top: 4px;
  color: #0f172a;
  font-size: 18px;
  letter-spacing: normal;
}

.professional-planning-calendar .sticky-col {
  position: sticky;
  background: #ffffff;
  z-index: 6;
}

.professional-planning-calendar thead .sticky-col {
  z-index: 12;
  background: #eef2ff;
}

.professional-planning-calendar .employee-col {
  left: 0;
  min-width: 220px;
  max-width: 220px;
}

.professional-planning-calendar .department-col {
  left: 220px;
  min-width: 150px;
  max-width: 150px;
}

.professional-planning-calendar .position-col {
  left: 370px;
  min-width: 150px;
  max-width: 150px;
}

.professional-planning-calendar .location-col {
  left: 520px;
  min-width: 145px;
  max-width: 145px;
}

.employee-name-cell strong,
.employee-name-cell small {
  display: block;
}

.employee-name-cell small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.professional-calendar-cell {
  min-width: 112px;
  max-width: 112px;
  height: 82px;
  padding: 7px;
  background: #ffffff;
  vertical-align: top;
}

.professional-calendar-cell.empty {
  background: #ffffff;
}

.professional-calendar-cell.weekend {
  background: #fff7ed;
}

.professional-calendar-cell.planned {
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.07), rgba(37, 99, 235, 0.02)),
    #ffffff;
}

.professional-calendar-cell[style*="--planning-project-color"] {
  box-shadow: inset 4px 0 0 var(--planning-project-color);
}

.calendar-cell-planning-form {
  display: grid;
  gap: 6px;
}

.calendar-cell-planning-form select {
  width: 100%;
  min-height: 30px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 12px;
  padding: 4px 7px;
}

.calendar-cell-planning-form select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  border-color: #2563eb;
}

.planning-locked-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 6px;
  border-radius: 14px;
  background: #f1f5f9;
  color: #475569;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.planning-scope-applied {
  animation: planningScopeFlash 900ms ease;
}

@keyframes planningScopeFlash {
  0% {
    box-shadow: inset 0 0 0 999px rgba(34, 197, 94, 0.22);
  }

  100% {
    box-shadow: inset 0 0 0 999px rgba(34, 197, 94, 0);
  }
}

.professional-calendar-actions {
  position: sticky;
  bottom: 0;
  z-index: 15;
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid #e5e7eb;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .planning-hero-card {
    grid-template-columns: 1fr;
  }

  .planning-hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .planning-mode-panel,
  .planning-month-nav {
    justify-content: stretch;
    width: 100%;
  }

  .professional-planning-calendar {
    min-width: 1800px;
  }
}

@media (max-width: 640px) {
  .planning-hero-stats {
    grid-template-columns: 1fr;
  }

  .planning-hero-card {
    padding: 18px;
    border-radius: 22px;
  }
}


/* TAP DASHBOARD NOTE UPDATE */
.dashboard-note-label {
  display: grid;
  gap: 7px;
}

.dashboard-note-textarea {
  width: 100%;
  min-height: 74px;
  max-height: 140px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  line-height: 1.35;
}

.dashboard-note-textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.2);
  border-color: #2563eb;
}

.dashboard-clock-out-form {
  margin-top: 14px;
}

/* TAP ORG FOCUS UPDATE */
.org-focus-page .company-org-chart-card {
  overflow: hidden;
}

.focus-org-header {
  align-items: center;
}

.focus-org-view-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.focus-org-view-actions .mini-button.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.org-focus-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(190px, 0.65fr));
  gap: 12px;
  margin: 0 0 16px;
}

.org-focus-summary-card {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.org-focus-summary-card.primary {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 40%),
    #ffffff;
  border-color: #bfdbfe;
}

.org-focus-summary-card span,
.org-focus-summary-card small {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.org-focus-summary-card strong {
  display: block;
  margin: 7px 0;
  color: #0f172a;
  font-size: 18px;
}

.compact-org-people-overview {
  padding: 14px;
  margin-bottom: 14px;
}

.compact-org-filter-toolbar {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
}

.compact-org-group-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-org-group-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.compact-org-group-button {
  padding: 11px 12px;
  min-height: 76px;
}

.compact-org-group-button small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.focus-org-chart-wrap {
  min-height: 420px;
  max-height: 620px;
  padding: 22px 0 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e5e7eb;
}

.focus-horizontal-org-chart {
  padding: 0 28px;
}

.focus-horizontal-org-chart,
.focus-horizontal-org-chart ul {
  gap: 18px;
}

.focus-horizontal-org-chart li > ul {
  margin-top: 34px;
}

.focus-horizontal-org-chart li > ul::before,
.focus-horizontal-org-chart li > ul > li::before {
  background: #cbd5e1;
}

.focus-org-node {
  min-width: 205px;
  max-width: 235px;
  padding: 12px;
  border-radius: 18px;
  transform-origin: center;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.focus-org-node .org-avatar {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.focus-org-node .org-info strong {
  font-size: 13px;
}

.focus-org-node .org-info span,
.focus-org-node .org-info small {
  font-size: 11px;
}

.focus-org-node.is-current-user {
  border-color: #2563eb;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 45%),
    #ffffff;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.22);
  transform: translateY(-2px) scale(1.04);
  z-index: 6;
}

.focus-org-node.is-current-user .org-avatar {
  outline: 3px solid rgba(37, 99, 235, 0.22);
}

.focus-org-node.is-manager-path {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.org-focus-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.org-focus-badge.manager {
  background: #0f172a;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.focus-org-node.org-node-match {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 16px 32px rgba(22, 163, 74, 0.16);
  opacity: 1;
}

.focus-org-node.org-node-muted {
  opacity: 0.28;
  filter: grayscale(0.55);
}

.focus-org-zoom-toolbar {
  margin-top: 8px;
  margin-bottom: 12px;
}

@media (max-width: 980px) {
  .focus-org-header {
    align-items: flex-start;
  }

  .focus-org-view-actions {
    width: 100%;
    margin-left: 0;
  }

  .org-focus-summary-grid {
    grid-template-columns: 1fr;
  }

  .compact-org-filter-toolbar,
  .compact-org-group-grid {
    grid-template-columns: 1fr;
  }

  .focus-org-node {
    min-width: 190px;
  }
}

/* TAP ORG VERTICAL TOGGLE UPDATE */
.focus-org-chart-wrap,
.horizontal-org-chart-wrap.focus-org-chart-wrap {
  min-height: 520px;
  max-height: 760px;
  overflow: auto;
  padding: 26px 18px 34px;
}

.focus-org-chart-wrap .horizontal-org-chart-stage {
  width: 100% !important;
  min-width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
}

.focus-org-chart-wrap .horizontal-org-chart-scale {
  position: relative !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  transform-origin: top center !important;
}

.focus-horizontal-org-chart,
.org-chart.horizontal-org-chart.focus-horizontal-org-chart {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 22px !important;
  width: min(920px, 100%) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 10px 0 34px !important;
}

.focus-horizontal-org-chart,
.focus-horizontal-org-chart ul,
.focus-horizontal-org-chart li {
  list-style: none !important;
}

.focus-horizontal-org-chart li {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.focus-horizontal-org-chart li > a.focus-org-node,
.focus-horizontal-org-chart li > a.org-node {
  width: min(420px, 100%) !important;
  min-width: 280px !important;
  max-width: 420px !important;
  margin: 0 auto !important;
}

.focus-horizontal-org-chart li > ul {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  justify-items: center !important;
  align-items: start !important;
  gap: 22px !important;
  width: 100% !important;
  margin: 42px auto 0 !important;
  padding: 0 !important;
}

.focus-horizontal-org-chart li > ul::before {
  content: "" !important;
  position: absolute !important;
  top: -28px !important;
  left: 50% !important;
  width: 2px !important;
  height: 28px !important;
  transform: translateX(-50%) !important;
  background: #cbd5e1 !important;
}

.focus-horizontal-org-chart li > ul > li::before {
  content: "" !important;
  position: absolute !important;
  top: -22px !important;
  left: 50% !important;
  width: 2px !important;
  height: 22px !important;
  transform: translateX(-50%) !important;
  background: #cbd5e1 !important;
}

.focus-horizontal-org-chart li > ul > li::after {
  content: none !important;
}

.focus-horizontal-org-chart > li:not(:only-child) {
  margin-bottom: 24px !important;
}

.focus-horizontal-org-chart > li + li {
  margin-top: 22px !important;
  padding-top: 22px !important;
  border-top: 1px dashed #cbd5e1 !important;
}

.focus-org-node.is-current-user {
  width: min(460px, 100%) !important;
  max-width: 460px !important;
}

.focus-org-node.org-node-match {
  transform: translateY(-2px) scale(1.03);
}

.focus-org-node.org-node-muted {
  opacity: 0.34;
}

.focus-org-zoom-toolbar [data-org-zoom="out"],
.focus-org-zoom-toolbar [data-org-zoom="in"],
.focus-org-zoom-toolbar [data-org-zoom="reset"],
.focus-org-zoom-toolbar [data-org-zoom-value] {
  display: none !important;
}

.focus-org-zoom-toolbar [data-org-zoom="fit"] {
  min-width: 140px;
}

@media (max-width: 760px) {
  .focus-horizontal-org-chart li > ul {
    grid-template-columns: 1fr !important;
  }

  .focus-horizontal-org-chart li > a.focus-org-node,
  .focus-horizontal-org-chart li > a.org-node {
    min-width: 0 !important;
    width: 100% !important;
  }
}

/* TAP PROFESSIONAL ORG BOARD UPDATE */
.professional-org-board-card {
  overflow: hidden;
}

.professional-org-board-header {
  align-items: center;
}

.professional-org-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.professional-org-actions .mini-button.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.org-hidden-dataset {
  display: none !important;
}

.professional-org-controls {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #f8fafc;
}

.professional-org-filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
  gap: 12px;
  align-items: end;
}

.professional-org-filter-grid label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 800;
  font-size: 13px;
}

.professional-org-filter-grid select,
.professional-org-filter-grid input {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0 12px;
  font: inherit;
}

.professional-org-summary {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-weight: 800;
}

.professional-org-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.professional-org-group-card {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
}

.professional-org-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.professional-org-group-button {
  display: grid;
  gap: 8px;
  min-height: 84px;
  padding: 13px;
  border-radius: 16px;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.professional-org-group-button:hover {
  transform: translateY(-1px);
  border-color: #14b8a6;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.12);
}

.professional-org-group-button.active {
  border-color: #0f766e;
  background: #ecfdf5;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.14);
}

.professional-org-group-button-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.professional-org-group-button-head strong {
  color: #0f172a;
  font-size: 14px;
}

.professional-org-group-button-head em {
  display: inline-flex;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #0f766e;
  color: #ffffff;
  font-style: normal;
  font-weight: 900;
}

.professional-org-group-button small {
  color: #64748b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.professional-org-board-shell {
  margin-top: 18px;
  border: 1px solid #dbe3ef;
  border-radius: 26px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: auto;
}

.professional-org-board-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
}

.professional-org-board-toolbar h3 {
  margin: 0;
}

.professional-org-board-toolbar p {
  margin: 4px 0 0;
}

.professional-org-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.professional-org-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.professional-org-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.legend-current {
  background: #2563eb;
}

.legend-manager {
  background: #0f172a;
}

.legend-match {
  background: #0f766e;
}

.professional-org-board {
  min-width: 980px;
  padding: 28px 26px 34px;
}

.professional-org-top {
  display: flex;
  justify-content: center;
}

.professional-org-top-card {
  width: min(620px, 100%);
  padding: 16px 18px 18px;
  border: 2px solid #94a3b8;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.professional-org-top-card span {
  display: block;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.professional-org-top-card strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 18px;
}

.professional-org-top-card small {
  display: block;
  margin-top: 5px;
  color: #64748b;
}

.professional-org-top-card::after,
.professional-org-department-header::after {
  content: "";
  display: block;
  height: 7px;
  margin-top: 12px;
  background: #0faaa8;
}

.professional-org-leadership-row {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 42px auto 0;
  padding-top: 24px;
}

.professional-org-leadership-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 2px;
  background: #94a3b8;
}

.professional-org-leadership-row .professional-org-person-card::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  width: 2px;
  height: 24px;
  transform: translateX(-50%);
  background: #94a3b8;
}

.professional-org-main-line {
  width: 2px;
  height: 34px;
  margin: 18px auto 0;
  background: #94a3b8;
}

.professional-org-department-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 22px;
  margin-top: 0;
  padding-top: 34px;
}

.professional-org-department-board::before {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 2px;
  background: #94a3b8;
}

.professional-org-department-column {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  transition: opacity 160ms ease, filter 160ms ease;
}

.professional-org-department-column::before {
  content: "";
  position: absolute;
  top: -34px;
  left: 50%;
  width: 2px;
  height: 34px;
  transform: translateX(-50%);
  background: #94a3b8;
}

.professional-org-department-header {
  padding: 12px 12px 13px;
  border: 2px solid #94a3b8;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.professional-org-department-header strong {
  color: #0f172a;
  font-size: 14px;
}

.professional-org-department-header span {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  margin-left: 8px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #0f766e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.professional-org-person-list {
  display: grid;
  gap: 10px;
}

.professional-org-person-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0faaa8;
  border-radius: 4px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.professional-org-person-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

.professional-org-avatar {
  display: inline-flex;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 900;
  font-size: 12px;
}

.professional-org-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.professional-org-person-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.professional-org-person-body strong,
.professional-org-person-body span,
.professional-org-person-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.professional-org-person-body strong {
  color: #0f172a;
  font-size: 13px;
}

.professional-org-person-body span {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.professional-org-person-body small {
  color: #64748b;
  font-size: 11px;
}

.professional-org-person-badge {
  position: absolute;
  top: -9px;
  right: 8px;
  display: inline-flex;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.professional-org-person-badge.manager {
  background: #0f172a;
}

.professional-org-person-card.is-current-user {
  border-color: #2563eb;
  border-left-color: #2563eb;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.18);
}

.professional-org-person-card.is-manager-path {
  border-left-color: #0f172a;
}

.professional-org-person-card.org-board-match {
  border-color: #0f766e;
  border-left-color: #0f766e;
  background: #ecfdf5;
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.16);
  transform: translateY(-1px) scale(1.015);
}

.professional-org-person-card.org-board-muted {
  opacity: 0.25;
  filter: grayscale(0.8);
}

.professional-org-department-column.org-board-column-muted {
  opacity: 0.55;
}

.professional-org-department-column.org-board-column-match .professional-org-department-header {
  border-color: #0f766e;
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.14);
}

.professional-org-board-shell.is-compact-mode .professional-org-person-card {
  min-height: 48px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 7px 8px;
}

.professional-org-board-shell.is-compact-mode .professional-org-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.professional-org-board-shell.is-compact-mode .professional-org-person-body span,
.professional-org-board-shell.is-compact-mode .professional-org-person-body small {
  display: none;
}

@media (max-width: 980px) {
  .professional-org-board-header {
    align-items: flex-start;
  }

  .professional-org-actions {
    width: 100%;
    margin-left: 0;
  }

  .professional-org-filter-grid,
  .professional-org-groups {
    grid-template-columns: 1fr;
  }

  .professional-org-board {
    min-width: 820px;
  }
}

/* TAP ORG DEPARTMENT LEADS UPDATE */
.department-lead-org-board {
  min-width: 1040px;
}

.department-lead-board {
  align-items: start;
}

.department-lead-column {
  gap: 0;
}

.department-lead-header {
  position: relative;
  margin-bottom: 34px;
}

.department-lead-header::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 2px;
  height: 34px;
  transform: translateX(-50%);
  background: #64748b;
}

.department-lead-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 42px;
}

.department-lead-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -34px;
  width: 2px;
  height: 34px;
  transform: translateX(-50%);
  background: #64748b;
}

.professional-org-person-card.department-lead {
  width: min(250px, 100%);
  border-left-color: #0f172a;
  border-color: #94a3b8;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.10);
}

.department-team-tree {
  position: relative;
  display: grid;
  gap: 12px;
  padding-left: 24px;
}

.department-team-tree::before {
  content: "";
  position: absolute;
  top: -42px;
  left: 10px;
  width: 3px;
  height: calc(100% + 20px);
  background: #111827;
  border-radius: 999px;
}

.department-team-member {
  position: relative;
}

.department-team-member::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -14px;
  width: 14px;
  height: 3px;
  transform: translateY(-50%);
  background: #111827;
  border-radius: 999px;
}

.professional-org-person-card.department-member {
  min-height: 64px;
}

.professional-org-board-shell.is-compact-mode .department-team-tree {
  gap: 8px;
}

.professional-org-board-shell.is-compact-mode .department-team-tree::before {
  top: -36px;
}

.professional-org-board-shell.is-compact-mode .department-lead-wrap {
  margin-bottom: 34px;
}

@media (max-width: 980px) {
  .department-lead-org-board {
    min-width: 900px;
  }
}

/* TAP ORG LOGO HEADER UPDATE */
.org-page-title-header > div:first-child {
  display: grid;
  justify-items: start;
}

.org-title-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: min(220px, 100%);
  min-height: 74px;
  margin: 10px 0 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.org-title-logo-wrap img {
  display: block;
  max-width: 220px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.no-separate-org-logo-card .company-org-logo-wrap {
  display: none !important;
}

.org-leadership-logo-card {
  position: relative;
  overflow: hidden;
  min-height: 124px;
}

.org-leadership-logo-card .org-leadership-logo-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: min(360px, 72%);
  max-height: 86px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  opacity: 0.13;
  filter: grayscale(0.15);
  pointer-events: none;
}

.org-leadership-logo-card span,
.org-leadership-logo-card small {
  position: relative;
  z-index: 1;
}

.org-leadership-logo-card span {
  margin-top: 8px;
}

.org-leadership-logo-card small {
  margin-top: 44px;
}

.org-leadership-logo-card strong {
  display: none !important;
}

@media (max-width: 760px) {
  .org-title-logo-wrap {
    width: min(180px, 100%);
    min-height: 58px;
  }

  .org-title-logo-wrap img {
    max-width: 180px;
    max-height: 58px;
  }

  .org-leadership-logo-card .org-leadership-logo-watermark {
    width: min(260px, 80%);
  }
}

/* TAP COMPANY PLANNING COMPACT EMPLOYEE UPDATE */
.company-planning-page .professional-planning-calendar {
  min-width: max(1500px, calc(260px + (var(--planning-day-count, 31) * 82px)));
}

.company-planning-page .planning-calendar .employee-col,
.company-planning-page .professional-planning-calendar .employee-col,
.company-planning-page .planning-calendar .planning-employee-col {
  left: 0;
  min-width: 255px;
  width: 255px;
  max-width: 255px;
  z-index: 12;
}

.company-planning-page .professional-planning-calendar thead .employee-col {
  z-index: 18;
}

.company-planning-page .planning-calendar .department-col,
.company-planning-page .planning-calendar .position-col,
.company-planning-page .planning-calendar .location-col {
  display: none;
}

.planning-employee-profile-cell {
  padding: 12px 10px !important;
  vertical-align: middle;
}

.planning-employee-profile {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.planning-employee-profile strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
}

.planning-employee-role {
  display: block;
  color: #2563eb;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.planning-employee-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.planning-employee-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-mode-button-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.planning-mode-button-panel > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid #e5e7eb;
}

.planning-mode-button {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.planning-mode-button:hover {
  transform: translateY(-1px);
  border-color: #2563eb;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.planning-mode-button.active,
.planning-mode-button[aria-pressed="true"] {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.2);
}

.company-planning-page .professional-calendar-cell {
  min-width: 78px;
}

@media (max-width: 980px) {
  .company-planning-page .planning-calendar .employee-col,
  .company-planning-page .professional-planning-calendar .employee-col,
  .company-planning-page .planning-calendar .planning-employee-col {
    min-width: 220px;
    width: 220px;
    max-width: 220px;
  }

  .planning-mode-button-panel {
    justify-content: flex-start;
  }
}

/* TAP COMPANY PLANNING EXCEL EXPORT BUTTON UPDATE */
.planning-calendar-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.planning-excel-export-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.planning-excel-export-button {
  min-height: 38px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .planning-calendar-toolbar-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

/* TAP COMPANY PLANNING STACKED SELECTS TODAY UPDATE */
.company-planning-page .professional-calendar-cell {
  min-width: 72px;
  max-width: 72px;
  height: 76px;
  padding: 6px;
}

.company-planning-page .calendar-cell-planning-form {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 30px 28px;
  gap: 4px;
  align-content: center;
}

.company-planning-page .calendar-cell-planning-form select {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 28px;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1;
}

.company-planning-page .planning-project-select {
  grid-row: 1;
  font-weight: 800;
}

.company-planning-page .planning-shift-select {
  grid-row: 2;
}

.company-planning-page .planning-shift-select option,
.company-planning-page .planning-project-select option {
  font-size: 12px;
}

.company-planning-page .professional-planning-calendar thead th[data-planning-day] {
  min-width: 72px;
  max-width: 72px;
}

.company-planning-page .planning-today-column {
  background: #111827 !important;
  color: #ffffff !important;
  box-shadow: inset 0 -4px 0 #2563eb;
}

.company-planning-page .planning-today-column span,
.company-planning-page .planning-today-column small {
  color: #ffffff !important;
}

.company-planning-page .planning-today-column-cell {
  box-shadow:
    inset 3px 0 0 #2563eb,
    inset -3px 0 0 #2563eb;
}

.company-planning-page .planning-today-column-cell.weekend {
  box-shadow:
    inset 3px 0 0 #2563eb,
    inset -3px 0 0 #2563eb;
}

.company-planning-page .planning-calendar-toolbar-actions {
  gap: 10px;
}

.company-planning-page .planning-mode-button {
  min-height: 38px;
}

@media (max-width: 980px) {
  .company-planning-page .professional-calendar-cell,
  .company-planning-page .professional-planning-calendar thead th[data-planning-day] {
    min-width: 70px;
    max-width: 70px;
  }
}

/* TAP COMPANY PLANNING RECALCULATED CELLS REDIRECT UPDATE */
.company-planning-page {
  --planning-employee-column-width-v2: 244px;
  --planning-day-column-width-v2: 88px;
}

.company-planning-page .planning-calendar .employee-col,
.company-planning-page .professional-planning-calendar .employee-col,
.company-planning-page .planning-calendar .planning-employee-col {
  min-width: var(--planning-employee-column-width-v2) !important;
  width: var(--planning-employee-column-width-v2) !important;
  max-width: var(--planning-employee-column-width-v2) !important;
}

.company-planning-page .professional-planning-calendar thead th[data-planning-day],
.company-planning-page .professional-calendar-cell {
  min-width: var(--planning-day-column-width-v2) !important;
  width: var(--planning-day-column-width-v2) !important;
  max-width: var(--planning-day-column-width-v2) !important;
}

.company-planning-page .professional-calendar-cell {
  height: 74px !important;
  padding: 5px !important;
}

.company-planning-page .calendar-cell-planning-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: 28px 26px !important;
  gap: 4px !important;
  align-content: center !important;
  justify-content: stretch !important;
  width: 100% !important;
}

.company-planning-page .calendar-cell-planning-form select,
.company-planning-page .planning-project-select,
.company-planning-page .planning-shift-select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 4px !important;
  border-radius: 9px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

.company-planning-page .planning-project-select {
  font-weight: 800 !important;
}

.company-planning-page .planning-shift-select {
  font-weight: 700 !important;
}

.company-planning-page .planning-employee-profile-cell {
  padding: 10px 9px !important;
}

.company-planning-page .planning-employee-profile strong {
  font-size: 12.5px !important;
}

.company-planning-page .planning-employee-role {
  font-size: 11.5px !important;
}

.company-planning-page .planning-employee-meta span {
  padding: 2px 6px !important;
  font-size: 9.5px !important;
}

.company-planning-page .planning-today-column-cell {
  box-shadow:
    inset 4px 0 0 #2563eb,
    inset -4px 0 0 #2563eb !important;
}

.company-planning-page .planning-today-column {
  position: sticky;
  top: 0;
  z-index: 20;
}

@media (max-width: 980px) {
  .company-planning-page {
    --planning-employee-column-width-v2: 220px;
    --planning-day-column-width-v2: 84px;
  }
}

/* TAP COMPANY PLANNING COLGROUP SCROLL FIX */
.company-planning-page {
  --planning-employee-column-final: 226px;
  --planning-day-column-final: 96px;
}

.company-planning-page .professional-planning-calendar {
  table-layout: fixed !important;
  width: max-content !important;
  min-width: max-content !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.company-planning-page .planning-calendar-employee-col {
  width: var(--planning-employee-column-final) !important;
  min-width: var(--planning-employee-column-final) !important;
  max-width: var(--planning-employee-column-final) !important;
}

.company-planning-page .planning-calendar-day-col {
  width: var(--planning-day-column-final) !important;
  min-width: var(--planning-day-column-final) !important;
  max-width: var(--planning-day-column-final) !important;
}

.company-planning-page .planning-calendar .employee-col,
.company-planning-page .professional-planning-calendar .employee-col,
.company-planning-page .planning-calendar .planning-employee-col {
  left: 0 !important;
  min-width: var(--planning-employee-column-final) !important;
  width: var(--planning-employee-column-final) !important;
  max-width: var(--planning-employee-column-final) !important;
  z-index: 40 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border-right: 1px solid #dbe3ef !important;
}

.company-planning-page .professional-planning-calendar thead .employee-col {
  z-index: 60 !important;
}

.company-planning-page .professional-planning-calendar thead th[data-planning-day],
.company-planning-page .professional-calendar-cell {
  min-width: var(--planning-day-column-final) !important;
  width: var(--planning-day-column-final) !important;
  max-width: var(--planning-day-column-final) !important;
  box-sizing: border-box !important;
}

.company-planning-page .professional-calendar-cell {
  position: relative !important;
  z-index: 1 !important;
  height: 74px !important;
  padding: 5px 6px !important;
  overflow: visible !important;
}

.company-planning-page .calendar-cell-planning-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 28px 26px !important;
  gap: 4px !important;
  width: 100% !important;
  max-width: 100% !important;
  align-content: center !important;
  justify-content: stretch !important;
  overflow: visible !important;
}

.company-planning-page .calendar-cell-planning-form select,
.company-planning-page .planning-project-select,
.company-planning-page .planning-shift-select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 26px !important;
  min-height: 26px !important;
  box-sizing: border-box !important;
  padding: 0 3px !important;
  border-radius: 9px !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
  text-align: left !important;
}

.company-planning-page .planning-project-select {
  font-weight: 850 !important;
}

.company-planning-page .planning-shift-select {
  font-weight: 750 !important;
}

.company-planning-page .planning-employee-profile-cell {
  padding: 10px 8px !important;
}

.company-planning-page .planning-employee-profile strong {
  font-size: 12.25px !important;
  line-height: 1.2 !important;
}

.company-planning-page .planning-employee-role {
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.company-planning-page .planning-employee-meta {
  gap: 4px !important;
}

.company-planning-page .planning-employee-meta span {
  padding: 2px 5px !important;
  font-size: 9px !important;
}

.company-planning-page .planning-today-column {
  background: #111827 !important;
  color: #ffffff !important;
  box-shadow: inset 0 -4px 0 #2563eb !important;
}

.company-planning-page .planning-today-column span,
.company-planning-page .planning-today-column small {
  color: #ffffff !important;
}

.company-planning-page .planning-today-column-cell {
  box-shadow:
    inset 4px 0 0 #2563eb,
    inset -4px 0 0 #2563eb !important;
}

@media (max-width: 980px) {
  .company-planning-page {
    --planning-employee-column-final: 218px;
    --planning-day-column-final: 94px;
  }
}

/* TAP PRODUCTION BACKUP MANAGER UPDATE */
.production-backup-card {
  grid-column: 1 / -1;
}

.production-backup-card .alert {
  margin: 12px 0;
}

.production-backup-actions {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: end;
  margin: 16px 0 18px;
}

.production-backup-create-form,
.production-backup-upload-form {
  display: grid;
  gap: 10px;
  align-items: end;
}

.production-backup-upload-form {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.production-backup-upload-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  color: #334155;
}

.production-backup-upload-form input[type="file"] {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
}

.production-backup-table td strong,
.production-backup-table td small {
  display: block;
}

.production-backup-table td small {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.production-backup-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.production-backup-restore-form {
  display: inline-flex;
  margin: 0;
}

.mini-button.danger-soft,
button.mini-button.danger-soft {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.mini-button.danger-soft:hover,
button.mini-button.danger-soft:hover {
  border-color: #ef4444;
  background: #fee2e2;
}

.production-backup-info {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.45;
}

.production-backup-info strong {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .production-backup-actions,
  .production-backup-upload-form {
    grid-template-columns: 1fr;
  }

  .production-backup-row-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .production-backup-row-actions .mini-button,
  .production-backup-row-actions button {
    width: 100%;
  }

  .production-backup-info {
    display: grid;
  }
}

/* TAP TIME ENTRIES COMPACT ACTIONS UPDATE */
.time-entries-table-compact-self th,
.time-entries-table-compact-self td {
  white-space: nowrap;
}

.time-entries-table-compact-self .time-entry-note-cell {
  min-width: 220px;
  max-width: 360px;
  white-space: normal;
}

.icon-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-table-actions form {
  margin: 0;
}

.icon-action-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1rem;
}

@media (max-width: 700px) {
  .icon-table-actions {
    flex-direction: row;
    justify-content: flex-start;
  }

  .icon-table-actions .icon-action-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }
}

.mini-icon-button:hover {
  transform: translateY(-1px);
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.mini-icon-button.danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.mini-icon-button.danger:hover {
  border-color: #ef4444;
  background: #fee2e2;
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.14);
}
/* =========================================================
   Meine Zeiteinträge heute - kompakt ohne horizontalen Scroll
   ========================================================= */

.today-time-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
}

.today-time-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

.today-time-table th,
.today-time-table td {
  padding: 8px 6px;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  font-size: 0.86rem;
  vertical-align: middle;
}

.today-time-table .today-col-project {
  width: 34%;
}

.today-time-table .today-col-time {
  width: 13%;
}

.today-time-table .today-col-break {
  width: 18%;
}

.today-time-table .today-col-actions {
  width: 22%;
}

.today-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
}

.today-entry-actions form {
  margin: 0;
}

.today-entry-actions .icon-action-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .today-time-table-wrap {
    overflow-x: visible !important;
  }

  .today-time-table {
    min-width: 0 !important;
    width: 100% !important;
  }

  .today-time-table th,
  .today-time-table td {
    padding: 7px 4px;
    font-size: 0.78rem;
  }

  .today-time-table th:nth-child(4),
  .today-time-table td:nth-child(4) {
    text-align: center;
  }

  .today-entry-actions {
    gap: 4px;
  }

  .today-entry-actions .icon-action-button {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    border-radius: 9px;
    font-size: 0.85rem;
  }
}

@media (max-width: 390px) {
  .today-time-table th,
  .today-time-table td {
    padding: 6px 3px;
    font-size: 0.72rem;
  }

  .today-entry-actions .icon-action-button {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    font-size: 0.8rem;
  }
}
/* TAP TIME ENTRIES ACTION FIRST UPDATE */
.time-entries-action-first-table .time-entry-action-head,
.time-entries-action-first-table .time-entry-action-cell {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  text-align: center;
  white-space: nowrap;
}

.time-entries-action-first-table .time-entry-action-cell {
  padding-left: 8px;
  padding-right: 8px;
}

.time-entries-action-first-table .icon-table-actions {
  justify-content: center;
}

/* TAP UNIFIED ACTION ICONS UPDATE */
.icon-action-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.icon-action-row form {
  display: inline-flex;
  margin: 0;
}

.icon-action-row .mini-icon-button,
.icon-table-actions .mini-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.icon-action-row .mini-icon-button:hover,
.icon-table-actions .mini-icon-button:hover {
  transform: translateY(-1px);
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.icon-action-row .mini-icon-button.danger,
.icon-table-actions .mini-icon-button.danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.icon-action-row .mini-icon-button.danger:hover,
.icon-table-actions .mini-icon-button.danger:hover {
  border-color: #ef4444;
  background: #fee2e2;
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.14);
}

.icon-action-row .mini-icon-button.neutral:hover {
  border-color: #64748b;
  background: #f8fafc;
  box-shadow: 0 12px 24px rgba(100, 116, 139, 0.14);
}

/* TAP TENANT LOGO ALL PAGES UPDATE */
.tenant-page-logo-wrap,
.org-title-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: min(220px, 100%);
  min-height: 74px;
  margin: 10px 0 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tenant-page-logo-wrap img,
.org-title-logo-wrap img {
  display: block;
  max-width: 220px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.dashboard-header > div:first-child:has(.tenant-page-logo-wrap),
.dashboard-header > div:first-child:has(.org-title-logo-wrap) {
  display: grid;
  justify-items: start;
}

@supports not selector(:has(*)) {
  .tenant-page-logo-wrap,
  .org-title-logo-wrap {
    margin-top: 12px;
  }
}

@media (max-width: 760px) {
  .tenant-page-logo-wrap,
  .org-title-logo-wrap {
    width: min(180px, 100%);
    min-height: 58px;
  }

  .tenant-page-logo-wrap img,
  .org-title-logo-wrap img {
    max-width: 180px;
    max-height: 58px;
  }
}
/* =========================================================
   TAP V0.3 - PROFESSIONAL MOBILE RESPONSIVE FINAL LAYER
   Ziel:
   - gesamte Webapp auf Handy/Tablet sauber nutzbar machen
   - keine kaputten Tabellen / Kalender / Formulare
   - grosse Admin-Tabellen horizontal scrollbar statt gequetscht
   - Planungskalender mobil stabiler
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

.dashboard,
.dashboard-card,
.table-card,
.auth-card,
.auth-card.wide,
.employee-form-card,
.company-logo-upload-box,
.project-card-wide,
.google-calendar-card,
.employee-planning-calendar-card,
.calendar-card,
.org-chart-card,
.profile-card,
.company-card {
  min-width: 0;
}

.table-card,
.org-chart-card,
.google-calendar-card,
.employee-planning-calendar-card,
.planning-calendar-wrap,
.employee-readonly-planning-wrap {
  scrollbar-width: thin;
}

.table-card::-webkit-scrollbar,
.org-chart-card::-webkit-scrollbar,
.google-calendar-card::-webkit-scrollbar,
.employee-planning-calendar-card::-webkit-scrollbar,
.planning-calendar-wrap::-webkit-scrollbar,
.employee-readonly-planning-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-card::-webkit-scrollbar-thumb,
.org-chart-card::-webkit-scrollbar-thumb,
.google-calendar-card::-webkit-scrollbar-thumb,
.employee-planning-calendar-card::-webkit-scrollbar-thumb,
.planning-calendar-wrap::-webkit-scrollbar-thumb,
.employee-readonly-planning-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

/* Tablet */
@media (max-width: 1024px) {
  .dashboard {
    width: 100%;
    max-width: 100%;
    padding: 28px 18px;
  }

  .dashboard-header,
  .google-calendar-header,
  .time-entry-filter-title-row,
  .employee-planning-calendar-card .google-calendar-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .dashboard-header > div,
  .google-calendar-header > div {
    min-width: 0;
  }

  .dashboard-header h1,
  .google-calendar-header h2 {
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .dashboard-header p,
  .google-calendar-header p {
    max-width: 100%;
    line-height: 1.5;
  }

  .header-actions,
  .button-row,
  .google-calendar-actions,
  .calendar-bulk-actions,
  .planning-nav-actions,
  .time-entry-export-form,
  .secondary-export-form {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
  }

  .header-actions > *,
  .button-row > *,
  .google-calendar-actions > *,
  .calendar-bulk-actions > *,
  .planning-nav-actions > *,
  .time-entry-export-form > *,
  .secondary-export-form > * {
    min-width: min(220px, 100%);
    flex: 1 1 220px;
  }

  .dashboard-grid,
  .dashboard-two-columns,
  .project-chart-layout,
  .calendar-meta-grid,
  .form-grid,
  .compact-form,
  .calendar-picker-form,
  .calendar-filter-form,
  .employee-planning-picker-form,
  .inline-create-form {
    grid-template-columns: 1fr !important;
  }

  .full-width {
    grid-column: auto !important;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .success-main-button,
  .danger-main-button,
  .primary-link-button,
  .secondary-link-button,
  .mini-button {
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }

  .top-menu-dropdown,
  .top-menu-dropdown summary {
    width: 100%;
  }

  .top-menu-dropdown summary {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .top-menu-panel {
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 999;
  }

  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-card table,
  .dashboard table {
    min-width: 760px;
  }

  .table-card th,
  .table-card td,
  .dashboard table th,
  .dashboard table td {
    white-space: nowrap;
  }

  .table-card td:last-child,
  .dashboard table td:last-child {
    white-space: normal;
  }

  .org-chart {
    min-width: 680px;
  }

  .org-chart-card,
  .org-chart-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .google-calendar-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .google-calendar-grid {
    width: max-content;
    min-width: 980px;
    grid-template-columns: repeat(7, minmax(140px, 1fr)) !important;
  }

  .google-calendar-weekday,
  .google-calendar-day {
    min-width: 140px !important;
  }

  .google-calendar-day {
    min-height: 150px;
  }

  .planning-calendar-wrap,
  .employee-readonly-planning-wrap {
    width: 100%;
    max-width: 100%;
    max-height: 72svh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
  }

  .planning-calendar,
  .employee-readonly-planning-calendar {
    min-width: 1500px !important;
  }

  .planning-calendar th,
  .planning-calendar td,
  .employee-readonly-planning-calendar th,
  .employee-readonly-planning-calendar td {
    padding: 8px;
    font-size: 12px;
  }

  .calendar-cell,
  .employee-readonly-planning-cell {
    min-width: 110px !important;
    max-width: 110px !important;
  }

  .calendar-cell-form,
  .calendar-cell-planning-form {
    grid-template-columns: 1fr !important;
    gap: 6px;
  }

  .calendar-cell-form button,
  .calendar-cell-planning-form button {
    width: 100%;
    min-height: 34px;
  }

  .calendar-assignment-select,
  .calendar-shift-select,
  .calendar-cell-form select {
    width: 100%;
    min-width: 0;
    font-size: 12px;
  }
}

/* Handy */
@media (max-width: 700px) {
  body {
    background: #f4f7fb;
  }

  .dashboard {
    padding: 18px 10px calc(26px + env(safe-area-inset-bottom));
  }

  .dashboard-header {
    margin-bottom: 18px;
  }

  .dashboard-header h1 {
    font-size: clamp(1.6rem, 8vw, 2.05rem);
  }

  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .dashboard-card,
  .table-card,
  .auth-card,
  .auth-card.wide,
  .employee-form-card,
  .company-logo-upload-box,
  .project-card-wide,
  .google-calendar-card,
  .employee-planning-calendar-card,
  .calendar-card,
  .profile-card,
  .company-card {
    border-radius: 18px;
    padding: 16px;
  }

  .dashboard-card h2,
  .table-card h2,
  .employee-form-card h2,
  .company-logo-upload-box h2 {
    font-size: 1.08rem;
    line-height: 1.2;
  }

  .dashboard-card p,
  .table-card p,
  .employee-form-card p,
  .company-logo-upload-box p {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .header-actions,
  .button-row,
  .google-calendar-actions,
  .calendar-bulk-actions,
  .planning-nav-actions,
  .time-entry-export-form,
  .secondary-export-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .header-actions > *,
  .button-row > *,
  .google-calendar-actions > *,
  .calendar-bulk-actions > *,
  .planning-nav-actions > *,
  .time-entry-export-form > *,
  .secondary-export-form > * {
    width: 100%;
    min-width: 0;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .success-main-button,
  .danger-main-button,
  .primary-link-button,
  .secondary-link-button,
  .mini-button {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  .form-stack,
  .form-grid,
  .compact-form,
  .calendar-picker-form,
  .calendar-filter-form,
  .employee-planning-picker-form,
  .inline-create-form {
    gap: 12px;
  }

  .form-stack label,
  .form-grid label,
  .compact-form label,
  .calendar-picker-form label,
  .calendar-filter-form label,
  .employee-planning-picker-form label,
  .inline-create-form label {
    min-width: 0;
    font-size: 0.9rem;
  }

  input,
  select,
  textarea {
    width: 100%;
    min-height: 46px;
    font-size: 16px !important;
    border-radius: 14px;
  }

  textarea {
    min-height: 110px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: auto;
    min-height: auto;
  }

  .checkbox-card {
    align-items: flex-start;
    gap: 12px;
  }

  .checkbox-card span {
    min-width: 0;
  }

  .vacation-action-stack {
    min-width: 0;
    width: 100%;
  }

  .vacation-decision-form {
    grid-template-columns: 1fr;
  }

  .vacation-decision-form button {
    width: 100%;
  }

  .top-menu-dropdown {
    position: static;
  }

  .top-menu-panel {
    position: fixed !important;
    top: calc(76px + env(safe-area-inset-top));
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-height: calc(100svh - 96px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  }

  .top-menu-panel a,
  .top-menu-panel button {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 12px;
  }

  .table-card {
    padding: 14px;
  }

  .table-card table,
  .dashboard table {
    min-width: 720px;
    font-size: 0.86rem;
  }

  .table-card th,
  .table-card td,
  .dashboard table th,
  .dashboard table td {
    padding: 10px 9px;
  }

  .google-calendar-grid {
    min-width: 880px;
    grid-template-columns: repeat(7, minmax(125px, 1fr)) !important;
  }

  .google-calendar-weekday,
  .google-calendar-day {
    min-width: 125px !important;
  }

  .google-calendar-day {
    min-height: 138px;
    padding: 9px;
  }

  .calendar-summary,
  .calendar-meta-grid,
  .calendar-filter-form {
    width: 100%;
  }

  .planning-calendar,
  .employee-readonly-planning-calendar {
    min-width: 1280px !important;
  }

  .planning-calendar .employee-col,
  .employee-readonly-planning-calendar .employee-col {
    left: 0 !important;
    min-width: 138px !important;
    max-width: 138px !important;
    z-index: 20;
  }

  .planning-calendar .department-col,
  .planning-calendar .position-col,
  .planning-calendar .location-col,
  .employee-readonly-planning-calendar .department-col,
  .employee-readonly-planning-calendar .position-col,
  .employee-readonly-planning-calendar .location-col {
    position: static !important;
    left: auto !important;
    min-width: 100px !important;
    max-width: 100px !important;
    z-index: 1;
  }

  .planning-calendar th.sticky-col.employee-col,
  .employee-readonly-planning-calendar th.sticky-col.employee-col {
    z-index: 30;
  }

  .calendar-cell,
  .employee-readonly-planning-cell {
    min-width: 98px !important;
    max-width: 98px !important;
  }

  .employee-col strong,
  .employee-col small {
    overflow-wrap: anywhere;
  }

  .calendar-cell-label,
  .calendar-assignment-pill,
  .absence-pill,
  .project-pill {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
  }

  .company-logo-header,
  .dashboard-company-logo,
  .header-company-logo,
  .brand-logo img,
  .image-logo img {
    max-width: 58px;
    max-height: 58px;
    object-fit: contain;
  }

  .landing-container {
    width: 100%;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .landing-hero-grid,
  .landing-feature-grid,
  .landing-workflow,
  .landing-cta-box,
  .landing-preview-grid {
    grid-template-columns: 1fr !important;
  }

  .landing-actions,
  .landing-hero-actions,
  .landing-cta-actions,
  .landing-login-links,
  .landing-points {
    width: 100% !important;
    align-items: stretch !important;
  }

  .landing-button,
  .landing-actions .landing-button,
  .landing-hero-actions .landing-button,
  .landing-cta-actions .landing-button,
  .landing-login-links .landing-button {
    width: 100% !important;
    justify-content: center;
  }
}

/* Kleine Handys */
@media (max-width: 430px) {
  .dashboard {
    padding-left: 8px;
    padding-right: 8px;
  }

  .dashboard-card,
  .table-card,
  .auth-card,
  .auth-card.wide,
  .employee-form-card,
  .company-logo-upload-box,
  .project-card-wide,
  .google-calendar-card,
  .employee-planning-calendar-card,
  .calendar-card,
  .profile-card,
  .company-card {
    padding: 14px;
    border-radius: 16px;
  }

  .dashboard-header h1 {
    font-size: clamp(1.45rem, 9vw, 1.9rem);
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .success-main-button,
  .danger-main-button,
  .primary-link-button,
  .secondary-link-button,
  .mini-button {
    font-size: 0.9rem;
  }

  .table-card table,
  .dashboard table {
    min-width: 680px;
  }

  .planning-calendar,
  .employee-readonly-planning-calendar {
    min-width: 1180px !important;
  }

  .planning-calendar .employee-col,
  .employee-readonly-planning-calendar .employee-col {
    min-width: 128px !important;
    max-width: 128px !important;
  }

  .calendar-cell,
  .employee-readonly-planning-cell {
    min-width: 92px !important;
    max-width: 92px !important;
  }

  .google-calendar-grid {
    min-width: 820px;
  }

  .google-calendar-weekday,
  .google-calendar-day {
    min-width: 116px !important;
  }
}

/* Landscape Handy */
@media (max-height: 520px) and (orientation: landscape) {
  .dashboard {
    padding-top: 12px;
  }

  .top-menu-panel {
    top: 10px;
    max-height: calc(100svh - 20px);
  }

  .planning-calendar-wrap,
  .employee-readonly-planning-wrap {
    max-height: 78svh;
  }
}
/* =========================================================
   SUPERADMIN PROFESSIONAL SAAS DASHBOARD V0.3+
   ========================================================= */

.superadmin-pro-page {
  max-width: 1480px;
}

.superadmin-pro-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 52%, #eef6ff 100%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.superadmin-hero-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.superadmin-platform-mark {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #7dd3fc 100%);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.28);
}

.superadmin-platform-mark span {
  font-weight: 950;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
}

.superadmin-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.superadmin-top-actions {
  align-items: stretch;
}

.superadmin-top-actions a,
.superadmin-top-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.superadmin-command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.superadmin-command-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 3px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.superadmin-command-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.1);
}

.superadmin-command-card > span {
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eff6ff;
  font-size: 1.25rem;
}

.superadmin-command-card strong {
  font-size: 0.98rem;
}

.superadmin-command-card small {
  color: #64748b;
  line-height: 1.35;
}

.superadmin-pro-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.superadmin-pro-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 166px;
}

.superadmin-pro-kpi-card::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -54px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.superadmin-pro-kpi-card.primary::after {
  background: rgba(255, 255, 255, 0.16);
}

.superadmin-pro-kpi-card.warning::after {
  background: rgba(249, 115, 22, 0.12);
}

.superadmin-kpi-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.superadmin-kpi-topline i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #f1f5f9;
  font-style: normal;
}

.superadmin-pro-kpi-card.primary .superadmin-kpi-topline i {
  background: rgba(255, 255, 255, 0.18);
}

.superadmin-pro-kpi-card.warning .superadmin-kpi-topline i {
  background: #ffedd5;
}

.superadmin-health-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
  margin-bottom: 20px;
}

.superadmin-health-card,
.superadmin-access-card,
.superadmin-panel-card,
.superadmin-recent-card {
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.superadmin-health-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.superadmin-health-metrics > div,
.superadmin-access-grid > div {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f8fafc;
}

.superadmin-health-metrics span,
.superadmin-access-grid small {
  display: block;
  color: #64748b;
  font-weight: 850;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.superadmin-health-metrics strong,
.superadmin-access-grid strong {
  display: block;
  margin-top: 7px;
  color: #0f172a;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1;
}

.superadmin-health-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.superadmin-health-note p {
  margin: 0;
  color: #334155;
  font-weight: 750;
}

.status-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.status-dot.active {
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.14);
}

.status-dot.warning {
  background: #f97316;
  box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.16);
}

.superadmin-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.full-width-button {
  width: 100%;
  justify-content: center;
}

.superadmin-pro-columns {
  align-items: stretch;
}

.superadmin-pro-plan-list,
.superadmin-pro-warning-list {
  gap: 12px;
}

.superadmin-pro-plan-row {
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}

.superadmin-plan-head,
.superadmin-plan-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.superadmin-plan-head span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.superadmin-plan-head strong {
  color: #0f172a;
}

.superadmin-plan-head small,
.superadmin-plan-meta-row small {
  color: #64748b;
  font-weight: 800;
}

.superadmin-plan-head b {
  color: #111827;
  white-space: nowrap;
}

.superadmin-plan-meta-row {
  margin-top: 10px;
}

.superadmin-progress-track {
  height: 9px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: #e5e7eb;
}

.superadmin-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.superadmin-pro-warning-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  background: #fff7ed;
}

.superadmin-pro-warning-item div {
  min-width: 0;
}

.superadmin-pro-warning-item strong {
  color: #111827;
}

.superadmin-pro-warning-item small {
  display: block;
  margin-top: 3px;
  color: #7c2d12;
  font-weight: 750;
}

.compact-empty-state {
  padding: 22px;
  border-radius: 18px;
}

.superadmin-company-mobile-list {
  display: none;
}

.superadmin-recent-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.superadmin-pro-dashboard-table {
  width: 100%;
  min-width: 1080px;
}

.superadmin-pro-dashboard-table th,
.superadmin-pro-dashboard-table td {
  vertical-align: middle;
}

.superadmin-pro-dashboard-table td strong {
  color: #0f172a;
}

.superadmin-company-mobile-card {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.superadmin-company-mobile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.superadmin-company-mobile-head div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.superadmin-company-mobile-head strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.superadmin-company-mobile-head small {
  color: #64748b;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.superadmin-company-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.superadmin-company-mobile-grid > div {
  min-width: 0;
  padding: 12px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.superadmin-company-mobile-grid small {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.superadmin-company-mobile-grid strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.superadmin-company-mobile-grid span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

/* Tablet */
@media (max-width: 1100px) {
  .superadmin-pro-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .superadmin-health-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-command-strip {
    grid-template-columns: 1fr;
  }
}

/* Handy */
@media (max-width: 760px) {
  .superadmin-pro-hero {
    padding: 18px;
    border-radius: 22px;
  }

  .superadmin-hero-main {
    align-items: flex-start;
  }

  .superadmin-platform-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
  }

  .superadmin-platform-mark span {
    font-size: 1rem;
  }

  .superadmin-top-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .superadmin-top-actions > *,
  .superadmin-top-actions form,
  .superadmin-top-actions button {
    width: 100%;
  }

  .superadmin-pro-kpi-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-pro-kpi-card {
    min-height: 142px;
  }

  .superadmin-health-metrics,
  .superadmin-access-grid,
  .superadmin-company-mobile-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-pro-warning-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .superadmin-plan-head,
  .superadmin-plan-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .superadmin-command-card {
    grid-template-columns: 42px 1fr;
    padding: 15px;
  }

  .superadmin-command-card > span {
    width: 42px;
    height: 42px;
  }

  .superadmin-recent-table-wrap {
    display: none;
  }

  .superadmin-company-mobile-list {
    display: grid;
    gap: 12px;
  }

  .superadmin-recent-card .card-title-row,
  .superadmin-panel-card .card-title-row,
  .superadmin-health-card .card-title-row,
  .superadmin-access-card .card-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .superadmin-recent-card .card-title-row a,
  .superadmin-panel-card .card-title-row a,
  .superadmin-health-card .card-title-row a,
  .superadmin-access-card .card-title-row a {
    width: 100%;
    justify-content: center;
  }
}
/* =========================================================
   SUPERADMIN PROFESSIONAL PAGES - PACKAGES / KEYS / COMPANIES
   ========================================================= */

.superadmin-pro-page {
  max-width: 1480px;
}

.superadmin-pro-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 52%, #eef6ff 100%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.superadmin-hero-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.superadmin-platform-mark {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #7dd3fc 100%);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.28);
}

.superadmin-platform-mark span {
  font-weight: 950;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
}

.superadmin-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.superadmin-top-actions a,
.superadmin-top-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.superadmin-panel-card,
.superadmin-pro-secret-card,
.superadmin-access-info-card {
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.superadmin-form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
}

.superadmin-form-section-title span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.82rem;
}

.superadmin-inline-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.superadmin-feature-check-grid,
.superadmin-pro-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.superadmin-pro-feature-grid label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  font-weight: 800;
  color: #334155;
}

.superadmin-pro-package-grid {
  gap: 18px;
}

.superadmin-pro-package-card {
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.superadmin-package-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.superadmin-package-card-head h3 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 1.25rem;
}

.superadmin-package-price {
  text-align: right;
  white-space: nowrap;
}

.superadmin-package-price strong {
  display: block;
  color: #0f172a;
  font-size: 1.2rem;
}

.superadmin-package-price small {
  color: #64748b;
  font-weight: 800;
}

.superadmin-package-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.superadmin-pro-plan-list {
  display: grid;
  gap: 12px;
}

.superadmin-pro-plan-row {
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}

.superadmin-plan-head,
.superadmin-plan-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.superadmin-plan-head span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.superadmin-plan-head strong {
  color: #0f172a;
}

.superadmin-plan-head small,
.superadmin-plan-meta-row small {
  color: #64748b;
  font-weight: 800;
}

.superadmin-plan-head b {
  color: #111827;
  white-space: nowrap;
}

.superadmin-plan-meta-row {
  margin-top: 10px;
}

.superadmin-progress-track {
  height: 9px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: #e5e7eb;
}

.superadmin-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.superadmin-pro-secret-card {
  border: 1px solid #bfdbfe;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 34%),
    #ffffff;
}

.access-key-display {
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed #2563eb;
  border-radius: 18px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.superadmin-access-info-card {
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.superadmin-key-mobile-list,
.superadmin-company-mobile-list {
  display: none;
}

.superadmin-key-table-wrap,
.superadmin-company-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.superadmin-access-key-table,
.superadmin-pro-company-table {
  width: 100%;
  min-width: 1120px;
}

.superadmin-key-mobile-card,
.superadmin-company-mobile-card {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.superadmin-key-card-head,
.superadmin-company-mobile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.superadmin-key-card-head div,
.superadmin-company-mobile-head div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.superadmin-key-card-head strong,
.superadmin-company-mobile-head strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.superadmin-key-card-head small,
.superadmin-company-mobile-head small {
  color: #64748b;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.superadmin-key-card-grid,
.superadmin-company-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.superadmin-key-card-grid > div,
.superadmin-company-mobile-grid > div {
  min-width: 0;
  padding: 12px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.superadmin-key-card-grid small,
.superadmin-company-mobile-grid small {
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.superadmin-key-card-grid strong,
.superadmin-company-mobile-grid strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.superadmin-company-mobile-grid span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.superadmin-admin-missing {
  display: grid;
  gap: 8px;
}

.superadmin-admin-meta {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.superadmin-admin-meta small {
  color: #64748b;
  overflow-wrap: anywhere;
}

.full-width {
  grid-column: 1 / -1;
}

.full-width,
.full-width-button {
  width: 100%;
}

@media (max-width: 1100px) {
  .superadmin-feature-check-grid,
  .superadmin-pro-feature-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-pro-columns,
  .superadmin-package-top {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .superadmin-pro-hero {
    padding: 18px;
    border-radius: 22px;
  }

  .superadmin-hero-main {
    align-items: flex-start;
  }

  .superadmin-platform-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
  }

  .superadmin-platform-mark span {
    font-size: 1rem;
  }

  .superadmin-top-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .superadmin-top-actions > *,
  .superadmin-top-actions form,
  .superadmin-top-actions button {
    width: 100%;
  }

  .superadmin-package-card-head,
  .superadmin-plan-head,
  .superadmin-plan-meta-row,
  .superadmin-key-card-head,
  .superadmin-company-mobile-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .superadmin-package-price {
    text-align: left;
  }

  .superadmin-key-table-wrap,
  .superadmin-company-table-wrap {
    display: none;
  }

  .superadmin-key-mobile-list,
  .superadmin-company-mobile-list {
    display: grid;
    gap: 12px;
  }

  .superadmin-key-card-grid,
  .superadmin-company-mobile-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-panel-card .card-title-row,
  .superadmin-pro-secret-card .card-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .superadmin-panel-card .card-title-row a,
  .superadmin-pro-secret-card .card-title-row a {
    width: 100%;
    justify-content: center;
  }
}
.enterprise-estimate-box strong {
  display: block;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* TAP V0.4 public legal demo update */
.tap-demo-legal-section { margin: 4rem auto 2rem; max-width: 1120px; padding: 0 1.5rem; }
.tap-demo-legal-card { border: 1px solid rgba(37, 99, 235, 0.18); border-radius: 28px; padding: 2rem; background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(255, 255, 255, 0.92)); box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08); }
.tap-demo-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.tap-public-legal-footer { max-width: 1120px; margin: 1rem auto 3rem; padding: 1.5rem; border-top: 1px solid rgba(148, 163, 184, 0.32); display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; }
.tap-public-legal-footer p { margin: 0.35rem 0 0; color: #64748b; }
.tap-public-legal-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem 1rem; }
.tap-public-legal-footer a { color: #2563eb; font-weight: 700; text-decoration: none; }
.legal-page { max-width: 980px; }
.legal-card { background: #ffffff; border: 1px solid rgba(148, 163, 184, 0.28); border-radius: 24px; padding: 2rem; margin-bottom: 1rem; box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06); }
.legal-card h2 { margin-top: 1.5rem; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p, .legal-card li { line-height: 1.65; }
.legal-note-card { background: #f8fafc; }
@media (max-width: 760px) { .tap-public-legal-footer { flex-direction: column; } .tap-public-legal-footer nav { justify-content: flex-start; } .tap-demo-legal-card, .legal-card { padding: 1.25rem; } }

.dashboard-planning-preview-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.dashboard-planning-preview-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #2563eb;
  border-radius: 16px;
  background: #f8fafc;
}

.dashboard-planning-date-box {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 14px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 800;
}

.dashboard-planning-date-box strong {
  font-size: 20px;
  line-height: 1;
}

.dashboard-planning-date-box span {
  font-size: 12px;
  color: #64748b;
}

.dashboard-planning-content {
  display: grid;
  gap: 4px;
}

.dashboard-planning-content strong {
  color: #111827;
}

.dashboard-planning-content > span {
  font-size: 13px;
  color: #64748b;
}

.dashboard-planning-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* FIX: Superadmin Dropdown nicht abschneiden */
.superadmin-pro-page,
.superadmin-hero-header,
.superadmin-pro-hero,
.dashboard-header.superadmin-hero-header {
  overflow: visible !important;
}

.superadmin-pro-hero {
  position: relative;
  z-index: 50;
}

.superadmin-dropdown-actions,
.superadmin-blue-menu {
  position: relative;
  z-index: 9999;
}

.superadmin-blue-menu[open] {
  z-index: 10000;
}

.superadmin-blue-menu-panel {
  z-index: 10001 !important;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.superadmin-command-strip,
.superadmin-kpi-grid,
.superadmin-health-grid,
.superadmin-dashboard-columns,
.superadmin-recent-card {
  position: relative;
  z-index: 1;
}

/* Falls Dropdown auf kleinen Bildschirmen zu lang ist */
@media (max-width: 760px) {
  .superadmin-blue-menu-panel {
    position: absolute;
    left: 0;
    right: auto;
    top: calc(100% + 0.65rem);
    width: min(320px, calc(100vw - 2rem));
    max-height: 70vh;
    overflow-y: auto;
  }
}
.dashboard {
  overflow: visible !important;
}

/* TAP V0.7 sales hardening / onboarding */
.onboarding-page { max-width: 1180px; }
.onboarding-pilot-banner { border: 1px solid rgba(37, 99, 235, 0.2); border-radius: 28px; padding: 1.5rem; margin-bottom: 1.5rem; background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(255,255,255,.96)); box-shadow: 0 18px 46px rgba(15,23,42,.08); }
.onboarding-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.onboarding-step-card { border: 1px solid rgba(148, 163, 184, 0.28); border-radius: 24px; padding: 1.35rem; background: #fff; box-shadow: 0 16px 42px rgba(15,23,42,.06); }
.onboarding-step-card span { display: inline-flex; width: 42px; height: 42px; border-radius: 999px; align-items: center; justify-content: center; background: #2563eb; color: #fff; font-weight: 800; margin-bottom: .75rem; }
.onboarding-step-card h2 { margin: 0 0 .5rem; }
.onboarding-step-card p { color: #64748b; line-height: 1.6; }
.pilot-mode-banner { border: 1px solid rgba(245,158,11,.35); border-radius: 28px; padding: 1.5rem; background: linear-gradient(135deg, rgba(245,158,11,.16), rgba(255,255,255,.96)); }
.tap-checklist li { margin-bottom: .75rem; line-height: 1.55; }
@media (max-width: 900px) { .onboarding-steps { grid-template-columns: 1fr; } }


/* TAP SUPERADMIN BLUE DROPDOWN MENU */
.superadmin-dropdown-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.superadmin-blue-menu {
  position: relative;
  z-index: 50;
}

.superadmin-blue-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1rem;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.superadmin-blue-menu > summary::-webkit-details-marker {
  display: none;
}

.superadmin-blue-menu .menu-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.superadmin-blue-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.65rem);
  width: min(280px, calc(100vw - 2rem));
  padding: 0.55rem;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 0.3rem;
}

.superadmin-blue-menu-panel a,
.superadmin-blue-menu-panel button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #1e293b;
  text-decoration: none;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  font-weight: 800;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font: inherit;
}

.superadmin-blue-menu-panel a:hover,
.superadmin-blue-menu-panel button:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.superadmin-menu-logout-form {
  margin: 0;
  padding: 0.35rem 0 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.access-key-secret-box {
  display: grid;
  gap: 0.45rem;
  min-width: 220px;
}

.access-key-secret-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.access-key-secret-value {
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.26);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-key-secret-value.masked {
  letter-spacing: 0.08em;
}

.access-key-action-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.mini-copy-button,
.mini-reveal-button {
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font-weight: 800;
  cursor: pointer;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.mini-copy-button:hover,
.mini-reveal-button:hover {
  background: rgba(37, 99, 235, 0.18);
}

@media (max-width: 760px) {
  .superadmin-dropdown-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .superadmin-blue-menu,
  .superadmin-blue-menu > summary {
    width: 100%;
  }

  .superadmin-blue-menu > summary {
    justify-content: center;
  }

  .superadmin-blue-menu-panel {
    left: 0;
    right: auto;
    width: 100%;
  }

  .access-key-secret-value {
    max-width: 100%;
  }
}


/* TAP ACCESS KEY DELETE BUTTONS */
.superadmin-key-delete-form {
  margin-top: 0.4rem;
}

.superadmin-access-key-table td form {
  margin-bottom: 0.35rem;
}

.superadmin-access-key-table td form:last-child {
  margin-bottom: 0;
}

.superadmin-key-mobile-card .superadmin-key-delete-form {
  margin-top: 0.55rem;
}

.superadmin-key-mobile-card .mini-danger-button,
.superadmin-access-key-table .mini-danger-button {
  white-space: nowrap;
}


/* TAP 14 DAY TRIAL */
.trial-banner {
  position: sticky;
  top: 0;
  z-index: 9000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.trial-banner strong {
  display: block;
  font-weight: 900;
  color: #0f172a;
}

.trial-banner span {
  color: #475569;
  font-weight: 650;
}

.trial-banner a {
  flex: 0 0 auto;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 900;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.trial-banner-info {
  background: #eff6ff;
}

.trial-banner-warning {
  background: #fff7ed;
}

.trial-banner-expired {
  background: #fef2f2;
}

.trial-expired-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.trial-expired-card {
  max-width: 760px;
}

@media (max-width: 760px) {
  .trial-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .trial-banner a {
    width: 100%;
    text-align: center;
  }
}


/* TAP TRIAL MAIN SALES VISIBILITY */
.tap-trial-main-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto;
}

.tap-trial-main-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.6rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
}

.tap-trial-main-card h2 {
  margin: 0.25rem 0 0.6rem;
  color: #0f172a;
}

.tap-trial-main-card p {
  color: #475569;
  max-width: 780px;
}

.tap-trial-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.tap-trial-feature-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  color: #1e293b;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.tap-trial-main-actions {
  display: grid;
  gap: 0.75rem;
  min-width: 230px;
}

.tap-trial-primary-button,
.tap-trial-secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  text-decoration: none;
  font-weight: 900;
}

.tap-trial-primary-button {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

.tap-trial-secondary-button {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.tap-trial-sales-card {
  position: relative;
  border: 2px solid rgba(37, 99, 235, 0.35) !important;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
    #ffffff;
}

.tap-trial-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #2563eb;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.8rem;
}

.tap-trial-sales-list {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  color: #334155;
  font-weight: 700;
}

.tap-trial-primary-button.full-width {
  width: 100%;
}

@media (max-width: 820px) {
  .tap-trial-main-card {
    grid-template-columns: 1fr;
  }

  .tap-trial-main-actions {
    min-width: 0;
  }
}


/* TAP TRIAL BOTTOM BEFORE AGB */
.tap-trial-bottom-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 4rem auto 2rem;
}

.tap-trial-bottom-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.7rem;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
}

.tap-trial-bottom-card h2 {
  margin: 0.25rem 0 0.6rem;
  color: #0f172a;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.tap-trial-bottom-card p {
  color: #475569;
  max-width: 820px;
}

.tap-trial-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.tap-trial-feature-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.88);
  color: #1e293b;
  font-weight: 850;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.tap-trial-bottom-actions {
  display: grid;
  gap: 0.75rem;
  min-width: 260px;
}

.tap-trial-primary-button,
.tap-trial-secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  text-decoration: none;
  font-weight: 950;
}

.tap-trial-primary-button {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

.tap-trial-secondary-button {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

@media (max-width: 820px) {
  .tap-trial-bottom-card {
    grid-template-columns: 1fr;
  }

  .tap-trial-bottom-actions {
    min-width: 0;
  }

  .tap-trial-primary-button,
  .tap-trial-secondary-button {
    width: 100%;
  }
}


/* TAP TRIAL REGISTER NOTE */
.trial-register-note {
  margin: 0.85rem 0 1.5rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: #1e293b;
  font-weight: 750;
}

.trial-register-note strong {
  display: block;
  color: #2563eb;
  margin-bottom: 0.2rem;
}


/* TAP 14 DAY TRIAL */
.trial-banner {
  position: sticky;
  top: 0;
  z-index: 9000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.trial-banner strong {
  display: block;
  font-weight: 900;
  color: #0f172a;
}

.trial-banner span {
  color: #475569;
  font-weight: 650;
}

.trial-banner a {
  flex: 0 0 auto;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 900;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.trial-banner-info {
  background: #eff6ff;
}

.trial-banner-warning {
  background: #fff7ed;
}

.trial-banner-expired {
  background: #fef2f2;
}

.trial-expired-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.trial-expired-card {
  max-width: 760px;
}

@media (max-width: 760px) {
  .trial-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .trial-banner a {
    width: 100%;
    text-align: center;
  }
}


/* TAP TRIAL MAIN SALES VISIBILITY */
.tap-trial-main-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto;
}

.tap-trial-main-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.6rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
}

.tap-trial-main-card h2 {
  margin: 0.25rem 0 0.6rem;
  color: #0f172a;
}

.tap-trial-main-card p {
  color: #475569;
  max-width: 780px;
}

.tap-trial-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.tap-trial-feature-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  color: #1e293b;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.tap-trial-main-actions {
  display: grid;
  gap: 0.75rem;
  min-width: 230px;
}

.tap-trial-primary-button,
.tap-trial-secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  text-decoration: none;
  font-weight: 900;
}

.tap-trial-primary-button {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

.tap-trial-secondary-button {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.tap-trial-sales-card {
  position: relative;
  border: 2px solid rgba(37, 99, 235, 0.35) !important;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
    #ffffff;
}

.tap-trial-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #2563eb;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.8rem;
}

.tap-trial-sales-list {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  color: #334155;
  font-weight: 700;
}

.tap-trial-primary-button.full-width {
  width: 100%;
}

@media (max-width: 820px) {
  .tap-trial-main-card {
    grid-template-columns: 1fr;
  }

  .tap-trial-main-actions {
    min-width: 0;
  }
}


/* TAP TRIAL BOTTOM BEFORE AGB */
.tap-trial-bottom-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 4rem auto 2rem;
}

.tap-trial-bottom-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.7rem;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
}

.tap-trial-bottom-card h2 {
  margin: 0.25rem 0 0.6rem;
  color: #0f172a;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.tap-trial-bottom-card p {
  color: #475569;
  max-width: 820px;
}

.tap-trial-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.tap-trial-feature-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.88);
  color: #1e293b;
  font-weight: 850;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.tap-trial-bottom-actions {
  display: grid;
  gap: 0.75rem;
  min-width: 260px;
}

.tap-trial-primary-button,
.tap-trial-secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  text-decoration: none;
  font-weight: 950;
}

.tap-trial-primary-button {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

.tap-trial-secondary-button {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

@media (max-width: 820px) {
  .tap-trial-bottom-card {
    grid-template-columns: 1fr;
  }

  .tap-trial-bottom-actions {
    min-width: 0;
  }

  .tap-trial-primary-button,
  .tap-trial-secondary-button {
    width: 100%;
  }
}


/* TAP TRIAL REGISTER NOTE */
.trial-register-note {
  margin: 0.85rem 0 1.5rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: #1e293b;
  font-weight: 750;
}

.trial-register-note strong {
  display: block;
  color: #2563eb;
  margin-bottom: 0.2rem;
}
/* =========================================================
   TIMEANDPEOPLE V0.8 - PROFESSIONAL MOBILE / TABLET POLISH
   Ziel: gesamte App sauber auf Smartphone und Tablet nutzbar
   ========================================================= */

/* ---------- Global responsive foundation ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  max-width: 100%;
  font: inherit;
}

a,
button,
summary,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.page {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* ---------- Better touch targets ---------- */

.primary-button,
.secondary-button,
.danger-button,
.success-main-button,
.danger-main-button,
.primary-link-button,
.secondary-link-button,
button,
summary {
  min-height: 44px;
  touch-action: manipulation;
}

input,
select,
textarea {
  min-height: 44px;
}

textarea {
  resize: vertical;
}

/* ---------- Safer overflow handling ---------- */

.dashboard,
.dashboard-card,
.table-card,
.auth-card,
.form-card,
.project-card,
.project-card-wide,
.employee-profile-card,
.org-chart-card,
.calendar-summary,
.google-calendar-card,
.planning-card,
.superadmin-card,
.superadmin-pro-card {
  min-width: 0;
}

.dashboard-card *,
.table-card *,
.auth-card *,
.form-card *,
.project-card *,
.project-card-wide * {
  min-width: 0;
}

h1,
h2,
h3,
p,
span,
strong,
small,
td,
th,
label,
a {
  overflow-wrap: anywhere;
}

/* ---------- Tables: professional horizontal scroll ---------- */

.table-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card table,
.company-table,
.employee-table,
.time-entry-table,
.project-table,
.superadmin-pro-dashboard-table {
  min-width: 760px;
}

/* ---------- Tablet layout ---------- */

@media (max-width: 1180px) {
  .dashboard {
    width: 100%;
    max-width: 100%;
    padding: 28px 20px;
  }

  .dashboard-grid,
  .dashboard-two-columns,
  .project-chart-layout,
  .planning-info-grid,
  .calendar-meta-grid,
  .org-group-grid,
  .superadmin-pro-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .form-grid,
  .compact-form,
  .inline-create-form,
  .calendar-picker-form,
  .calendar-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-actions,
  .button-row,
  .google-calendar-actions,
  .calendar-bulk-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .planning-calendar-wrap,
  .google-calendar-scroll,
  .org-chart-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .planning-calendar {
    min-width: 1180px;
  }

  .employee-col {
    left: 0;
    min-width: 170px;
    max-width: 170px;
  }

  .position-col {
    left: 170px;
    min-width: 125px;
    max-width: 125px;
  }

  .location-col {
    left: 295px;
    min-width: 120px;
    max-width: 120px;
  }

  .calendar-cell {
    min-width: 105px;
    max-width: 105px;
  }
}

/* ---------- Smartphone / small tablet ---------- */

@media (max-width: 900px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  body {
    background-attachment: scroll;
  }

  .dashboard {
    padding: 22px 14px;
  }

  .dashboard-header,
  .google-calendar-header,
  .project-header,
  .company-header,
  .superadmin-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
  }

  .dashboard-header h1,
  .google-calendar-header h1,
  .project-header h1,
  .company-header h1,
  .superadmin-header h1 {
    font-size: clamp(25px, 8vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.04em;
  }

  .dashboard-header p,
  .google-calendar-header p,
  .project-header p,
  .company-header p,
  .superadmin-header p {
    font-size: 14px;
    line-height: 1.45;
  }

  .eyebrow {
    font-size: 12px;
  }

  .dashboard-grid,
  .dashboard-two-columns,
  .form-grid,
  .compact-form,
  .inline-create-form,
  .calendar-picker-form,
  .calendar-filter-form,
  .calendar-meta-grid,
  .planning-info-grid,
  .org-filter-toolbar,
  .org-group-grid,
  .project-chart-layout,
  .superadmin-pro-kpi-grid,
  .superadmin-company-mobile-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-card,
  .table-card,
  .auth-card,
  .auth-card.wide,
  .form-card,
  .project-card,
  .project-card-wide,
  .calendar-summary,
  .google-calendar-card,
  .planning-card,
  .superadmin-card,
  .superadmin-pro-card {
    width: 100%;
    border-radius: 20px;
    padding: 18px;
  }

  .auth-shell {
    min-height: 100svh;
    padding: 18px 14px;
    align-items: center;
  }

  .auth-card,
  .auth-card.wide,
  .login-card {
    max-width: 100%;
    padding: 24px 18px;
  }

  .login-title,
  .auth-card h1 {
    font-size: clamp(26px, 9vw, 36px);
    text-align: center;
  }

  .login-logo-area,
  .brand,
  .brand-logo,
  .login-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .form-stack,
  .login-form {
    gap: 14px;
  }

  .form-stack label,
  .form-grid label,
  .compact-form label {
    font-size: 13px;
  }

  .form-stack input,
  .form-stack select,
  .form-stack textarea,
  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .compact-form input,
  .compact-form select,
  .compact-form textarea {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
  }

  .header-actions,
  .button-row,
  .google-calendar-actions,
  .calendar-bulk-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-actions > *,
  .button-row > *,
  .google-calendar-actions > *,
  .calendar-bulk-actions > *,
  .primary-link-button,
  .secondary-link-button,
  .primary-button,
  .secondary-button,
  .danger-button,
  .success-main-button,
  .danger-main-button {
    width: 100%;
    justify-content: center;
  }

  .top-menu-dropdown,
  .top-menu-dropdown summary {
    width: 100%;
  }

  .top-menu-dropdown summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
  }

  .top-menu-panel {
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(72svh, 520px);
    overflow-y: auto;
    border-radius: 18px;
    padding: 8px;
    z-index: 50;
  }

  .top-menu-panel a,
  .top-menu-panel button {
    min-height: 44px;
    border-radius: 12px;
    font-size: 14px;
  }

  .full-width,
  .project-card-wide {
    grid-column: auto !important;
  }

  .table-card {
    padding: 14px;
    border-radius: 20px;
  }

  .table-card::after,
  .planning-calendar-wrap::after,
  .google-calendar-scroll::after,
  .org-chart-wrap::after {
    content: "← seitlich wischen →";
    display: block;
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    text-align: center;
  }

  .table-card table {
    font-size: 13px;
  }

  .table-card th,
  .table-card td {
    padding: 10px 12px;
    white-space: nowrap;
  }

  .table-actions,
  .row-actions,
  .action-cell {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .table-actions a,
  .table-actions button,
  .row-actions a,
  .row-actions button,
  .action-cell a,
  .action-cell button {
    min-width: 38px;
    min-height: 38px;
  }

  .alert,
  .notice,
  .trial-banner,
  .error,
  .success {
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 14px;
  }

  .pie-chart {
    margin: 0 auto;
    max-width: 250px;
  }

  .org-chart-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .org-chart {
    min-width: 620px;
  }

  .planning-calendar-wrap {
    max-height: 70svh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
  }

  .planning-calendar {
    min-width: 980px;
  }

  .employee-col {
    left: 0;
    min-width: 150px;
    max-width: 150px;
  }

  .position-col {
    left: 150px;
    min-width: 105px;
    max-width: 105px;
  }

  .location-col {
    left: 255px;
    min-width: 100px;
    max-width: 100px;
  }

  .calendar-cell {
    min-width: 92px;
    max-width: 92px;
  }

  .employee-col,
  .position-col,
  .location-col,
  .calendar-cell {
    font-size: 12px;
  }

  .google-calendar-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .google-calendar-grid {
    grid-template-columns: repeat(7, minmax(138px, 1fr));
    min-width: 966px;
  }

  .google-calendar-day,
  .google-calendar-weekday {
    min-width: 138px;
  }

  .calendar-filter-form .primary-button,
  .calendar-picker-form .primary-button,
  .inline-create-form .primary-button {
    grid-column: auto;
    width: 100%;
  }

  .vacation-action-stack {
    min-width: 0;
    width: 100%;
  }

  .vacation-decision-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .vacation-decision-form button {
    width: 100%;
  }

  .superadmin-company-mobile-head {
    flex-direction: column;
  }
}

/* ---------- Small phones ---------- */

@media (max-width: 560px) {
  .dashboard {
    padding: 18px 10px;
  }

  .dashboard-card,
  .table-card,
  .auth-card,
  .auth-card.wide,
  .form-card,
  .project-card,
  .project-card-wide,
  .calendar-summary,
  .google-calendar-card,
  .planning-card,
  .superadmin-card,
  .superadmin-pro-card {
    padding: 15px;
    border-radius: 18px;
  }

  .dashboard-header h1,
  .google-calendar-header h1,
  .project-header h1,
  .company-header h1,
  .superadmin-header h1 {
    font-size: clamp(24px, 9vw, 31px);
  }

  .dashboard-card h2,
  .table-card h2,
  .form-card h2 {
    font-size: 19px;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .success-main-button,
  .danger-main-button,
  .primary-link-button,
  .secondary-link-button {
    min-height: 46px;
    border-radius: 14px;
    font-size: 14px;
    padding: 11px 14px;
  }

  .table-card table,
  .company-table,
  .employee-table,
  .time-entry-table,
  .project-table,
  .superadmin-pro-dashboard-table {
    min-width: 680px;
  }

  .table-card th,
  .table-card td {
    padding: 9px 10px;
    font-size: 12px;
  }

  .planning-calendar {
    min-width: 860px;
  }

  .employee-col {
    left: 0;
    min-width: 132px;
    max-width: 132px;
  }

  .position-col {
    left: 132px;
    min-width: 92px;
    max-width: 92px;
  }

  .location-col {
    left: 224px;
    min-width: 88px;
    max-width: 88px;
  }

  .calendar-cell {
    min-width: 78px;
    max-width: 78px;
  }

  .google-calendar-grid {
    grid-template-columns: repeat(7, minmax(124px, 1fr));
    min-width: 868px;
  }

  .google-calendar-day,
  .google-calendar-weekday {
    min-width: 124px;
  }

  .org-chart {
    min-width: 560px;
  }

  .pie-chart {
    max-width: 220px;
  }

  .login-logo,
  .brand-logo {
    width: 92px;
    height: 92px;
  }
}

/* ---------- Very small phones ---------- */

@media (max-width: 390px) {
  .dashboard {
    padding: 14px 8px;
  }

  .dashboard-card,
  .table-card,
  .auth-card,
  .auth-card.wide,
  .form-card,
  .project-card,
  .project-card-wide {
    padding: 13px;
    border-radius: 16px;
  }

  .dashboard-header h1 {
    font-size: 24px;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .success-main-button,
  .danger-main-button,
  .primary-link-button,
  .secondary-link-button {
    font-size: 13px;
  }

  .planning-calendar {
    min-width: 780px;
  }

  .employee-col {
    min-width: 118px;
    max-width: 118px;
  }

  .position-col {
    left: 118px;
    min-width: 82px;
    max-width: 82px;
  }

  .location-col {
    left: 200px;
    min-width: 80px;
    max-width: 80px;
  }

  .calendar-cell {
    min-width: 70px;
    max-width: 70px;
  }
}

/* ---------- Landscape mobile ---------- */

@media (max-height: 520px) and (orientation: landscape) {
  .auth-shell {
    min-height: auto;
    padding: 16px;
  }

  .top-menu-panel {
    max-height: 78svh;
  }

  .planning-calendar-wrap {
    max-height: 76svh;
  }
}

/* ---------- Touch devices ---------- */

@media (hover: none) and (pointer: coarse) {
  .primary-button:hover,
  .secondary-button:hover,
  .danger-button:hover,
  .success-main-button:hover,
  .danger-main-button:hover,
  .primary-link-button:hover,
  .secondary-link-button:hover,
  .top-menu-panel a:hover,
  .top-menu-panel button:hover {
    transform: none;
  }

  details summary {
    cursor: pointer;
  }
}

/* ---------- Safe area for iPhone notch ---------- */

@supports (padding: max(0px)) {
  @media (max-width: 900px) {
    .page,
    .dashboard,
    .auth-shell {
      padding-left: max(12px, env(safe-area-inset-left));
      padding-right: max(12px, env(safe-area-inset-right));
    }
  }
}
/* =========================================================
   TAP V0.8 PUBLIC TRIAL CTA - DESKTOP + MOBILE POLISH
   Bereich: templates/partials/trial_bottom_cta.html
   ========================================================= */

.tap-trial-bottom-section,
.tap-trial-bottom-section * {
  box-sizing: border-box;
}

.tap-trial-bottom-section {
  --trial-blue: #2563eb;
  --trial-blue-dark: #1d4ed8;
  --trial-ink: #0f172a;
  --trial-muted: #64748b;
  --trial-border: rgba(148, 163, 184, 0.24);

  width: min(1180px, calc(100% - 32px));
  margin: clamp(28px, 5vw, 56px) auto;
  font-family: Arial, sans-serif;
}

.tap-trial-bottom-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: clamp(24px, 4vw, 38px);
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.22), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(14, 165, 233, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 48%, #f8fafc 100%);
  box-shadow:
    0 30px 90px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tap-trial-bottom-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  pointer-events: none;
}

.tap-trial-bottom-card::after {
  content: "";
  position: absolute;
  left: -90px;
  bottom: -120px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.10);
  pointer-events: none;
}

.tap-trial-bottom-content,
.tap-trial-bottom-actions {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.tap-trial-bottom-content .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  margin: 0 0 14px;
  padding: 0 13px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: #dbeafe;
  color: var(--trial-blue-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tap-trial-bottom-content h2 {
  max-width: 780px;
  margin: 0;
  color: var(--trial-ink);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.tap-trial-bottom-content p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: #475569;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.7;
}

.tap-trial-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tap-trial-feature-row span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--trial-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #1e293b;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  white-space: nowrap;
}

.tap-trial-bottom-actions {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(12px);
}

.tap-trial-bottom-actions::before {
  content: "14 Tage · 0 CHF";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  margin-bottom: 2px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  background: #ffffff;
  color: var(--trial-ink);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.04em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.tap-trial-primary-button,
.tap-trial-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.tap-trial-primary-button {
  background: var(--trial-blue);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.30);
}

.tap-trial-primary-button:hover {
  transform: translateY(-1px);
  background: var(--trial-blue-dark);
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.36);
}

.tap-trial-secondary-button {
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: #ffffff;
  color: var(--trial-ink);
}

.tap-trial-secondary-button:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

/* Tablet */
@media (max-width: 920px) {
  .tap-trial-bottom-section {
    width: min(100% - 24px, 1180px);
    margin: 32px auto;
  }

  .tap-trial-bottom-card {
    grid-template-columns: 1fr;
  }

  .tap-trial-bottom-content h2 {
    font-size: clamp(32px, 8vw, 46px);
    line-height: 1.02;
  }

  .tap-trial-bottom-actions {
    width: 100%;
  }
}

/* Smartphone */
@media (max-width: 560px) {
  .tap-trial-bottom-section {
    width: min(100% - 20px, 1180px);
    margin: 24px auto;
  }

  .tap-trial-bottom-card {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .tap-trial-bottom-content .eyebrow {
    min-height: 30px;
    font-size: 11px;
  }

  .tap-trial-bottom-content h2 {
    font-size: 30px;
    letter-spacing: -0.045em;
  }

  .tap-trial-bottom-content p:not(.eyebrow) {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.58;
  }

  .tap-trial-feature-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tap-trial-feature-row span {
    justify-content: center;
    min-height: 38px;
    text-align: center;
    white-space: normal;
  }

  .tap-trial-bottom-actions {
    padding: 14px;
    border-radius: 22px;
  }

  .tap-trial-bottom-actions::before {
    min-height: 72px;
    font-size: 24px;
  }

  .tap-trial-primary-button,
  .tap-trial-secondary-button {
    width: 100%;
    min-height: 50px;
    font-size: 14px;
  }
}

/* =========================================================
   TAP COMPANY PLANNING DESKTOP/TABLET/MOBILE FIX v11
   Fix: Mitarbeiter-Spalte darf nicht kollabieren.
   ========================================================= */

.company-planning-page {
  --tap-planning-employee-col: 260px;
  --tap-planning-day-col: 96px;
}

.company-planning-page .professional-planning-calendar-wrap,
.company-planning-page .planning-calendar-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

.company-planning-page .professional-planning-calendar {
  table-layout: fixed !important;
  width: max-content !important;
  min-width: max-content !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.company-planning-page .professional-planning-calendar th.employee-col,
.company-planning-page .professional-planning-calendar td.employee-col,
.company-planning-page .professional-planning-calendar th.planning-employee-col,
.company-planning-page .professional-planning-calendar td.planning-employee-col,
.company-planning-page .professional-planning-calendar .planning-calendar-employee-col {
  width: var(--tap-planning-employee-col) !important;
  min-width: var(--tap-planning-employee-col) !important;
  max-width: var(--tap-planning-employee-col) !important;
  left: 0 !important;
  position: sticky !important;
  z-index: 45 !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.company-planning-page .professional-planning-calendar thead th.employee-col,
.company-planning-page .professional-planning-calendar thead th.planning-employee-col {
  z-index: 80 !important;
  background: #eef2ff !important;
  color: #0f172a !important;
  text-align: left !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.company-planning-page .professional-planning-calendar th[data-planning-day],
.company-planning-page .professional-planning-calendar td.professional-calendar-cell,
.company-planning-page .professional-planning-calendar .planning-calendar-day-col {
  width: var(--tap-planning-day-col) !important;
  min-width: var(--tap-planning-day-col) !important;
  max-width: var(--tap-planning-day-col) !important;
  box-sizing: border-box !important;
}

.company-planning-page .planning-employee-profile-cell {
  padding: 12px 10px !important;
  vertical-align: middle !important;
}

.company-planning-page .planning-employee-profile {
  display: grid !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.company-planning-page .planning-employee-profile strong {
  display: block !important;
  color: #0f172a !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

.company-planning-page .planning-employee-role {
  display: block !important;
  color: #2563eb !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 850 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.company-planning-page .planning-employee-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-top: 3px !important;
}

.company-planning-page .planning-employee-meta span {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 100% !important;
  min-height: 21px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.company-planning-page .professional-calendar-cell {
  height: 78px !important;
  padding: 6px !important;
  vertical-align: middle !important;
}

.company-planning-page .calendar-cell-planning-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: 30px 28px !important;
  gap: 5px !important;
  width: 100% !important;
  max-width: 100% !important;
}

.company-planning-page .calendar-cell-planning-form select,
.company-planning-page .planning-project-select,
.company-planning-page .planning-shift-select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 6px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

/* Tablet */
@media (max-width: 980px) {
  .company-planning-page {
    --tap-planning-employee-col: 230px;
    --tap-planning-day-col: 90px;
  }

  .company-planning-page .professional-planning-calendar {
    min-width: max-content !important;
  }
}

/* Smartphone */
@media (max-width: 640px) {
  .company-planning-page {
    --tap-planning-employee-col: 210px;
    --tap-planning-day-col: 86px;
  }

  .company-planning-page .professional-planning-calendar-wrap,
  .company-planning-page .planning-calendar-wrap {
    max-height: 68svh !important;
    border-radius: 18px !important;
  }

  .company-planning-page .planning-employee-profile strong {
    font-size: 12.5px !important;
  }

  .company-planning-page .planning-employee-role {
    font-size: 11px !important;
  }

  .company-planning-page .planning-employee-meta span {
    font-size: 9px !important;
    padding: 2px 5px !important;
  }
}

/* Sehr kleine Geräte: Sticky bleibt, aber kompakter */
@media (max-width: 420px) {
  .company-planning-page {
    --tap-planning-employee-col: 190px;
    --tap-planning-day-col: 82px;
  }
}
/* =========================================================
   TAP PLANNING TABLE GLOBAL FIX v12
   Fix für /main + Firmenplanung:
   Mitarbeiter-Spalte darf nie kollabieren oder vertikal brechen.
   ========================================================= */

.professional-planning-calendar-wrap,
.planning-calendar-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.professional-planning-calendar,
.planning-calendar {
  table-layout: fixed !important;
  width: max-content !important;
  min-width: max-content !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* Colgroup fix */
.professional-planning-calendar col.planning-calendar-employee-col,
.planning-calendar col.planning-calendar-employee-col {
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
}

.professional-planning-calendar col.planning-calendar-day-col,
.planning-calendar col.planning-calendar-day-col {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
}

/* Mitarbeiter-Spalte */
.professional-planning-calendar th.employee-col,
.professional-planning-calendar td.employee-col,
.professional-planning-calendar th.planning-employee-col,
.professional-planning-calendar td.planning-employee-col,
.planning-calendar th.employee-col,
.planning-calendar td.employee-col,
.planning-calendar th.planning-employee-col,
.planning-calendar td.planning-employee-col {
  position: sticky !important;
  left: 0 !important;
  z-index: 40 !important;

  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;

  background: #ffffff !important;
  box-sizing: border-box !important;
  overflow: hidden !important;

  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;

  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;

  text-align: left !important;
}

/* Header Mitarbeiter */
.professional-planning-calendar thead th.employee-col,
.professional-planning-calendar thead th.planning-employee-col,
.planning-calendar thead th.employee-col,
.planning-calendar thead th.planning-employee-col {
  z-index: 80 !important;
  background: #eef2ff !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

/* Tages-Spalten */
.professional-planning-calendar thead th[data-planning-day],
.professional-planning-calendar td.professional-calendar-cell,
.planning-calendar thead th[data-planning-day],
.planning-calendar td.calendar-cell {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  box-sizing: border-box !important;
}

/* Mitarbeiter-Inhalt */
.planning-employee-profile-cell {
  padding: 12px 10px !important;
  vertical-align: middle !important;
}

.planning-employee-profile {
  display: grid !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.planning-employee-profile strong {
  display: block !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

.planning-employee-role {
  display: block !important;
  color: #2563eb !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.planning-employee-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-top: 3px !important;
}

.planning-employee-meta span {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 100% !important;
  min-height: 21px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

/* Select-Zellen */
.professional-calendar-cell,
.calendar-cell {
  height: 78px !important;
  padding: 6px !important;
  vertical-align: middle !important;
}

.calendar-cell-planning-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: 30px 28px !important;
  gap: 5px !important;
  width: 100% !important;
  max-width: 100% !important;
}

.calendar-cell-planning-form select,
.planning-project-select,
.planning-shift-select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 6px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

/* Tablet */
@media (max-width: 980px) {
  .professional-planning-calendar col.planning-calendar-employee-col,
  .planning-calendar col.planning-calendar-employee-col {
    width: 230px !important;
  }

  .professional-planning-calendar th.employee-col,
  .professional-planning-calendar td.employee-col,
  .professional-planning-calendar th.planning-employee-col,
  .professional-planning-calendar td.planning-employee-col,
  .planning-calendar th.employee-col,
  .planning-calendar td.employee-col,
  .planning-calendar th.planning-employee-col,
  .planning-calendar td.planning-employee-col {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
  }

  .professional-planning-calendar col.planning-calendar-day-col,
  .planning-calendar col.planning-calendar-day-col,
  .professional-planning-calendar thead th[data-planning-day],
  .professional-planning-calendar td.professional-calendar-cell,
  .planning-calendar thead th[data-planning-day],
  .planning-calendar td.calendar-cell {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
  }
}

/* Smartphone */
@media (max-width: 640px) {
  .professional-planning-calendar-wrap,
  .planning-calendar-wrap {
    max-height: 68svh !important;
    border-radius: 18px !important;
  }

  .professional-planning-calendar col.planning-calendar-employee-col,
  .planning-calendar col.planning-calendar-employee-col {
    width: 210px !important;
  }

  .professional-planning-calendar th.employee-col,
  .professional-planning-calendar td.employee-col,
  .professional-planning-calendar th.planning-employee-col,
  .professional-planning-calendar td.planning-employee-col,
  .planning-calendar th.employee-col,
  .planning-calendar td.employee-col,
  .planning-calendar th.planning-employee-col,
  .planning-calendar td.planning-employee-col {
    width: 210px !important;
    min-width: 210px !important;
    max-width: 210px !important;
  }

  .professional-planning-calendar col.planning-calendar-day-col,
  .planning-calendar col.planning-calendar-day-col,
  .professional-planning-calendar thead th[data-planning-day],
  .professional-planning-calendar td.professional-calendar-cell,
  .planning-calendar thead th[data-planning-day],
  .planning-calendar td.calendar-cell {
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
  }

  .planning-employee-profile strong {
    font-size: 12.5px !important;
  }

  .planning-employee-role {
    font-size: 11px !important;
  }

  .planning-employee-meta span {
    font-size: 9px !important;
    padding: 2px 5px !important;
  }
}

/* =========================================================
   TAP V0.7.4 - COMPLETE LAYOUT STABILIZATION FINAL LAYER
   Bereiche:
   - Superadmin Firmenliste darf nicht mehr Spalten quetschen
   - Firmenplanung / Planungskalender: Mitarbeiter-Spalte horizontal
   - Tabellen scrollen horizontal, statt Text buchstabenweise umzubrechen
   Diese Schicht muss ganz am Ende von static/css/app.css stehen.
   ========================================================= */

:root {
  --tap-table-border: #dbe3ef;
  --tap-table-head: #f8fafc;
  --tap-table-soft: #f1f5f9;
  --tap-table-text: #0f172a;
  --tap-table-muted: #64748b;

  --tap-planning-employee-width: 260px;
  --tap-planning-day-width: 112px;

  --tap-superadmin-width: 1780px;
  --tap-superadmin-company-width: 230px;
  --tap-superadmin-subscription-width: 360px;
  --tap-superadmin-limits-width: 420px;
  --tap-superadmin-admin-width: 340px;
}

/* Nie mehr Buchstaben-Spalten in kritischen Admin-/Planning-Tabellen */
.superadmin-company-table th,
.superadmin-company-table td,
.superadmin-dashboard-table th,
.superadmin-dashboard-table td,
.superadmin-subscription-table th,
.superadmin-subscription-table td,
.planning-calendar th,
.planning-calendar td,
.professional-planning-calendar th,
.professional-planning-calendar td,
.employee-readonly-planning-calendar th,
.employee-readonly-planning-calendar td {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.superadmin-company-table th *,
.superadmin-company-table td *,
.superadmin-dashboard-table th *,
.superadmin-dashboard-table td *,
.superadmin-subscription-table th *,
.superadmin-subscription-table td *,
.planning-calendar th *,
.planning-calendar td *,
.professional-planning-calendar th *,
.professional-planning-calendar td *,
.employee-readonly-planning-calendar th *,
.employee-readonly-planning-calendar td * {
  word-break: normal !important;
  hyphens: none !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

/* =========================================================
   SUPERADMIN FIRMENLISTE
   ========================================================= */

.table-card:has(.superadmin-company-table),
.table-wrap:has(.superadmin-company-table),
.superadmin-pro-page .table-card,
.superadmin-page .table-card {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
}

@supports not selector(:has(*)) {
  .superadmin-pro-page .table-card,
  .superadmin-page .table-card {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
}

.superadmin-company-table {
  table-layout: auto !important;
  width: max-content !important;
  min-width: var(--tap-superadmin-width) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.superadmin-company-table th,
.superadmin-company-table td {
  vertical-align: middle !important;
  box-sizing: border-box !important;
  white-space: normal !important;
}

.superadmin-company-table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 8 !important;
  background: var(--tap-table-head) !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
}

/* Feste, professionelle Spaltenbreiten */
.superadmin-company-table th:nth-child(1),
.superadmin-company-table td:nth-child(1) {
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  white-space: nowrap !important;
  text-align: left !important;
}

.superadmin-company-table th:nth-child(2),
.superadmin-company-table td:nth-child(2) {
  width: var(--tap-superadmin-company-width) !important;
  min-width: var(--tap-superadmin-company-width) !important;
  max-width: var(--tap-superadmin-company-width) !important;
}

.superadmin-company-table th:nth-child(3),
.superadmin-company-table td:nth-child(3) {
  width: var(--tap-superadmin-subscription-width) !important;
  min-width: var(--tap-superadmin-subscription-width) !important;
  max-width: var(--tap-superadmin-subscription-width) !important;
}

.superadmin-company-table th:nth-child(4),
.superadmin-company-table td:nth-child(4) {
  width: var(--tap-superadmin-limits-width) !important;
  min-width: var(--tap-superadmin-limits-width) !important;
  max-width: var(--tap-superadmin-limits-width) !important;
}

.superadmin-company-table th:nth-child(5),
.superadmin-company-table td:nth-child(5) {
  width: var(--tap-superadmin-admin-width) !important;
  min-width: var(--tap-superadmin-admin-width) !important;
  max-width: var(--tap-superadmin-admin-width) !important;
}

.superadmin-company-table th:nth-child(6),
.superadmin-company-table td:nth-child(6) {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
}

.superadmin-company-table th:nth-child(7),
.superadmin-company-table td:nth-child(7) {
  width: 124px !important;
  min-width: 124px !important;
  max-width: 124px !important;
}

.superadmin-company-table th:nth-child(8),
.superadmin-company-table td:nth-child(8) {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  text-align: center !important;
}

/* Firmenzelle */
.superadmin-company-table td:nth-child(2) strong,
.superadmin-company-table td:nth-child(2) small,
.superadmin-company-table td:nth-child(2) span {
  display: block !important;
  max-width: 100% !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
}

/* Abo/Paket Formular */
.superadmin-subscription-form {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(130px, 1fr)) !important;
  gap: 10px !important;
  align-items: end !important;
}

.superadmin-subscription-form label {
  min-width: 0 !important;
  max-width: 100% !important;
  gap: 6px !important;
  color: #334155 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
  white-space: normal !important;
}

.superadmin-subscription-form input,
.superadmin-subscription-form select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 42px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
}

.superadmin-subscription-form .full-width,
.superadmin-subscription-form button.full-width {
  grid-column: 1 / -1 !important;
}

/* Limits */
.superadmin-limit-stack {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  gap: 10px !important;
}

.superadmin-limit-stack > div {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(150px, 1fr) auto auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 12px 14px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  background: #f8fafc !important;
}

.superadmin-limit-stack strong,
.superadmin-limit-stack span,
.superadmin-limit-stack small,
.superadmin-limit-stack b {
  line-height: 1.25 !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.superadmin-limit-stack strong {
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.superadmin-limit-stack small {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: normal !important;
}

/* Firmen-Admin Bereich */
.superadmin-admin-box {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  gap: 10px !important;
}

.superadmin-admin-meta {
  display: grid !important;
  gap: 3px !important;
}

.superadmin-admin-meta strong,
.superadmin-admin-meta small,
.superadmin-admin-meta span {
  display: block !important;
  line-height: 1.35 !important;
  white-space: normal !important;
}

.superadmin-admin-form {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(74px, 0.8fr) minmax(74px, 0.8fr) minmax(132px, 1.2fr) !important;
  gap: 8px !important;
  align-items: end !important;
}

.superadmin-admin-form label {
  min-width: 0 !important;
  gap: 5px !important;
  color: #334155 !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  white-space: normal !important;
}

.superadmin-admin-form input {
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
}

.superadmin-admin-form .mini-button,
.superadmin-admin-form button {
  width: 100% !important;
  min-width: 132px !important;
  height: 42px !important;
  padding: 0 12px !important;
  white-space: nowrap !important;
}

/* Status- und Aktionsspalte */
.superadmin-company-table .status-pill {
  min-width: 54px !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.superadmin-company-table .danger-button,
.superadmin-company-table .mini-danger-button,
.superadmin-company-table td:nth-child(8) button {
  min-width: 96px !important;
  width: 96px !important;
  max-width: 96px !important;
  min-height: 48px !important;
  padding: 8px 10px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* =========================================================
   FIRMENPLANUNG / PLANNING TABELLEN
   ========================================================= */

.company-planning-page,
.company-calendar-card,
.employee-planning-page,
.employee-planning-calendar-card {
  max-width: min(1720px, 100%) !important;
}

.planning-calendar-wrap,
.professional-planning-calendar-wrap,
.employee-readonly-planning-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow: auto !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-x: contain !important;
}

.planning-calendar,
.professional-planning-calendar,
.employee-readonly-planning-calendar {
  table-layout: fixed !important;
  width: max-content !important;
  min-width: max-content !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* Colgroup absichern */
.planning-calendar-employee-col {
  width: var(--tap-planning-employee-width) !important;
  min-width: var(--tap-planning-employee-width) !important;
  max-width: var(--tap-planning-employee-width) !important;
}

.planning-calendar-day-col {
  width: var(--tap-planning-day-width) !important;
  min-width: var(--tap-planning-day-width) !important;
  max-width: var(--tap-planning-day-width) !important;
}

/* Erste Spalte jeder Planungstabelle = Mitarbeiter */
.planning-calendar tr > th:first-child,
.planning-calendar tr > td:first-child,
.professional-planning-calendar tr > th:first-child,
.professional-planning-calendar tr > td:first-child,
.employee-readonly-planning-calendar tr > th:first-child,
.employee-readonly-planning-calendar tr > td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 70 !important;
  width: var(--tap-planning-employee-width) !important;
  min-width: var(--tap-planning-employee-width) !important;
  max-width: var(--tap-planning-employee-width) !important;
  background: #ffffff !important;
  border-right: 1px solid var(--tap-table-border) !important;
  box-sizing: border-box !important;
  text-align: left !important;
  vertical-align: middle !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  overflow: hidden !important;
}

.planning-calendar thead tr > th:first-child,
.professional-planning-calendar thead tr > th:first-child,
.employee-readonly-planning-calendar thead tr > th:first-child {
  z-index: 120 !important;
  background: #eef2ff !important;
  color: var(--tap-table-text) !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
}

/* Restliche Spalten */
.planning-calendar tr > th:not(:first-child),
.planning-calendar tr > td:not(:first-child),
.professional-planning-calendar tr > th:not(:first-child),
.professional-planning-calendar tr > td:not(:first-child),
.employee-readonly-planning-calendar tr > th:not(:first-child),
.employee-readonly-planning-calendar tr > td:not(:first-child) {
  width: var(--tap-planning-day-width) !important;
  min-width: var(--tap-planning-day-width) !important;
  max-width: var(--tap-planning-day-width) !important;
  box-sizing: border-box !important;
}

/* Alte separate Sticky-Spalten in Firmenplanung verhindern */
.company-planning-page .department-col,
.company-planning-page .position-col,
.company-planning-page .location-col {
  display: none !important;
}

/* Mitarbeiterprofil in Planung */
.planning-employee-profile-cell,
.employee-name-cell {
  padding: 11px 12px !important;
}

.planning-employee-profile,
.employee-name-cell {
  display: grid !important;
  gap: 4px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.planning-employee-profile strong,
.employee-name-cell strong {
  display: block !important;
  color: #0f172a !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
}

.planning-employee-role,
.employee-name-cell small {
  display: block !important;
  color: #2563eb !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
}

.planning-employee-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-top: 4px !important;
}

.planning-employee-meta span {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 100% !important;
  min-height: 21px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

/* Planung Tageszellen / Selects */
.professional-calendar-cell,
.calendar-cell,
.employee-readonly-planning-cell {
  height: 80px !important;
  padding: 7px !important;
  vertical-align: middle !important;
}

.calendar-cell-planning-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 32px 30px !important;
  gap: 5px !important;
  width: 100% !important;
  max-width: 100% !important;
  align-content: center !important;
}

.calendar-cell-planning-form select,
.planning-project-select,
.planning-shift-select,
.calendar-assignment-select,
.calendar-shift-select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 7px !important;
  border-radius: 10px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
}

/* Heute-Spalte */
.planning-today-column {
  background: #111827 !important;
  color: #ffffff !important;
  box-shadow: inset 0 -4px 0 #2563eb !important;
}

.planning-today-column span,
.planning-today-column small {
  color: #ffffff !important;
}

.planning-today-column-cell {
  box-shadow:
    inset 4px 0 0 #2563eb,
    inset -4px 0 0 #2563eb !important;
}

/* Kleine Tabellen nicht von globalen Tabellenregeln zerstören */
.today-time-table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

.today-time-table th,
.today-time-table td {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

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

@media (max-width: 1180px) {
  :root {
    --tap-superadmin-width: 1640px;
    --tap-superadmin-company-width: 210px;
    --tap-superadmin-subscription-width: 340px;
    --tap-superadmin-limits-width: 390px;
    --tap-superadmin-admin-width: 320px;
    --tap-planning-employee-width: 230px;
    --tap-planning-day-width: 104px;
  }

  .superadmin-company-table th,
  .superadmin-company-table td {
    padding: 12px 10px !important;
  }
}

@media (max-width: 900px) {
  :root {
    --tap-superadmin-width: 1480px;
    --tap-superadmin-company-width: 190px;
    --tap-superadmin-subscription-width: 320px;
    --tap-superadmin-limits-width: 360px;
    --tap-superadmin-admin-width: 300px;
    --tap-planning-employee-width: 220px;
    --tap-planning-day-width: 96px;
  }

  .dashboard {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .dashboard-header,
  .card-title-row,
  .google-calendar-header,
  .time-entry-filter-title-row,
  .organization-title-row {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .header-actions,
  .button-row,
  .google-calendar-actions,
  .planning-calendar-toolbar-actions,
  .planning-mode-button-panel {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .superadmin-subscription-form {
    grid-template-columns: repeat(2, minmax(118px, 1fr)) !important;
  }

  .superadmin-limit-stack > div {
    grid-template-columns: minmax(130px, 1fr) auto auto !important;
  }

  .superadmin-admin-form {
    grid-template-columns: minmax(70px, 1fr) minmax(70px, 1fr) minmax(122px, 1.2fr) !important;
  }
}

@media (max-width: 640px) {
  :root {
    --tap-planning-employee-width: 205px;
    --tap-planning-day-width: 92px;
  }

  .dashboard {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .dashboard-card,
  .table-card,
  .auth-card {
    padding: 16px !important;
    border-radius: 18px !important;
  }

  .superadmin-company-table {
    min-width: 1380px !important;
  }

  .professional-calendar-cell,
  .calendar-cell,
  .employee-readonly-planning-cell {
    height: 76px !important;
    padding: 6px !important;
  }

  .calendar-cell-planning-form {
    grid-template-rows: 30px 28px !important;
    gap: 4px !important;
  }

  .calendar-cell-planning-form select,
  .planning-project-select,
  .planning-shift-select,
  .calendar-assignment-select,
  .calendar-shift-select {
    height: 28px !important;
    min-height: 28px !important;
    font-size: 11px !important;
    padding: 0 5px !important;
  }

  .planning-employee-profile strong,
  .employee-name-cell strong {
    font-size: 12.5px !important;
  }

  .planning-employee-role,
  .employee-name-cell small {
    font-size: 11px !important;
  }

  .planning-employee-meta span {
    font-size: 9px !important;
    padding: 2px 5px !important;
  }
}

@media (max-width: 440px) {
  :root {
    --tap-planning-employee-width: 190px;
    --tap-planning-day-width: 88px;
  }

  /* Für sehr kleine Geräte: nicht quetschen, sondern scrollen lassen */
  .superadmin-company-table {
    min-width: 1320px !important;
  }

  .planning-calendar,
  .professional-planning-calendar,
  .employee-readonly-planning-calendar {
    min-width: max-content !important;
  }
}
/* =========================================================
   TAP V0.7.5 - FIRMENPLANUNG MITARBEITER-SPALTE FINAL
   Erzwingt breite erste Spalte ohne vertikalen Buchstabenbruch.
   ========================================================= */

.company-planning-page {
  --tap-company-planning-employee-width: 235px;
  --tap-company-planning-day-width: 150px;
}

/* Scroll-Container */
.company-planning-page .professional-planning-calendar-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Tabelle nicht zusammenquetschen */
.company-planning-page .professional-planning-calendar {
  table-layout: fixed !important;
  width: max-content !important;
  min-width: max-content !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* Colgroup absichern */
.company-planning-page col:first-child,
.company-planning-page col.planning-calendar-employee-col {
  width: var(--tap-company-planning-employee-width) !important;
  min-width: var(--tap-company-planning-employee-width) !important;
  max-width: var(--tap-company-planning-employee-width) !important;
}

.company-planning-page col:not(:first-child),
.company-planning-page col.planning-calendar-day-col {
  width: var(--tap-company-planning-day-width) !important;
  min-width: var(--tap-company-planning-day-width) !important;
  max-width: var(--tap-company-planning-day-width) !important;
}

/* Erste Spalte final erzwingen */
.company-planning-page .professional-planning-calendar tr > th:first-child,
.company-planning-page .professional-planning-calendar tr > td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 70 !important;

  width: var(--tap-company-planning-employee-width) !important;
  min-width: var(--tap-company-planning-employee-width) !important;
  max-width: var(--tap-company-planning-employee-width) !important;

  padding: 14px 16px !important;
  background: #ffffff !important;
  box-sizing: border-box !important;

  text-align: left !important;
  vertical-align: middle !important;

  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;

  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;

  overflow: hidden !important;
}

/* Header erste Spalte */
.company-planning-page .professional-planning-calendar thead tr > th:first-child {
  z-index: 120 !important;
  background: #eef2ff !important;
  color: #0f172a !important;

  font-size: 13px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;

  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* Alles innerhalb der ersten Spalte horizontal halten */
.company-planning-page .professional-planning-calendar tr > th:first-child *,
.company-planning-page .professional-planning-calendar tr > td:first-child * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;

  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Mitarbeiterprofil sauber */
.company-planning-page .planning-employee-profile,
.company-planning-page .employee-name-cell {
  display: grid !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.company-planning-page .planning-employee-profile strong,
.company-planning-page .employee-name-cell strong {
  display: block !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.company-planning-page .planning-employee-role,
.company-planning-page .employee-name-cell small {
  display: block !important;
  color: #2563eb !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.company-planning-page .planning-employee-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-top: 4px !important;
}

.company-planning-page .planning-employee-meta span {
  display: inline-flex !important;
  align-items: center !important;
  max-width: 100% !important;
  min-height: 21px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

/* Tages-Spalten */
.company-planning-page .professional-planning-calendar tr > th:not(:first-child),
.company-planning-page .professional-planning-calendar tr > td:not(:first-child) {
  width: var(--tap-company-planning-day-width) !important;
  min-width: var(--tap-company-planning-day-width) !important;
  max-width: var(--tap-company-planning-day-width) !important;
  box-sizing: border-box !important;
}

/* Tageszellen */
.company-planning-page .professional-calendar-cell {
  height: 118px !important;
  padding: 14px !important;
  vertical-align: middle !important;
}

/* Selects sauber */
.company-planning-page .calendar-cell-planning-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
}

.company-planning-page .calendar-cell-planning-form select,
.company-planning-page .planning-project-select,
.company-planning-page .planning-shift-select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 10px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

/* Heute-Spalte */
.company-planning-page .planning-today-column {
  background: #111827 !important;
  color: #ffffff !important;
}

.company-planning-page .planning-today-column span,
.company-planning-page .planning-today-column small {
  color: #ffffff !important;
}

.company-planning-page .planning-today-column-cell {
  box-shadow:
    inset 4px 0 0 #2563eb,
    inset -4px 0 0 #2563eb !important;
}

/* Tablet */
@media (max-width: 980px) {
  .company-planning-page {
    --tap-company-planning-employee-width: 220px;
    --tap-company-planning-day-width: 132px;
  }
}

/* Smartphone */
@media (max-width: 640px) {
  .company-planning-page {
    --tap-company-planning-employee-width: 205px;
    --tap-company-planning-day-width: 118px;
  }

  .company-planning-page .professional-calendar-cell {
    height: 108px !important;
    padding: 10px !important;
  }

  .company-planning-page .calendar-cell-planning-form select,
  .company-planning-page .planning-project-select,
  .company-planning-page .planning-shift-select {
    height: 38px !important;
    min-height: 38px !important;
    font-size: 12px !important;
  }
}
/* =========================================================
   MAIN DEMO FIRMENPLANUNG = PLANUNGSKALENDER STYLE
   ========================================================= */

.real-main-company-planning-table {
  width: 100% !important;
  min-width: 1180px !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.real-main-company-planning-table th,
.real-main-company-planning-table td {
  border: 1px solid #d9e2ef !important;
  padding: 14px !important;
  text-align: left !important;
  vertical-align: middle !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.real-main-company-planning-table th {
  background: #f5f7fa !important;
  color: #344054 !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  font-size: 12px !important;
}

.real-main-company-planning-table th:nth-child(1),
.real-main-company-planning-table td:nth-child(1) {
  width: 150px !important;
  min-width: 150px !important;
}

.real-main-company-planning-table th:nth-child(2),
.real-main-company-planning-table td:nth-child(2) {
  width: 135px !important;
  min-width: 135px !important;
}

.real-main-company-planning-table th:nth-child(3),
.real-main-company-planning-table td:nth-child(3) {
  width: 120px !important;
  min-width: 120px !important;
}

.real-main-company-planning-table th:nth-child(4),
.real-main-company-planning-table td:nth-child(4) {
  width: 130px !important;
  min-width: 130px !important;
}

.real-main-company-planning-table th:nth-child(n+5),
.real-main-company-planning-table td:nth-child(n+5) {
  width: 128px !important;
  min-width: 128px !important;
}

.real-main-company-planning-table td strong {
  color: #111827 !important;
  font-weight: 900 !important;
}

.real-main-company-planning-table td small {
  color: #64748b !important;
  font-weight: 800 !important;
}

.real-main-company-planning-table .weekend {
  background: #fff7ed !important;
}

.real-main-company-planning-table .dark-day {
  background: #111827 !important;
  color: #ffffff !important;
}

.real-main-company-planning-table .dark-day small {
  color: #ffffff !important;
}

.real-main-company-planning-table .shift-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 7px !important;
  padding: 6px 11px !important;
  border: 1px solid #60a5fa !important;
  border-radius: 999px !important;
  background: #dbeafe !important;
  color: #2563eb !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
}

@media (max-width: 760px) {
  .real-main-company-planning-table {
    min-width: 1080px !important;
  }

  .real-main-company-planning-table th,
  .real-main-company-planning-table td {
    padding: 11px !important;
    font-size: 12px !important;
  }
}
.superadmin-company-delete-form {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 16px;
  background: #fff1f2;
  display: grid;
  gap: 8px;
}

.superadmin-company-delete-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #7f1d1d;
}

.superadmin-company-delete-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 0 12px;
  background: #ffffff;
}

.superadmin-company-delete-form small {
  color: #991b1b;
}