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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.8;
    font-style: italic;
}

/* Main Content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Input Section */
.input-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.input-section h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

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

.input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 1rem;
}

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

.date-input,
.number-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.date-input:focus,
.number-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.calendar-btn {
    padding: 12px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.calendar-btn:hover {
    background: #5a6fd8;
}

.capacity-display {
    display: inline-block;
    padding: 12px;
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 5px;
    font-weight: bold;
    color: #1976d2;
    font-size: 1rem;
    min-width: 100px;
    text-align: center;
}

/* Button Styles */
.button-group,
.export-group {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-export {
    background: #28a745;
    color: white;
}

.btn-export:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-section,
.table-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.summary-section h3,
.table-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.summary-content {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
    line-height: 1.8;
}

.summary-content p {
    margin-bottom: 8px;
    color: #333;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.schedule-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: bold;
    font-size: 0.9rem;
}

.schedule-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.schedule-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.schedule-table tbody tr:hover {
    background-color: #e3f2fd;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 30px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #28a745;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.license-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.license-form input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.trial-info {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* Calendar Widget */
.calendar-widget {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

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

.date-selector label {
    font-weight: bold;
    min-width: 60px;
}

.date-selector select {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .button-group,
    .export-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .date-input-group {
        flex-direction: column;
    }

    .calendar-btn {
        width: 100%;
    }

    .schedule-table {
        font-size: 0.8rem;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 8px 5px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Success/Error Messages */
.message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-weight: bold;
}

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

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

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