* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    overflow: hidden;
    height: 100vh;
}

.login-page {
    background: linear-gradient(135deg, #83E2B1 0%, #2A89A9 50%, #00ACE5 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.login-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 420px;
    width: 90%;
}

.login-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2A89A9;
    margin-bottom: 10px;
}

.login-header p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 40px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #55B5AD;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-login {
    padding: 16px;
    background-color: #55B5AD;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #4aa49c;
    transform: scale(1.02);
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    font-size: 0.85rem;
    color: #888;
}

.login-footer a {
    color: #2A89A9;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

header {
    width: 100%;
    max-width: 1920px;
    height: 220px;
    margin: 0 auto;
    background: linear-gradient(90deg, #83E2B1 0%, #2A89A9 74%, #00ACE5 100%);
    display: flex;
    align-items: center;
    padding-left: 60px;
    justify-content: space-between;
    padding-right: 60px;
}

header h1 {
    font-size: 3.3rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.5px;
    margin-left: 35px;
    margin-bottom: 50px;
}

header .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.5px;
    margin-left: 90px;
}

header .welcome-message {
    margin-left: auto;
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.5px;
    margin-bottom: 50px;
    margin-right: 60px;
}

header .user {
    display: flex;
    align-items: center;
    gap: 40px;
}

header .user svg {
    width: 40px;
    height: 40px;
    stroke: #000000;
    margin-bottom: 45px;
    transition: stroke 0.3s ease;
}

header .user a:hover svg {
    stroke: #dc3545;
}

.sidebar {
    width: 390px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 155px;
    background-color: rgba(230, 230, 230, 0.8);
    border-radius: 50px;
}

.sidebar ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 35px 0;
    align-items: center;
}

.sidebar button {
    width: 275px;
    height: 60px;
    background-color: #55B5AD;
    border: none;
    border-radius: 20px;
    color: #2f2f2f;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.sidebar button:hover {
    background-color: #4aa49c;
    transform: scale(1.05);
}

.main {
    position: absolute;
    left: 390px;
    top: 220px;
    width: calc(100% - 390px);
    height: calc(100vh - 220px);
    padding: 60px 40px;
    display: flex;
    justify-content: space-between;
}

.card {
    width: 340px;
    height: 400px;
    background-color: rgba(230, 230, 230, 0.8);
    border-radius: 50px;
    border: 1px solid #c0c0c0;
}

.card-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
}

.card-icon {
    width: 80px;
    height: 80px;
    background-color: #55B5AD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
}

.card-icon svg {
    width: 40px;
    height: 40px;
    stroke: #ffffff;
}

.card-1 h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #000000;
}

.card-1 button {
    width: 200px;
    height: 50px;
    background-color: #55B5AD;
    border: none;
    border-radius: 15px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    margin-bottom: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.card-1 button:hover {
    background-color: #4aa49c;
    transform: scale(1.05);
}

.card-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    padding: 30px;
}

.card-2 .requests-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
    width: 100%;
    flex-grow: 1;
}

.card-2 .requests-list li {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: 10px;
    border-radius: 10px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card-2 .requests-list li:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.02);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card-2 .requests-list a {
    text-decoration: none;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-2 .requests-list .req-materia {
    font-weight: 600;
}

.card-2 .requests-list .req-tipo {
    font-size: 0.85rem;
    color: #666;
}

.card-2 .no-requests {
    color: #888;
    font-style: italic;
    padding: 20px 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.card-button {
    display: inline-block;
    width: 200px;
    padding: 14px 0;
    background-color: #55B5AD;
    border: none;
    border-radius: 15px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    margin-bottom: 25px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.card-button:hover {
    background-color: #4aa49c;
    transform: scale(1.05);
}

.card-2 h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #000000;
    margin-top: 20px;
}

.card-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
}

.card-3 h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #000000;
}

.card-3 button {
    width: 200px;
    height: 50px;
    background-color: #55B5AD;
    border: none;
    border-radius: 15px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    margin-bottom: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.card-3 button:hover {
    background-color: #4aa49c;
    transform: scale(1.05);
}

.sidebar button a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 60px;
}

.main-requests {
    position: absolute;
    left: 390px;
    top: 220px;
    width: calc(100% - 390px);
    height: calc(100vh - 220px);
    padding: 40px;
    overflow-y: auto;
}

.filters {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(230, 230, 230, 0.8);
    padding: 20px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filters select,
.filters input[type="date"] {
    padding: 12px 16px;
    border: 1px solid #c0c0c0;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background-color: #fff;
}

.filters select {
    min-width: 180px;
}

.date-filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-filters label {
    font-weight: 600;
    color: #333;
}

.btn-filter {
    padding: 12px 24px;
    background-color: #55B5AD;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-left: auto;
}

.btn-filter:hover {
    background-color: #4aa49c;
    transform: scale(1.05);
}

.requests-table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(230, 230, 230, 0.8);
    border-radius: 20px;
    overflow: hidden;
}

.requests-table thead {
    background-color: #55B5AD;
}

.requests-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.requests-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #d0d0d0;
    font-size: 0.95rem;
    color: #333;
}

.requests-table tbody tr:hover {
    background-color: rgba(85, 181, 173, 0.1);
}

.requests-table tbody tr:last-child td {
    border-bottom: none;
}

.status {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.status.success {
    background-color: #d4edda;
    color: #155724;
}

.status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-view {
    padding: 8px 16px;
    background-color: #2A89A9;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-view:hover {
    background-color: #1f6d87;
    transform: scale(1.05);
}

.btn-view {
    text-decoration: none;
    display: inline-block;
}

/* ========== FORM NUOVA RICHIESTA ========== */
.main-form {
    position: absolute;
    left: 390px;
    top: 220px;
    width: calc(100% - 390px);
    height: calc(100vh - 220px);
    padding: 40px;
    overflow-y: auto;
}

.form-container {
    background-color: rgba(230, 230, 230, 0.8);
    padding: 40px;
    border-radius: 30px;
    max-width: 900px;
}

.form-container h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 8px;
}

.form-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.request-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.request-form .form-group.full-width {
    grid-column: 1 / -1;
}

.request-form label {
    font-weight: 600;
    color: #333;
}

.request-form select,
.request-form textarea {
    padding: 14px 16px;
    border: 2px solid #d0d0d0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.request-form select:focus,
.request-form textarea:focus {
    outline: none;
    border-color: #55B5AD;
}

.request-form textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #55B5AD 0%, #2A89A9 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
    width: fit-content;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(85, 181, 173, 0.4);
}

/* ========== IMPOSTAZIONI ========== */
.main-settings {
    position: absolute;
    left: 390px;
    top: 220px;
    width: calc(100% - 390px);
    height: calc(100vh - 220px);
    padding: 40px;
    overflow-y: auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.settings-card {
    background-color: rgba(230, 230, 230, 0.8);
    padding: 30px;
    border-radius: 20px;
}

.settings-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d0d0d0;
}

.settings-card .form-group {
    margin-bottom: 20px;
}

.settings-card label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.settings-card input,
.settings-card select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background-color: #fff;
}

.settings-card input:focus,
.settings-card select:focus {
    outline: none;
    border-color: #55B5AD;
}

.settings-card input:disabled {
    background-color: #e9e9e9;
    cursor: not-allowed;
}

.settings-card small {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-top: 6px;
}

.btn-save {
    width: 100%;
    padding: 14px;
    background-color: #55B5AD;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.btn-save:hover {
    background-color: #4aa49c;
}

.info-card {
    background: linear-gradient(135deg, rgba(131, 226, 177, 0.2) 0%, rgba(42, 137, 169, 0.2) 100%);
}

.api-info {
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.api-info:last-child {
    border-bottom: none;
}

.api-info h4 {
    color: #2A89A9;
    margin-bottom: 5px;
}

.api-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.api-info a {
    color: #55B5AD;
    font-weight: 600;
    text-decoration: none;
}

.api-info a:hover {
    text-decoration: underline;
}

/* ========== ALERT ========== */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background-color: rgba(230, 230, 230, 0.5);
    border-radius: 20px;
    margin-top: 20px;
}

.empty-state svg {
    stroke: #999;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.4rem;
    color: #555;
    margin-bottom: 10px;
}

.empty-state p {
    color: #888;
    margin-bottom: 25px;
}

.btn-primary {
    display: inline-block;
    padding: 14px 28px;
    background-color: #55B5AD;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #4aa49c;
}

.btn-reset {
    padding: 12px 20px;
    background-color: #e0e0e0;
    color: #555;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
}

.btn-reset:hover {
    background-color: #d0d0d0;
}

.truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== VISUALIZZA RICHIESTA ========== */
.main-view {
    position: absolute;
    left: 390px;
    top: 220px;
    width: calc(100% - 390px);
    height: calc(100vh - 220px);
    padding: 40px;
    overflow-y: auto;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn-back {
    color: #2A89A9;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

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

.btn-pdf {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
}

.btn-pdf:hover {
    opacity: 0.9;
}

.view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background-color: rgba(230, 230, 230, 0.8);
    padding: 25px 30px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.meta-value {
    font-size: 1.05rem;
    color: #333;
    font-weight: 600;
}

.view-section {
    background-color: rgba(230, 230, 230, 0.8);
    padding: 25px 30px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.view-section h3 {
    font-size: 1.1rem;
    color: #2A89A9;
    margin-bottom: 15px;
}

.view-section p {
    color: #333;
    line-height: 1.6;
}

.content-box {
    background-color: #fff;
    padding: 25px;
    border-radius: 15px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    font-family: 'Inter', sans-serif;
}