* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f5;
    color: #222;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem;
    background: #ffc400; /* OTIT-Gelb */
}

.app-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.header-actions button {
    border: none;
    padding: .4rem .8rem;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: .9rem;
}

.logout-link {
    font-size: .85rem;
    color: #444;
    text-decoration: none;
}

.app-main {
    max-width: 960px;
    margin: 1rem auto;
    padding: 0 1rem 2rem;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.card h2 {
    margin-top: 0;
    font-size: 1rem;
    margin-bottom: .5rem;
}

/* Kunden-Swatches */

.customer-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.customer-swatch {
    padding: .4rem .8rem;
    border-radius: 999px;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: .85rem;
    background: #fafafa;
}

.customer-swatch.active {
    background: #009688;  /* OTIT-Grün */
    color: #fff;
    border-color: #009688;
}

/* Task + Mic */

.task-input-row {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}

.task-input-row input {
    flex: 1;
    padding: .6rem .8rem;
    border-radius: 999px;
    border: 1px solid #ccc;
    font-size: .9rem;
}

#mic-button {
    width: 3rem;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    background: #eee;
}

/* Buttons */

button.primary {
    margin-top: .75rem;
    border: none;
    padding: .6rem 1.2rem;
    border-radius: 999px;
    background: #009688;
    color: #fff;
    font-size: .9rem;
    cursor: pointer;
}

/* Jetzt-Box */

.now-content.empty {
    color: #888;
}
.now-layout {
    display: flex;
    align-items: stretch;
    gap: 1rem;
}

.now-main {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .4rem;
}

/* Kunde und Aufgabe deutlich größer */
.now-customer {
    font-size: 1.2rem;      /* ca. 60 % größer als Standard */
    font-weight: 500;
    color: #004d4a;
}

.now-task {
    font-size: 1.2rem;      /* ca. doppelt so groß wie vorher */
    font-weight: 500;
    color: #333;
}

/* Timer deutlich größer (ca. 200% über vorher) */
.timer-display {
    margin-top: .6rem;
    font-family: monospace;
    font-size: 5.2rem;      /* 3× größer */
    font-weight: 700;
    line-height: 1;
}


/* Rechte Seite: großer Start/Stop-Button auf ~50 % Breite */
.now-actions {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button über gesamte Höhe/Breite, optisch dominant */
.now-big-button {
    width: 100%;
    height: 100%;
    font-size: 1.6rem;
    padding: 1rem;
    border-radius: 18px;
}

/* Start/Stop Buttons im Stil der Vorlage */

.timer-buttons {
    display: flex;
    gap: .75rem;
    margin-top: .75rem;
}

.btn-start, .btn-stop {
    border: none;
    padding: .6rem 1.8rem;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,.2);
}

.btn-start {
    background: #00b64f;
}

.btn-stop {
    background: #ff4b4b;
}



/* Verlauf */

.history-item {
    border-bottom: 1px solid #eee;
    padding: .4rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}

.history-meta {
    flex: 1;
}

.history-actions button {
    border: none;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .8rem;
    cursor: pointer;
    background: #e0f2f1;
    color: #004d4a;
}

/* Kundenstunden-Buttons im Footer */

.customer-hours {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.customer-hours-btn {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: space-between;
    align-items: center;
    padding: .5rem .9rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #009688;
    font-size: .85rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.customer-hours-btn span.label {
    font-weight: 600;
    color: #004d4a;
}

.customer-hours-btn span.hour-badge {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: .15rem .6rem;
    border-radius: 999px;
    background: #e0f2f1;
    color: #004d4a;
}

.customer-hours-btn:hover {
    background: #f3fbfa;
}

/* Modal */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    width: min(480px, 95vw);
    max-height: 90vh;
    overflow: auto;
}

.modal-content label {
    display: block;
    margin-bottom: .6rem;
    font-size: .85rem;
}

.modal-content input[type="text"],
.modal-content input[type="number"] {
    width: 100%;
    padding: .4rem .6rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .75rem;
}

/* Login */

.login-container {
    max-width: 360px;
    margin: 3rem auto;
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.login-container h1 {
    margin-top: 0;
}

.login-container label {
    display: block;
    margin-bottom: .6rem;
}

.login-container input {
    width: 100%;
    padding: .4rem .6rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.login-container button {
    margin-top: .75rem;
    width: 100%;
    padding: .5rem;
    border-radius: 999px;
    border: none;
    background: #009688;
    color: #fff;
    cursor: pointer;
}

.error {
    color: #b00020;
    margin-bottom: .5rem;
}

/* Responsive */

@media (max-width: 600px) {
    /* ... bestehende Regeln ... */

    .now-layout {
        flex-direction: column;
    }

    .now-actions {
        width: 100%;
    }

    .now-big-button {
        height: auto;
    }
}

/* Header-Navigation Links */
.header-actions .nav-link {
    font-size: .85rem;
    text-decoration: none;
    color: #444;
    padding: .3rem .6rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.header-actions .nav-link-active,
.header-actions .nav-link:hover {
    border-color: #009688;
    background: #ffffff;
}

/* Backend: Formular zum Hinzufügen */
.admin-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .75rem 0 1rem;
}

.admin-add-form > * {
    flex: 1 1 160px;
}

/* Backend: Tabelle */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #eee;
    padding: .35rem .3rem;
    vertical-align: middle;
}

.admin-table th {
    text-align: left;
    font-weight: 600;
    color: #555;
}

.admin-input,
.admin-select {
    width: 100%;
    font-size: .8rem;
    padding: .2rem .3rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.admin-actions {
    display: flex;
    gap: .25rem;
}

.admin-btn-save,
.admin-btn-delete {
    border: none;
    padding: .3rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    cursor: pointer;
}

.admin-btn-save {
    background: #009688;
    color: #fff;
}

.admin-btn-delete {
    background: #ff4b4b;
    color: #fff;
}

@media (max-width: 600px) {
    .admin-actions {
        flex-direction: column;
    }
}

/* User Badge */
.user-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-left: 0.75rem;
}
