/* ---------- Base ---------- */
html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: #e6ffe6;
    overflow: hidden;
}

/* ---------- Colors ---------- */
:root {
    --bg-main: #0b0f0c;
    --bg-card: #111815;
    --green-main: #00ff88;
    --green-soft: #00cc6a;
    --green-glow: rgba(0, 255, 136, 0.35);
}

/* ---------- Background ---------- */
.cyber-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 30%, rgba(0,255,136,0.08), transparent 40%),
        linear-gradient(120deg, #060b08, #0b120e, #060b08);
    overflow: hidden;
}


/* animated background sweep */
.cyber-bg::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(0,255,136,0.10),
        transparent 70%
    );
    filter: blur(40px);
    animation: backgroundSweep 22s ease-in-out infinite;
    pointer-events: none;
}

/* scanlines */
.cyber-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.02),
        rgba(255,255,255,0.02) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* ---------- login card ---------- */
.login-card {
    width: 100%;
    background: linear-gradient(180deg, #0e1512, #0a100d);
    border-radius: 8px;
    border: 1px solid rgba(0,255,136,0.25);
}

.login-card--narrow {
    max-width: 380px;
    margin: 0 auto;
}

/* ---------- title ---------- */
.login-title {
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--green-main);
    text-shadow:
        0 0 8px var(--green-glow),
        0 0 20px rgba(0,255,136,0.25);
}

.login-title::after {
    content: "_";
    margin-left: 4px;
    opacity: 0.7;
    animation: blink 1.2s steps(1) infinite;
}

/* ---------- labels ---------- */
label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #7fa68c;
}

/* ---------- inputs ---------- */
.cyber-input {
    background-color: #0c1310;
    border: 1px solid rgba(0,255,136,0.25);
    color: #e6ffe6;
    border-radius: 6px;
}

.cyber-input::placeholder {
    color: rgba(127,166,140,0.5);
}

.cyber-input:focus {
    background-color: #0c1310;
    color: #e6ffe6;
    border-color: var(--green-main);
    box-shadow:
        0 0 0 1px var(--green-main),
        0 0 12px var(--green-glow);
}

/* ---------- button ---------- */
.btn-cyber {
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    color: #06100a;
    letter-spacing: 2px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    box-shadow:
        0 0 12px var(--green-glow),
        inset 0 0 10px rgba(255,255,255,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cyber:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 25px rgba(0,255,136,0.6),
        0 0 40px rgba(0,255,136,0.25);
}

/* ---------- Secondary Action Button ---------- */
.btn-cyber-secondary {
    background: transparent;
    color: var(--green-main);
    border: 1px solid rgba(0,255,136,0.35);
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;

    box-shadow: none;
    transition: all 0.2s ease;
}

.btn-cyber-secondary:hover {
    background: rgba(0,255,136,0.08);
    box-shadow: 0 0 12px var(--green-glow);
    color: var(--green-main);
}

/* ---------- animations ---------- */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 25px rgba(0,255,136,0.15);
    }
    50% {
        box-shadow: 0 0 45px rgba(0,255,136,0.35);
    }
}

@keyframes sweep {
    0% { transform: translateX(-60%); }
    100% { transform: translateX(60%); }
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes backgroundSweep {
    0%   { transform: translateX(-40%); }
    50%  { transform: translateX(40%); }
    100% { transform: translateX(-40%); }
}


/* ---------- dashboard ---------- */
.dashboard-title {
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--green-main);
    text-shadow:
        0 0 10px var(--green-glow),
        0 0 30px rgba(0,255,136,0.25);
}

/* ---------- app cards ---------- */
.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    background: linear-gradient(180deg, #0e1512, #0a100d);
    border-radius: 10px;
    border: 1px solid rgba(0,255,136,0.25);
    text-decoration: none;
    color: var(--green-main);
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 30px rgba(0,255,136,0.4),
        0 0 60px rgba(0,255,136,0.2);
}

/* ---------- icon ---------- */
.app-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 6px rgba(0,255,136,0.6));
}

/* ---------- app name ---------- */
.app-name {
    font-weight: 600;
    letter-spacing: 2px;
}

/* ---------- logout ---------- */
.logout-link {
    color: #7fa68c;
    letter-spacing: 2px;
    text-decoration: none;
}

.logout-link:hover {
    color: var(--green-main);
    text-shadow: 0 0 8px var(--green-glow);
}

/* ---------- App Root ---------- */
.app-root {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0; /* extrem wichtig für Scroll */
}

/* ---------- Header ---------- */
.app-header {
    height: 80px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(6,11,8,0.95), rgba(6,11,8,0.85));
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(0,255,136,0.15);
}

/* ---------- Footer ---------- */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    height: 40px;
    z-index: 3;

    background: linear-gradient(
        0deg,
        rgba(6,11,8,0.95),
        rgba(6,11,8,0.85)
    );

    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(0,255,136,0.15);

    font-size: 0.75rem;
    color: #3f5f4f;
}

/* ---------- Main ---------- */
.app-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 2rem;

    /* Platz für fixen Footer */
    padding-bottom: calc(2rem + 40px);
}
/* ---------- Cards ---------- */
.login-card {
    background: linear-gradient(180deg, #0e1512, #0a100d);
    border-radius: 8px;
    border: 1px solid rgba(0,255,136,0.25);
}

/* ---------- Title ---------- */
.login-title {
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--green-main);
    text-shadow:
        0 0 8px var(--green-glow),
        0 0 20px rgba(0,255,136,0.25);
}

/* ---------- Inputs ---------- */
.cyber-input {
    background-color: #0c1310;
    border: 1px solid rgba(0,255,136,0.25);
    color: #e6ffe6;
}

.cyber-input:focus {
    border-color: var(--green-main);
    box-shadow: 0 0 12px var(--green-glow);
}

/* ---------- Button ---------- */
.btn-cyber {
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    color: #06100a;
    font-weight: 700;
    letter-spacing: 2px;
    border: none;
}

/* ---------- Notes Scroll ---------- */
.notes-scroll {
    max-height: 60vh;
    overflow-y: auto;
}

/* ---------- Notizenliste Links ---------- */
.note-link {
    display: block;
    color: #e6ffe6;
    text-decoration: none;
}

.note-link:hover {
    color: #e6ffe6;
    text-decoration: none;
}
.note-link:visited {
    color: #e6ffe6;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    color: #00ff88;
    margin-top: 1.2em;
}

.markdown-body a {
    color: #00ff88;
    text-decoration: underline;
}

.markdown-body code {
    background: rgba(0,255,136,0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

.markdown-body pre {
    background: #0c1310;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}


/* =========================================================
   MOBILE OPTIMIERUNG
   ========================================================= */

@media (max-width: 576px) {
    body::before {
        content: "Diese Anwendung ist für Desktop optimiert.";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #0b0f0c;
        color: #7fa68c;
        text-align: center;
        font-size: 0.75rem;
        padding: 0.25rem;
        z-index: 9999;
    }
}
/* ====== Ledger Grid ====== */
.ledger-grid {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 2rem;
}
/* ---------- App Navigation ---------- */
.app-nav {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;

    background: linear-gradient(
        180deg,
        rgba(6,11,8,0.9),
        rgba(6,11,8,0.75)
    );

    border-bottom: 1px solid rgba(0,255,136,0.15);
    backdrop-filter: blur(6px);
}

/* ---------- Nav Groups ---------- */
.nav-left,
.nav-right {
    display: flex;
    gap: 1.5rem;
}

/* ---------- Nav Items ---------- */
.nav-item {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #7fa68c;
    position: relative;
    padding: 0.25rem 0;
}

/* Hover */
.nav-item:hover {
    color: var(--green-main);
    text-shadow: 0 0 8px var(--green-glow);
}

/* Active */
.nav-item.active {
    color: var(--green-main);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--green-main);
    box-shadow: 0 0 8px var(--green-glow);
}

/* Logout */
.nav-item.logout {
    color: #ff6b6b;
}

.nav-item.logout:hover {
    color: #ff9a9a;
    text-shadow: 0 0 8px rgba(255,100,100,0.5);
}
/* ---------- Admin Cards ---------- */
.admin-card {
    background: linear-gradient(180deg, #0e1512, #0a100d);
    border: 1px solid rgba(0,255,136,0.25);
    border-radius: 14px;
    box-shadow:
        0 0 40px rgba(0,255,136,0.1),
        0 0 120px rgba(0,0,0,0.9);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table tr {
    transition: background 0.2s ease;
}

.admin-table tr:hover {
    background: rgba(0,255,136,0.06);
}

.admin-table th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #7fa68c;
    padding-bottom: 0.75rem;
}

.admin-table td {
    padding: 0.75rem 0;
    border-top: 1px solid rgba(0,255,136,0.08);
}

/* ---------- Role Badge ---------- */
.role-badge {
    font-size: 0.65rem;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
}

.role-admin {
    background: rgba(255, 200, 0, 0.15);
    color: #ffcc00;
}

.role-user {
    background: rgba(0,255,136,0.1);
    color: var(--green-main);
}

/* ---------- Checkbox Grid ---------- */
.app-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.btn-danger-cyber {
    border: 1px solid rgba(255,80,80,0.4);
    color: #ff6b6b;
    background: transparent;
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.btn-danger-cyber:hover {
    background: rgba(255,80,80,0.1);
    box-shadow: 0 0 12px rgba(255,80,80,0.4);
    color: #ff9a9a;
}