/* ========= Root / Theme ========= */
:root {
    --bg: #0f172a;
    --panel: #111827;
    --card: #1f2937;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --accent: #22d3ee;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Helvetica, Arial;
    color: var(--text);
    background: linear-gradient(120deg, #0f172a, #111827);
}

a {
    color: var(--accent);
    text-decoration: none;
}

/* ========= Layout ========= */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--card);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .20);
    margin-bottom: 1rem;
}


.card.tiny {
    padding: .9rem;
}

.card h2 {
    margin: 0 0 .8rem;
}

.grid {
    display: grid;
    gap: .75rem;
}

.cards {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.muted {
    color: var(--muted);
}

.row {
    margin: .45rem 0;
}

.actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

/* ========= Header compatto ========= */
.headbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0e1a2b;
    padding: .6rem 1rem;
    border-bottom: 1px solid #243244;
    position: sticky;
    top: 0;
    z-index: 50;
}

.head-left {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #cbd5e1;
    font-weight: 700;
}

.head-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}

.head-right {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.user-pill {
    color: #cbd5e1;
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.logout-btn {
    background: #64748b;
    color: #fff;
    border: 0;
    border-radius: .45rem;
    padding: .38rem .66rem;
    font-weight: 700;
    cursor: pointer;
    transition: .15s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
}

.logout-btn:hover {
    filter: brightness(1.08);
}

/* ========= Inputs & Buttons ========= */
label {
    display: grid;
    gap: .25rem;
}

input[type=text],
input[type=password],
input[type=date] {
    background: #0b1220;
    border: 1px solid #233146;
    border-radius: 10px;
    color: var(--text);
    padding: .65rem;
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn,
button {
    display: inline-block;
    background: var(--accent);
    color: #0b1220;
    border: 0;
    border-radius: 999px;
   /*  padding: .6rem 1rem; */
    font-weight: 700;
    cursor: pointer;
}
.btnn {
    display: inline-block;
    background: var(--accent);
    color: #0b1220;
    border: 0;
    border-radius: 999px;
   padding: .6rem 1rem;  
    font-weight: 700;
    cursor: pointer;
}


.btn--sm {
    padding: .4rem .8rem;
    font-size: .9rem;
}

/* ========= Dropzone ========= */
.dropzone {
    border: 2px dashed #334155;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    background: #0b1220;
}

.dropzone.drag {
    border-color: var(--accent);
    background: rgba(34, 211, 238, .08);
}

.dz-label {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
}

/* ========= Thumbs ========= */
.thumb {
    position: relative;
}

.thumb-img {
    max-width: 100%;
    border-radius: 12px;
    display: block;
}

.thumb .dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0ea5b7;
    color: #0b1220;
    border: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}

/* ========= URL pill + Copy ========= */
.url {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.url-input {
    width: 100%;
    background: #0b1220;
    border: 1px solid #233146;
    border-radius: 999px;
    color: var(--text);
    padding: .55rem .9rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .95rem;
}

.url-input:focus {
    outline: none;
    border-color: var(--accent);
}

.copy-btn {
    background: var(--accent);
    color: #0b1220;
    border: 0;
    border-radius: 999px;
    padding: .5rem .9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn.ok {
    background: #16a34a;
    color: #03140f;
}

/* ========= Repository (filtri + tabella) ========= */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: .5rem 0 1rem;
}

.filter-input {
    min-width: 260px;
}

.filter-date {
    min-width: 190px;
}

.table-wrap {
    /* nessuno scroll, cresce con le righe */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem .9rem;
    border-bottom: 1px solid #223046;
    vertical-align: middle;
}

th {
    color: #8aa0b8;
    text-align: left;
    font-weight: 700;
    background: #111a2a;
}

td {
    color: #e5e7eb;
    background: #0b1220;
}

tr:hover td {
    background: rgba(255, 255, 255, .02);
}

.col-actions {
    width: 160px;
}

/* Icon buttons (bianche) */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #2b3a52;
    background: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .06s ease, filter .15s ease;
    margin-right: .4rem;
}

.icon-btn svg {
    display: block;
 
}

.icon-btn:hover {
    filter: brightness(1.15);
}

.icon-btn.danger {
    background: #b91c1c;
    border-color: #b91c1c;
}

.icon-btn.ok {
    box-shadow: 0 0 0 2px rgba(34, 211, 238, .45) inset;
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* ========= Feedback ========= */
.ok {
    color: #16a34a;
}

.error {
    color: #ef4444;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* prende tutta l'altezza dello schermo */
}

.login-card {
    background-color: #1E2A38;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 620px; /* larghezza massima */
    width: 100%;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    color: #fff;
}

.login-card label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    color: #fff;
}

.login-card input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: none;
    background-color: #0D1B2A;
    color: white;
    font-size: 1rem;
}

.login-card button {
    width: 100%;
    padding: 0.8rem;
    background-color: #1DD3F8;
    color: #000;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
}

.login-card button:hover {
    background-color: #14bcd1;
}

.table-wrap {
    background-color:#0a1220; /* stesso blu scuro delle altre card */
    border-radius: 10px;
    overflow: hidden; /* per arrotondare anche i contenuti */
    padding: 0; /* rimuove spazi extra se non desiderati */
}

#repoTable {
    border-collapse: collapse;
    width: 100%;
}

#repoTable thead th {
    background-color: #0a1220; /* coerente col contenitore */
    color: #e5e7eb; /* testo chiaro */
    padding: 10px;
    text-align: left;
}

#repoTable tbody td {
    background-color: #0a1220; /* leggermente più scuro per il corpo */
    color: #f3f4f6;
    padding: 10px;
}

/* ========= Responsive ========= */
@media (max-width:900px) {
    .container {
        padding: 0 .75rem;
    }

    .card {
        padding: 1rem;
    }
}

@media (max-width:600px) {
    .headbar {
        padding: .5rem .75rem;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input,
    .filter-date {
        width: 100%;
        min-width: 0;
    }

    .url {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    .copy-btn {
        width: 100%;
        text-align: center;
    }

    .col-actions {
        width: auto;
    }
}