/* ===========================================
   Linkflux Engine – engine.css
   Gilt für: dashboard.php, new.php, etc.
   =========================================== */

/* ─── Dashboard Layout ───────────────────── */
.dash-wrap { padding: 48px 0 80px; }

.dash-head { margin-bottom: 32px; }
.dash-head h1 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 4px;
}
.dash-head p { font-size: 14px; color: #e7e7e5; }

/* ─── Stat Cards ─────────────────────────── */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}

.stat-card {
    background: #0d1017;
    padding: 20px 22px;
}

.stat-card-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #e7e7e5;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    line-height: 1;
}

.stat-card-value.grad {
    background: linear-gradient(135deg, #4f8ef7, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-value.green { color: #4ade80; }
.stat-card-value.red   { color: #f87171; }
.stat-card-value.muted { color: #a855f7; }

/* ─── Actions ────────────────────────────── */
.dash-actions { margin-bottom: 20px; }

/* ─── Table ──────────────────────────────── */
.dash-table {
    background: #0d1017;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    overflow: hidden;
}

.dash-table-head {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px 80px 90px 130px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #e7e7e5;
    letter-spacing: 0.06em;
}

.dash-row {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px 80px 90px 130px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    align-items: center;
    transition: background 0.15s;
}

.dash-row:last-child { border-bottom: none; }
.dash-row:hover { background: rgba(255,255,255,0.02); }

.dash-row .row-id {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #e7e7e5;
}

/* ─── Link Copy ──────────────────────────── */
.link-copy-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.link-copy-wrap input {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #7fb3fa;
    outline: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-copy {
    flex-shrink: 0;
    background: rgba(79,142,247,0.1);
    border: 1px solid rgba(79,142,247,0.2);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #7fb3fa;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-copy:hover { background: rgba(79,142,247,0.2); }

.btn-copy.copied {
    background: rgba(74,222,128,0.1);
    border-color: rgba(74,222,128,0.25);
    color: #4ade80;
}

/* ─── Klick-Zahlen ───────────────────────── */
.row-num {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

.row-num.total { color: #e8e6e2; }
.row-num.real  { color: #4ade80; }
.row-num.bot   { color: #f87171; }
.row-num.lf    { color: #a855f7; }

.row-date {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #e7e7e5;
    text-align: right;
}

/* ─── Empty State ────────────────────────── */
.dash-empty {
    padding: 48px 20px;
    text-align: center;
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    color: #e7e7e5;
}

.dash-empty a { color: #7fb3fa; text-decoration: none; }
.dash-empty a:hover { text-decoration: underline; }

/* ─── Error / Success Banner ─────────────── */
.dash-error,
.dash-success {
    border-radius: 8px;
    padding: 12px 18px;
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    margin-bottom: 24px;
}

.dash-error {
    background: rgba(248,113,113,0.08);
    border: 1px solid rgba(248,113,113,0.2);
    color: #f87171;
}

.dash-success {
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.2);
    color: #4ade80;
}

/* ─── Login Box ──────────────────────────── */
.login-wrap {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
}

.login-box {
    background: #0d1017;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.login-box .login-sub {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: #3a3a38;
    margin-bottom: 28px;
}

.login-box input[type="email"],
.login-box input[type="password"] {
    width: 100%;
    display: block;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    color: #e8e6e2;
    outline: none;
    margin-bottom: 12px;
    transition: border-color 0.15s;
    font-family: inherit;
}

.login-box input:focus { border-color: rgba(79,142,247,0.4); }
.login-box input::placeholder { color: #3a3a38; }

.login-box .btn {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    font-size: 14px;
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 900px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }

    .dash-table-head,
    .dash-row {
        grid-template-columns: 50px 1fr 70px 70px 60px;
    }

    /* Bot-Spalte (5) + Datum (7) ausblenden */
    .dash-table-head div:nth-child(5),
    .dash-table-head div:nth-child(7),
    .dash-row > *:nth-child(5),
    .dash-row > *:nth-child(7) { display: none; }
}

@media (max-width: 600px) {
    .stat-cards { grid-template-columns: 1fr 1fr; }

    .dash-table-head,
    .dash-row { grid-template-columns: 40px 1fr 60px 60px; }

    /* LF-Spalte (6) auch ausblenden */
    .dash-table-head div:nth-child(6),
    .dash-row > *:nth-child(6) { display: none; }

    .login-box { padding: 28px 20px; }
}

/* ─── API Seite ───────────────────────── */

.api-card {
background: #0d1017;
border: 1px solid rgba(255,255,255,0.07);
border-radius: 12px;
padding: 24px;
margin-bottom: 20px;
}

.api-label {
font-family: 'DM Mono', monospace;
font-size: 11px;
color: #9aa0aa;
margin-bottom: 10px;
letter-spacing: 0.06em;
}

.api-key-wrap {
display: flex;
gap: 10px;
}

.api-key-wrap input {
flex: 1;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 6px;
padding: 10px;
font-family: 'DM Mono', monospace;
color: #7fb3fa;
}

.api-code {
background: #080a0f;
padding: 16px;
border-radius: 8px;
font-family: 'DM Mono', monospace;
font-size: 12px;
color: #cfd3dc;
overflow-x: auto;
}

.api-hint {
margin-top: 10px;
font-size: 12px;
color: #777;
}


.api-step {
font-size: 13px;
font-weight: 600;
color: #fff;
margin-top: 18px;
margin-bottom: 6px;
}

.api-list {
list-style: none;
padding-left: 0;
font-size: 13px;
color: #cfd3dc;
}

.api-list li {
margin-bottom: 4px;
}

/* Embed Button */
.btn-embed {
    background: #1e1e2e;
    color: #a78bfa;
    border: 1px solid #a78bfa44;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
}
.btn-embed:hover {
    background: #a78bfa22;
}

/* Modal */
.embed-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.embed-modal-box {
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 28px;
    width: 560px;
    max-width: 90vw;
}
.embed-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}
.embed-modal-head button {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
}
.embed-modal-hint {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}
.embed-code {
    width: 100%;
    background: #0d0d1a;
    color: #a78bfa;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    resize: none;
    height: 80px;
    box-sizing: border-box;
    margin-bottom: 14px;
}

.embed-preview-label {
    font-size: 0.82rem;
    color: #888;
    margin: 18px 0 8px;
}
.embed-preview {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px;
    min-height: 60px;
}