/* ==========================================
   ZTOR QUOTE APP - MAIN CSS
   ========================================== */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #6B46C1;
    --primary-purple-dark: #553399;
    --primary-purple-light: #8B66E1;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray-medium: #CCCCCC;
    --gray-dark: #333333;
    --text-on-purple: #FFFFFF;
    --success: #28A745;
    --danger: #DC3545;
    --warning: #FFC107;
    --info: #17A2B8;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

.btn-secondary {
    background-color: var(--gray-medium);
    color: var(--gray-dark);
}

.btn-secondary:hover {
    background-color: var(--gray-dark);
    color: var(--white);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.2rem;
}

.btn-calendar {
    background-color: var(--success);
    color: var(--white);
}

.btn-calendar:hover {
    background-color: #218838;
}

.btn-icon {
    display: inline-block;
    padding: 8px 12px;
    font-size: 1.2rem;
    text-decoration: none;
    cursor: pointer;
}

/* Flash Messages */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.flash {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    animation: slideInRight 0.3s ease-out;
}

.flash-success {
    background-color: var(--success);
    color: var(--white);
}

.flash-danger {
    background-color: var(--danger);
    color: var(--white);
}

.flash-warning {
    background-color: var(--warning);
    color: var(--gray-dark);
}

.flash-info {
    background-color: var(--info);
    color: var(--white);
}

.flash-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.flash-close:hover {
    opacity: 1;
}

/* ==========================================
   HOMEPAGE
   ========================================== */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: var(--white);
    padding: 100px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-title {
    color: var(--white);
    margin-bottom: 20px;
}

.hero-title .highlight {
    color: var(--white);
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 20px;
    border-radius: 8px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.feature-item {
    background-color: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    max-width: 400px;
    width: 100%;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.3));
}

/* What Section */
.what-section {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-text {
    text-align: center;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Tech Section */
.tech-section {
    padding: 80px 0;
    background-color: var(--gray-light);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tech-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(107, 70, 193, 0.2);
}

/* Solutions CTA */
.solutions-cta {
    padding: 80px 0;
    background-color: var(--primary-purple);
    color: var(--white);
    text-align: center;
}

.solutions-cta h2 {
    color: var(--white);
    margin-bottom: 30px;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 40px;
}

.contact-text {
    font-size: 1.1rem;
}

.contact-actions {
    text-align: center;
}

.contact-email {
    margin-top: 20px;
    font-size: 1.1rem;
}

.contact-email a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--gray-dark);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer a {
    color: var(--white);
    text-decoration: none;
    margin: 0 10px;
}

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

/* ==========================================
   SOLUZIONI PAGE
   ========================================== */

.page-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
}

.page-header .subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
}

.back-link {
    display: inline-block;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.solutions-section {
    padding: 80px 0;
    background-color: var(--gray-light);
}

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

.solution-card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(107, 70, 193, 0.25);
}

.solution-icon {
    text-align: center;
    margin-bottom: 20px;
}

.solution-icon img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.solution-emoji {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 15px;
}

.solution-name {
    color: var(--primary-purple);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.solution-subtitle {
    text-align: center;
    color: var(--gray-medium);
    font-weight: 600;
    margin-bottom: 20px;
}

.solution-description {
    text-align: justify;
    line-height: 1.8;
    color: var(--gray-dark);
}

.cta-section {
    padding: 80px 0;
    background-color: var(--primary-purple-light);
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}


/* ==========================================
   LOGIN PAGE
   ========================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
}

.login-container {
    background-color: var(--white);
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.3);
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    color: var(--primary-purple);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--gray-medium);
}

.login-form {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-medium);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.login-footer {
    text-align: center;
}

.login-footer a {
    color: var(--primary-purple);
    text-decoration: none;
}

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

/* ==========================================
   DASHBOARD
   ========================================== */

.dashboard-page {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--gray-dark);
    color: var(--white);
    padding: 30px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 30px;
    margin-bottom: 40px;
}

.sidebar-header h2 {
    color: var(--white);
    margin-bottom: 5px;
}

.sidebar-header p {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.sidebar-nav {
    flex: 1;
}

.nav-item {
    display: block;
    padding: 15px 30px;
    color: var(--white);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--primary-purple);
}

.sidebar-user {
    padding: 20px 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.sidebar-user p {
    margin-bottom: 5px;
}

.user-role {
    font-size: 0.9rem;
    color: var(--gray-medium);
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
    background-color: var(--gray-light);
    overflow-y: auto;
}

.content-header {
    margin-bottom: 40px;
}

.content-header h1 {
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.content-header p {
    color: var(--gray-medium);
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 3rem;
}

.stat-content h3 {
    font-size: 0.9rem;
    color: var(--gray-medium);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-purple);
}

/* Dashboard Sections */
.dashboard-section {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.dashboard-section h2 {
    margin-bottom: 25px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: var(--primary-purple);
    color: var(--white);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
}

.data-table tbody tr:hover {
    background-color: var(--gray-light);
}

/* Form Sections */
.form-section {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-section h2 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.solution-description-hidden {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--gray-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-purple);
    display: none;
}

/* Price Summary */
.price-summary {
    background: linear-gradient(135deg, var(--primary-purple-light) 0%, var(--primary-purple) 100%);
    color: var(--white);
}

.price-summary h2 {
    color: var(--white);
    border-bottom-color: rgba(255,255,255,0.3);
}

.price-table {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
    color: var(--gray-dark);
}

.price-row.subtotal {
    border-top: 2px solid var(--gray-dark);
    font-weight: 600;
    margin-top: 10px;
}

.price-row.total {
    border-top: 3px solid var(--primary-purple);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-purple);
    margin-top: 10px;
    padding-top: 15px;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    padding: 50px;
    border-radius: 16px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 12px 48px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Filters */
.filters-form {
    margin-bottom: 30px;
}

/* Quick Queries */
.quick-queries {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.query-results {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--gray-light);
    border-radius: 8px;
    min-height: 100px;
}

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

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-page {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
