/* ----------------------------------------------------------------------------
 * Cita! - Installation Page Styles
 *
 * @package     Cita
 * @author      Cita! Team <info@cita.kz>
 * @copyright   Copyright (c) Cita! Team
 * @license     https://opensource.org/licenses/GPL-3.0 - GPLv3
 * @link        https://cita.kz
 * @since       v1.5.0
 * ---------------------------------------------------------------------------- */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.installation-wrapper {
    width: 100%;
    max-width: 700px;
}

.installation-container {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.installation-header {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
}

.installation-header .logo {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.installation-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.installation-header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Alert */
.alert {
    margin: 1.5rem 2rem 0;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Welcome Text */
.welcome-text {
    padding: 1.5rem 2rem 0;
    text-align: center;
}

.welcome-text p {
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Form */
.installation-form {
    padding: 1.5rem 2rem 2rem;
}

/* Form Section */
.form-section {
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 0.5rem;
    color: white;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Group */
.form-group {
    margin-bottom: 0;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group .required {
    color: #ef4444;
}

.form-group .form-control,
.form-group .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    background-color: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
}

.form-group .form-control:focus,
.form-group .form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group .form-control::placeholder {
    color: #9ca3af;
}

.form-group .form-control.is-invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-group .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #64748b;
}

/* Install Button */
.btn-install {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-install:active {
    transform: translateY(0);
}

.btn-install:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-install svg {
    width: 20px;
    height: 20px;
}

/* Loading Spinner */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#loading.d-none {
    display: none !important;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .installation-header {
        padding: 2rem 1.5rem;
    }

    .installation-header h1 {
        font-size: 1.5rem;
    }

    .installation-form {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .section-icon {
        width: 32px;
        height: 32px;
    }
}
