/* Reset CSS e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Layout container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.container-small {
    max-width: 600px;
}

.container-medium {
    max-width: 800px;
}

/* Header comune */
header {
    background-color: #1a365d;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    text-align: center;
    font-size: 2em;
}

h1.large {
    font-size: 2.5em;
}

/* Navigation */
.nav-back {
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-back:hover {
    opacity: 1;
}

/* User menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9em;
}

.user-menu a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.user-menu a:hover {
    opacity: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-icon {
    width: 30px;
    height: 30px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

/* Cards */
.card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #374151;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="password"] {
    padding: 12px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3182ce;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Help text */
.help-text {
    font-size: 0.875em;
    color: #6b7280;
    margin-top: 5px;
}

.info-text {
    color: #6b7280;
    font-size: 0.9em;
    margin-top: 20px;
    text-align: center;
}

/* Flash messages */
.flash {
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.flash.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6b7280;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}