/* Reset leggero */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    background-color: #f4f5f7;
    color: #333;
}

/* Layout generale */
header {
    background: linear-gradient(135deg, #0b4f6c, #145da0);
    color: #fff;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

header h1 {
    font-size: 20px;
    font-weight: 600;
}

header nav a {
    color: #e4f1ff;
    text-decoration: none;
    margin-left: 15px;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

header nav a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

main {
    max-width: 1100px;
    margin: 25px auto 40px;
    padding: 0 15px;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px 10px;
    font-size: 12px;
    color: #777;
    border-top: 1px solid #ddd;
    background-color: #fdfdfd;
}

/* Titoli e testi */
h2 {
    margin-bottom: 18px;
    font-size: 22px;
    color: #0b4f6c;
}

p {
    margin-bottom: 10px;
}

/* Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

table thead tr {
    background-color: #145da0;
    color: #fff;
}

table th,
table td {
    padding: 10px 12px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

table tr:nth-child(even) {
    background-color: #f9fafb;
}

table tr:hover {
    background-color: #eef5ff;
}

/* Link azioni in tabella */
table a {
    font-size: 13px;
    color: #145da0;
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}

/* Form generici */
form {
    background-color: #fff;
    padding: 18px 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    max-width: 600px;
}

label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccd3dd;
    font-size: 14px;
    margin-top: 4px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fdfdfd;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #145da0;
    box-shadow: 0 0 0 2px rgba(20,93,160,0.15);
}

/* Bottoni */
button,
.button,
input[type="submit"] {
    display: inline-block;
    padding: 8px 16px;
    background-color: #145da0;
    color: #fff;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.05s;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
    background-color: #0e4a88;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

button:active,
.button:active,
input[type="submit"]:active {
    transform: scale(0.98);
}

/* Link “annulla” */
a.cancel-link {
    margin-left: 8px;
    font-size: 14px;
}

/* Messaggi di errore / successo */
.message-error {
    background-color: #ffe5e5;
    border: 1px solid #ffb6b6;
    color: #a60000;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

.message-success {
    background-color: #e5ffe9;
    border: 1px solid #9ed3a9;
    color: #1b6b2b;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

/* Link "Aggiungi nuovo prodotto" ecc. */
a.action-link {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 14px;
    text-decoration: none;
    color: #145da0;
}

a.action-link:hover {
    text-decoration: underline;
}

/* Responsivo base */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    header nav a {
        margin-left: 0;
        margin-right: 8px;
        display: inline-block;
        margin-bottom: 4px;
    }

    main {
        margin-top: 20px;
    }

    table th,
    table td {
        font-size: 13px;
        padding: 8px 6px;
    }
}
/* Dashboard cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 18px;
    margin-bottom: 24px;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 6px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #777;
}

.dashboard-card-value {
    font-size: 24px;
    font-weight: 600;
    color: #145da0;
}

.dashboard-card-sub {
    font-size: 12px;
    color: #999;
}

.pending-highlight {
    color: #c45b00;
}
/* Status badge ordini */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-pending {
    background-color: #fff4e0;
    color: #c45b00;
}

.status-confirmed {
    background-color: #e5ffe9;
    color: #1b6b2b;
}

.status-shipped {
    background-color: #e0f0ff;
    color: #145da0;
}

.status-cancelled {
    background-color: #ffe5e5;
    color: #a60000;
}

/* Form per cambio stato */
.order-status-form {
    margin-top: 10px;
    margin-bottom: 20px;
    max-width: 320px;
}
/* ========== HOME / LANDING ========== */

.hero {
    padding: 40px 15px 50px;
    background: radial-gradient(circle at top left, #145da0 0, #0b4f6c 35%, #031927 100%);
    color: #fff;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
    gap: 28px;
    align-items: center;
}

.hero-logo img {
    max-height: 60px;
    margin-bottom: 14px;
}

.hero h2 {
    font-size: 28px;
    margin-bottom: 14px;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 18px;
    color: #e4f1ff;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.hero-button {
    font-size: 15px;
    padding: 9px 20px;
}

.hero-link {
    font-size: 14px;
    text-decoration: none;
    color: #e4f1ff;
    border-bottom: 1px solid transparent;
}

.hero-link:hover {
    border-bottom-color: #e4f1ff;
}

.hero-trust {
    font-size: 13px;
    color: #c9dcff;
    margin-top: 8px;
}

.hero-panel {
    display: flex;
    justify-content: flex-end;
}

.hero-panel-box {
    background-color: rgba(3, 25, 39, 0.95);
    border-radius: 10px;
    padding: 18px 18px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    max-width: 360px;
}

.hero-panel-box h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #f5f9ff;
}

.hero-list {
    list-style: none;
    padding-left: 0;
    font-size: 13px;
    color: #d4e4ff;
}

.hero-list li {
    margin-bottom: 6px;
    position: relative;
    padding-left: 14px;
}

.hero-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #5ec4ff;
}

/* Features section */
.features {
    background-color: #f4f5f7;
    padding: 35px 15px 45px;
}

.features-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.features-inner h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #0b4f6c;
}

.features-intro {
    font-size: 15px;
    max-width: 700px;
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.feature-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.feature-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #145da0;
}

.feature-card p {
    font-size: 14px;
    line-height: 1.5;
}

/* CTA finale */
.cta-final {
    padding: 35px 15px 45px;
    background-color: #ffffff;
}

.cta-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-inner h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #0b4f6c;
}

.cta-inner p {
    font-size: 15px;
    margin-bottom: 18px;
}

/* Responsive home */
@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 25px;
    }

    .hero-panel {
        justify-content: flex-start;
    }

    .hero-panel-box {
        max-width: 100%;
    }
}
/* ========= BASE LAYOUT MOBILE-FRIENDLY ========= */

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f6f8;
}

/* Header e nav */

header {
    background-color: #0b4f6c;
    color: #fff;
    padding: 10px 16px;
}

header h1 {
    font-size: 18px;
    margin: 0 0 6px 0;
}

header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

header nav a {
    color: #e4f1ff;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background-color: rgba(255,255,255,0.06);
}

header nav a:hover {
    background-color: rgba(255,255,255,0.15);
}

/* Main */

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px;
}

/* Tabelle: scroll orizzontale su schermi stretti */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 7px;
    font-size: 14px;
}

table th {
    background-color: #e9edf2;
    text-align: left;
}

table tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Fai sì che le tabelle non spacchino il layout su mobile */
@media (max-width: 768px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table thead, table tbody, table tr, table th, table td {
        white-space: nowrap;
    }
}

/* Bottoni */

.button,
button {
    display: inline-block;
    border: none;
    border-radius: 4px;
    padding: 7px 14px;
    background-color: #145da0;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.button:hover,
button:hover {
    background-color: #0f477a;
}

.cancel-link {
    font-size: 13px;
    text-decoration: none;
    color: #555;
    margin-left: 6px;
}

.cancel-link:hover {
    text-decoration: underline;
}

/* Messaggi */

.message-error {
    background-color: #ffe5e5;
    color: #a60000;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 13px;
}

.message-success {
    background-color: #e5ffe9;
    color: #1b6b2b;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 13px;
}

/* Form */

form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
    padding: 6px 8px;
    margin-top: 2px;
    margin-bottom: 4px;
    border-radius: 4px;
    border: 1px solid #ccd1d9;
    font-size: 14px;
}

/* Dashboard cards: già responsive, solo piccoli aggiustamenti */

.dashboard-grid {
    margin-top: 14px;
}

.dashboard-card {
    min-height: 90px;
}

/* Status badge ordini - già inserito, ma ok così */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Mobile: impagina header e main più stretti */

@media (max-width: 600px) {
    header {
        padding: 8px 10px;
    }

    header h1 {
        font-size: 16px;
        margin-bottom: 4px;
    }

    header nav a {
        font-size: 13px;
        padding: 4px 9px;
    }

    main {
        padding: 10px;
    }

    table th,
    table td {
        padding: 5px;
        font-size: 12px;
    }

    .hero h2 {
        font-size: 22px;
    }
}
.product-thumb {
    width: 110px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dde1e7;
}

.product-thumb-large {
    width: 200px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dde1e7;
    margin-top: 4px;
}
/* ====== Layout dettaglio ordine ====== */

.order-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 10px 0 30px 0;
}

.order-box {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    flex: 1 1 320px;
    max-width: 480px;
}

.order-box h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
}

.order-meta {
    font-size: 14px;
    line-height: 1.5;
}

.order-status-form {
    margin-top: 10px;
}

.order-status-form select {
    width: 100%;
    max-width: 260px;
}

/* Mobile: stack verticali */
@media (max-width: 768px) {
    .order-summary {
        flex-direction: column;
    }

    .order-box {
        max-width: 100%;
    }
}
