:root {
    --mr-bg: #12111a;
    --mr-card: #1c1a26;
    --mr-accent: #e0455f;
    --mr-text: #f2f0f5;
    --mr-muted: #a9a5b8;
    --mr-border: #34303f;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--mr-bg);
    color: var(--mr-text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.intro {
    color: var(--mr-muted);
    margin-bottom: 2rem;
}

fieldset {
    border: 1px solid var(--mr-border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--mr-card);
}

legend {
    padding: 0 0.5rem;
    font-weight: 600;
    color: var(--mr-accent);
}

label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border-radius: 6px;
    border: 1px solid var(--mr-border);
    background: #14131c;
    color: var(--mr-text);
    font-size: 1rem;
}

textarea {
    resize: vertical;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .input-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.7rem;
    background: #1f1d29;
    border: 1px solid var(--mr-border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: var(--mr-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.input-group input {
    border-radius: 0 6px 6px 0;
}

.required-note {
    color: var(--mr-muted);
    font-size: 0.85rem;
}

button[type="submit"] {
    background: var(--mr-accent);
    color: #fff;
    border: none;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    font-size: 1.05rem;
    cursor: pointer;
}

button[type="submit"]:hover {
    filter: brightness(1.1);
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #1f3d2b;
    border: 1px solid #2f7a4d;
}

.alert-error {
    background: #3d1f24;
    border: 1px solid #7a2f3a;
}

.alert-error ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* --- Pannello amministrazione --- */

.container-narrow {
    max-width: 420px;
}

.login-form button[type="submit"] {
    width: 100%;
    margin-top: 1.5rem;
}

.container-wide {
    max-width: 1200px;
}

select {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border-radius: 6px;
    border: 1px solid var(--mr-border);
    background: #14131c;
    color: var(--mr-text);
    font-size: 1rem;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-header h1 {
    margin: 0;
}

.admin-user {
    color: var(--mr-muted);
    font-size: 0.9rem;
    margin-right: 0.75rem;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.btn-secondary {
    background: transparent;
    color: var(--mr-text);
    border: 1px solid var(--mr-border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    border-color: var(--mr-accent);
}

.btn-link {
    color: var(--mr-accent);
    text-decoration: none;
    font-size: 0.9rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

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

.btn-danger {
    color: #ff6b81;
}

.table-scroll {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--mr-card);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--mr-border);
    text-align: left;
    font-size: 0.9rem;
    vertical-align: top;
}

.admin-table th {
    color: var(--mr-muted);
    font-weight: 600;
    white-space: nowrap;
}

.admin-table a {
    color: var(--mr-accent);
}

.cell-note {
    color: var(--mr-muted);
    font-size: 0.8rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.actions-cell {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.badge-new      { background: #2a2f52; color: #9cb3ff; }
.badge-reviewed { background: #4a3d1f; color: #f0c96b; }
.badge-accepted { background: #1f3d2b; color: #6bdc94; }
.badge-rejected { background: #3d1f24; color: #ff6b81; }
