body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background-color: #f7f8fa;
    color: #333;
    margin: 0;
}

main {
    min-height: calc(100vh - 80px); /* altezza navbar */
}

/* HEADER */
header {
    background-color: #0056a6;
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}
header h1 { margin: 0.2rem 0; font-weight: 700; }
header p { font-size: 1.2rem; }

.navbar-shadow {
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.15);
}

/* Quick links navbar */
#quick-links .nav-link {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;              /* pill */
    font-weight: 500;
    color: #212529;
    transition: all 0.25s ease;
    position: relative;
}

/* Hover */
#quick-links .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
    text-decoration: none;
}

/* Active / focus */
#quick-links .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.3);
}


/* LAYOUT GRID */
.row.g-4 { margin: 0; row-gap: 2rem; column-gap: 2rem; display: flex; flex-wrap: wrap; justify-content: center; }
.col-card { flex: 1 1 250px; max-width: 300px; }

.topic-row {
    display: flex;
    justify-content: space-between; /* titolo a sinistra, pulsante a destra */
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0.5rem;
    background-color: #fff;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.topic-row:hover {
    background-color: #f0f0f0;
}

.topic-title {
    font-weight: 600;
    cursor: pointer;
}

.topic-subject {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.25rem;
}

.topic-action a.btn {
    white-space: nowrap;
}


/* DASHBOARD CARD */
.card {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 12px;
    position: relative;
    padding-top: 0;
    padding-bottom: 0;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.card-title { font-size: 1.3rem; font-weight: 600; }
.card-text { font-size: 0.95rem; color: #555; }
.badge-topics {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.9rem;
}

/* ICONS */
.icon { font-size: 3rem; }

/* TOPICS SECTION */
#topics-container { 
    margin-top: 2rem; 
    overflow-y: auto;
    max-height: 50vh;
}

#topics-list { 
    overflow-y: auto;
    max-height: 35vh;
}