/* ============================================
   AREA RISERVATA - Stili CSS
   ============================================ */

.area-riservata-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #0b0f19 0%, #1a1f2e 50%, #0d1117 100%);
    position: relative;
    overflow: hidden;
}

.area-riservata-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 136, 204, 0.08) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   LOGIN CONTAINER
   ============================================ */

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    z-index: 1;
    width: 100%;
    max-width: 480px;
}

.login-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(0, 212, 255, 0.15);
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 136, 204, 0.3);
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem;
    background: linear-gradient(135deg, #00d4ff 0%, #0088cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   LOGIN FORM
   ============================================ */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--accent-color, #00d4ff);
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color, #00d4ff);
    background: rgba(0, 136, 204, 0.1);
    box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.15);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--accent-color, #00d4ff);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-color, #00d4ff);
    cursor: pointer;
}

.checkbox-group label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Login Error */
.login-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ff6b6b;
    font-size: 0.9rem;
}

.login-error i {
    font-size: 1.1rem;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-dark, #0088cc) 0%, var(--accent-light, #005fa3) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
}

.login-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0;
}

.login-footer a {
    color: var(--accent-color, #00d4ff);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: white;
}

/* Features */
.login-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.feature-item i {
    color: var(--accent-color, #00d4ff);
}

/* ============================================
   FILE BROWSER
   ============================================ */

.file-browser-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    z-index: 1;
}

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

.browser-title h2 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.browser-title h2 i {
    color: var(--accent-color, #00d4ff);
}

.user-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.browser-actions {
    display: flex;
    gap: 0.75rem;
}

.browser-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.logout-btn {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* Breadcrumb */
.breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--accent-color, #00d4ff);
}

.breadcrumb-item::after {
    content: '/';
    margin-left: 0.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.breadcrumb-item:last-child::after {
    content: none;
}

.breadcrumb-item:last-child {
    color: white;
    font-weight: 600;
}

/* File List */
.file-list-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.file-list-header {
    display: grid;
    grid-template-columns: 1fr 120px 150px 100px;
    padding: 14px 20px;
    background: rgba(0, 136, 204, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-col {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-list {
    max-height: 60vh;
    overflow-y: auto;
}

.file-item {
    display: grid;
    grid-template-columns: 1fr 120px 150px 100px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    transition: background 0.2s;
    cursor: pointer;
}

.file-item:hover {
    background: rgba(0, 136, 204, 0.08);
}

.file-item:last-child {
    border-bottom: none;
}

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 500;
    overflow: hidden;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-icon.folder {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
}

.file-icon.file {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color, #00d4ff);
}

.file-icon.image {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    color: white;
}

.file-icon.document {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.file-icon.archive {
    background: linear-gradient(135deg, #795548 0%, #5d4037 100%);
    color: white;
}

.file-icon.pdf {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.file-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size-cell,
.file-date-cell {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.file-actions-cell {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.download-btn {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.download-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: scale(1.1);
}

/* Loading */
.loading-files {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
    gap: 1rem;
}

.loading-files i {
    font-size: 2rem;
    color: var(--accent-color, #00d4ff);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.2);
}

.empty-state h3 {
    color: white;
    margin: 0 0 0.5rem;
}

.empty-state p {
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
    }

    .file-list-header,
    .file-item {
        grid-template-columns: 1fr 100px;
    }

    .file-size-cell,
    .file-date-cell {
        display: none;
    }

    .file-browser-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0;
    }

    .login-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .login-features {
        flex-direction: column;
        align-items: center;
    }
}