/* Grundlayout */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0f172a;
    color: #0f172a;
}

/* Allgemeine Seite */
.ak-page {
    min-height: 100vh;
    background: #ffffff;
    padding: 1rem;
    box-sizing: border-box;
}

.ak-shell {
    max-width: 1100px;
    margin: 0 auto;
    background: #f9fafb;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header mit Logo */
.ak-header {
    background: linear-gradient(90deg, #281e0b, #0d1628);
    color: #e5e7eb;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ak-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ak-logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
    padding: 2px 4px;
}

.ak-app-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.ak-app-subtitle {
    font-size: 0.8rem;
    color: #cbd5f5;
}

.ak-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.4rem;
    gap: 1rem;
    width: 100%;
}

.ak-section-title {
    display: flex;
    flex-direction: column;

}

.ak-section-title-main {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.ak-section-title-sub {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-top: 0.2rem;
    margin-bottom: 1.25rem;
}

/* Checkbox */

/* Moderne AKRAIL Checkbox */
.ak-checkbox-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    appearance: none;                      /* Browser-Design deaktivieren */
    border: 2px solid #0f172a;             /* AKRAIL Orange */
    background: white;
    cursor: pointer;
    transition: 0.18s ease;
}

/* Wenn angeklickt */
.ak-checkbox-row input[type="checkbox"]:checked {
    background: #FE9803;                   /* Füllung AKRAIL Orange */
    border-color: #FE9803;
}

/* Checkbox-Fokus (kein blauer Browser-Müll) */
.ak-checkbox-row input[type="checkbox"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(254, 152, 3, 0.35);   /* sanfter orange Glow */
}


/* User-Info oben rechts */
.ak-header-user {
    font-size: 0.85rem;
    text-align: right;
}

/* AKRAIL Input-Design */

/* Normalzustand */
.ak-input,
.ak-textarea,
.ak-select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 2px solid #d1d5db;
    font-size: 0.95rem;
    background: #ffffff;
    color: #000000;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Placeholder */
.ak-input::placeholder,
.ak-textarea::placeholder {
    color: #9ca3af;
}

/* Fokus – AKRAIL-Orange */
.ak-input:focus,
.ak-textarea:focus,
.ak-select:focus {
    outline: none !important;
    border-color: #FE9803 !important;
    box-shadow: 0 0 0 2px rgba(254, 152, 3, 0.35);
}


/* Hauptinhalt */
.ak-main {
    padding: 1.75rem 2rem 2rem;
}

.ak-main h2 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    color: #0f172a;
}

/* Buttons & Links */

/* Desktop-Stil für "Neue Zeiten erfassen" */
.ak-btn-mobile-stack {
    /* kein eigenes Padding -> nimmt das von .ak-btn-primary */
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Buttons allgemein */
.ak-btn-primary,
.ak-btn-secondary {
    padding: 0.40rem 1.1rem;
    font-size: 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Primärer Button: Speichern */
.ak-btn-primary {
    background: linear-gradient(90deg, #1e1e1e, #000000);
    color: #ffffff;
    border: none;
}

.ak-btn-primary:hover {
    opacity: 0.85;
}

/* Sekundär: Zurück */
.ak-btn-secondary {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}

.ak-btn-secondary:hover {
    background: #e2e8f0;
}

.ak-actions-row {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    justify-content: space-between;   /* MAGIC LINE – bringt Speichern nach rechts */
    align-items: center;
    margin-top: 1.6rem;
    gap: 1rem;
}


.ak-btn-anmelden {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, #fe9803, #0d1628);
    color: #f9fafb;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}


.ak-btn-logout {
    background: transparent;
    color: #dc2626;
    padding: 0.2rem 0.55rem;
    border: 1px solid #dc2626;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.ak-btn-logout:hover {
    background: #dc2626;
    color: white;
}


.ak-btn-back {
    background: #f1f5f9;
    color: #1e293b;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.2s;
    border: 1px solid #cbd5e1;
}

.ak-btn-back:hover {
    background: #e2e8f0;
}

.ak-btn-create {
    padding: 0.55rem 1.1rem;   /* exakt gleiche Höhe wie deine anderen Buttons */
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
    white-space: nowrap;
}

/* DropDown ProfilePicture */
.ak-avatar-btn {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

/* Avatar: sauberer Kreis, Bild nicht „gebrochen“ */
.ak-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;                 /* schneidet nur, verzerrt nicht */
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #111827;     /* dunkler Außenring wie dein Header */
}

/* Initialen, wenn kein Bild vorhanden ist */
.ak-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fbbf24;
    color: #111827;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dropdown-Menü */
.ak-dropdown {
    position: absolute;
    right: 0;
    margin-top: 10px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    width: 260px;
    padding: 8px 0 10px;
    z-index: 999;
    color: #111827;           /* Text dunkel, nicht weiß */
    text-align: left;         /* nicht von .ak-header-user erben */
}

/* Header im Dropdown */
.ak-dropdown-header {
    padding: 12px 18px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.ak-dropdown-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #9ca3af;           /* wie in deinem Screenshot */
}

.ak-dropdown-email {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Items im Dropdown */
.ak-dropdown-item {
    display: block;
    padding: 10px 18px;
    text-decoration: none;
    color: #111827;
    font-size: 0.95rem;
    text-align: left;
}

.ak-dropdown-item:hover {
    background: #f3f4f6;
}

.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
}


/* Logout-Eintrag */
.ak-dropdown-logout {
    color: #e53935;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 18px;
}


/* Icon */
.ak-btn-create .ak-btn-icon {
    font-size: 1rem;
    margin-right: 0.3rem;
}

/* Text */
.ak-btn-create .ak-btn-text {
    display: block;
    text-align: left;
}

.ak-link {
    color: #fe9803;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.15rem;

}

.ak-link:hover {
    text-decoration: underline;
}

/* Tabelle */
.ak-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 0.75rem;
}

.ak-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.ak-table thead {
    background: #e5e7eb;
}

.ak-table th,
.ak-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

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

.ak-table tbody tr:nth-child(every) {
    background: #f9fafb;
}

.ak-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.ak-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.ak-badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.ak-badge-amber {
    background: #fef3c7;
    color: #92400e;
}

/* Formulare */
.ak-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1.25rem;
}

.ak-form-full {
    grid-column: 1 / -1;
}

.ak-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.15rem;
}


.ak-label-login {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom:0.15rem;
}


.ak-input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    background: #ffffff;   /* weißes Feld */
    color: #000000;        /* Text im Feld: schwarz */
    box-sizing: border-box;
}
.ak-input::placeholder {
    color: #9ca3af;
}

.ak-textarea,
.ak-select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 0.85rem;
    box-sizing: border-box;
    background: #fff;
}

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

.ak-textarea {
    min-height: 80px;
    resize: vertical;
}

/* Checkbox-Reihe */
.ak-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
}

/* Fehlermeldungen */
.ak-alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.45rem 0.7rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    margin-bottom: 0.7rem;
}

.ak-alert-success {
    background: #dcfce7;
    color: #166534;
    padding: 0.45rem 0.7rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    margin-bottom: 0.7rem;
}

/* Login / Register Layout */
.ak-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #ffffff 0, #ffffff 55%, #9a9a9a 100%);
    padding: 1.5rem 1rem;
    box-sizing: border-box;
}

.ak-auth-card {
    width: 100%;
    max-width: 420px;
    background: #0b1120;
    border-radius: 18px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
}

.ak-auth-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.3rem;
}

.ak-auth-logo {
    height: 38px;
    width: auto;
    border-radius: 999px;
    background: #020617;
    padding: 4px 8px;
}

.ak-auth-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.ak-auth-subtitle {
    font-size: 0.78rem;
    color: #9ca3af;
}

.ak-auth-footer {
    margin-top: 1.1rem;
    font-size: 0.8rem;
    text-align: center;
    color: #9ca3af;
}
.ak-break-mobile {
    display: inline;
}

/* Header auf Login-Seite: alles zentriert */
.ak-auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Großes Logo, präsent sichtbar */
.ak-auth-logo-big {
    width: 180px;            /* Logo breit */
    max-width: 70%;          /* dynamisch für kleinere Screens */
    height: auto;            /* proportional */
    display: block;
    margin: 0 auto;          /* zentriert */
    filter: drop-shadow(0 0 8px rgba(255, 180, 0, 0.4)); /* optional Glow */
}


/* Mobile */
@media (max-width: 768px) {
    .ak-shell {
        border-radius: 0.75rem;
        box-shadow: 0 12px 25px rgba(15, 23, 42, 0.55);
    }
    /* 1. Header-Zeile soll Titel und Button nebeneinander lassen */
    .ak-section-header {
        display: flex;
        flex-direction: row;        /* <<< WICHTIG */
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
    }

    /* 2. Titel darf weiterhin zweizeilig bleiben */
    .ak-section-title {
        display: flex;
        flex-direction: column;
    }

    /* 3. Button rechts, kompakt */
    .ak-btn-mobile-stack {
        width: auto;
        padding: 0.32rem 0.85rem;
        display: flex;
        flex-direction: row;        /* <<< Icon + Text in einer Zeile */
        flex-wrap: wrap;            /* bricht "erfassen" nach unten */
        justify-content: flex-start;
        gap: 0.25rem;
        align-self: center;         /* <<< WICHTIG: gleiche Höhe wie Titel */
    }

    /* Icon links vom Text */
    .ak-btn-mobile-stack .ak-btn-icon {
        margin-right: 0.3rem;
    }

    /* "erfassen" in die zweite Zeile */
    .ak-btn-mobile-stack span:last-child {
        flex-basis: 100%;
    }

    .ak-main {
        padding: 1rem;
    }

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

    .ak-header {
        flex-direction: row;
        align-items: center;
    }

    .ak-header-user {
        text-align: right;
        font-size: 0.78rem;
        margin-left: auto;
    }

    .ak-table {
        font-size: 0.75rem;
    }

    .ak-auth-card {
        padding: 1.5rem 1.2rem;
    }

    .ak-section-title-main {
        font-size: 1.05rem;   /* kleinerer Haupttitel */
    }

    .ak-section-title-sub {
        font-size: 0.75rem;
    }

    .ak-btn-primary {
        padding: 0.80rem 0.55rem !important;   /* weniger Höhe */
        font-size: 0.78rem !important;        /* kleinere Schrift */
        border-radius: 30px !important;       /* weniger „Pille“ */
        justify-content: center !important;   /* Text immer mittig */
        white-space: normal !important;        /* Zeilenumbruch erlauben */
        text-align: center !important;         /* Text zentrieren */
        line-height: 1.2 !important;           /* engere Zeilen */
    }

    .ak-form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }

    .ak-actions-row {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.75rem;
        align-items: center;
    }
    .ak-actions-row .ak-btn-primary {
        width: auto;
    }

    .ak-btn-create {
        padding: 0.30rem 0.9rem;
        font-size: 0.82rem;
        border-radius: 16px;
    }

    .ak-btn-create .ak-btn-text {
        white-space: normal;  /* Umbruch erlauben */
        text-align: center;
    }
}

