/* Modern Theme - Parcheggio Gestionale */
/* Shared styles for consistent UI across all pages */

:root {
    --card-bg: #ffffff;
    --page-bg: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--page-bg);
    color: var(--text-primary);
}

/* Page Container */
.page-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Modern Card */
.modern-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.modern-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.modern-card-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-card-body {
    padding: 1.5rem;
}

.modern-card-body.no-padding {
    padding: 0;
}

/* Modern Buttons */
.btn-modern {
    background: var(--accent-blue);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn-modern:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-modern.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid #e5e7eb;
}

.btn-modern.btn-secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-modern.btn-success {
    background: var(--accent-green);
}

.btn-modern.btn-success:hover {
    background: #059669;
}

.btn-modern.btn-danger {
    background: var(--accent-red);
}

.btn-modern.btn-danger:hover {
    background: #dc2626;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-icon-primary { 
    background: #eff6ff; 
    color: #3b82f6; 
}

.btn-icon-primary:hover { 
    background: #3b82f6; 
    color: white; 
}

.btn-icon-danger { 
    background: #fef2f2; 
    color: #ef4444; 
}

.btn-icon-danger:hover { 
    background: #ef4444; 
    color: white; 
}

.btn-icon-success { 
    background: #ecfdf5; 
    color: #10b981; 
}

.btn-icon-success:hover { 
    background: #10b981; 
    color: white; 
}

/* Modern Table */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table th {
    background: #f9fafb;
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    white-space: nowrap;
}

.modern-table td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-primary);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tbody tr:hover td {
    background: #f9fafb;
}

/* Search & Filters */
.search-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box-modern {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box-modern input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    transition: all 0.2s;
    background: white;
}

.search-box-modern input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box-modern i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Modern Form */
.form-modern .form-group {
    margin-bottom: 1.25rem;
}

.form-modern .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-modern .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    transition: all 0.2s;
    background: white;
}

.form-modern .form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-modern select.form-control {
    cursor: pointer;
}

.form-modern textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Badges */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.badge-coperto { 
    background: #eff6ff; 
    color: #1d4ed8; 
}

.badge-coperto::before { 
    content: ''; 
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    background: currentColor; 
}

.badge-scoperto { 
    background: #fff7ed; 
    color: #c2410c; 
}

.badge-scoperto::before { 
    content: ''; 
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    background: currentColor; 
}

.badge-success {
    background: #ecfdf5;
    color: #059669;
}

.badge-danger {
    background: #fef2f2;
    color: #dc2626;
}

.badge-warning {
    background: #fff7ed;
    color: #ea580c;
}

.badge-info {
    background: #eff6ff;
    color: #2563eb;
}

/* Empty State */
.empty-state-modern {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state-modern i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.empty-state-modern p {
    font-size: 1rem;
    margin: 0;
}

/* Loading */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: var(--accent-blue);
}

/* Pagination */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-modern button,
.pagination-modern a {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    padding: 0 0.75rem;
}

.pagination-modern button:hover,
.pagination-modern a:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.pagination-modern button.active,
.pagination-modern a.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.pagination-modern button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal Modern */
.modal-modern .modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-modern .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.modal-modern .modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-modern .modal-body {
    padding: 1.5rem;
}

.modal-modern .modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-actions {
        width: 100%;
    }
    
    .btn-modern {
        width: 100%;
        justify-content: center;
    }
    
    .modern-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modern-card-body {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-filters {
        flex-direction: column;
    }
    
    .search-box-modern {
        width: 100%;
    }
}
