/* assets/css/style.css */
/* Libroo - Современный стильный интерфейс с акцентным цветом #ffe962 */

/* --- Подключение шрифта (если не из Google Fonts в HTML) --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* --- Сброс и общие стили --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #f5f7fa;
    color: #1e1e2a;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1a2c;
}

a {
    text-decoration: none;
    color: #1e1e2a;
    transition: color 0.2s;
}

a:hover {
    color: #000;
}

/* --- Акцентный цвет --- */
.accent-bg {
    background-color: #ffe962 !important;
}
.accent-text {
    color: #ffe962 !important;
}
.border-accent {
    border-color: #ffe962 !important;
}

/* --- Кнопки --- */
.btn {
    font-weight: 500;
    border-radius: 40px;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary, .btn-accent {
    background-color: #ffe962;
    color: #000;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 233, 98, 0.2);
}
.partner-info-block {
    padding: 8px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}
.partner-company, .partner-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #1e1e2a;
    margin-bottom: 4px;
}
.partner-company i, .partner-name i {
    width: 20px;
    color: #6c757d;
}
.sidebar-subtitle {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}

.btn-primary:hover, .btn-accent:hover {
    background-color: #f5d800;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(245, 216, 0, 0.25);
}

.btn-outline-accent {
    background: transparent;
    border: 2px solid #ffe962;
    color: #1e1e2a;
}
/* Сайдбар – фиксированные размеры и единый вид */
.sidebar {
    background: #fff;
    border-radius: 24px;
    padding: 24px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    height: fit-content;
    width: 100%;
}
.sidebar-header {
    margin-bottom: 24px;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 6px;
}
.sidebar-logo-img {
    height: 28px;
    width: auto;
    margin-right: 8px;
}
.sidebar-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #000;
}
.sidebar-subtitle {
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 500;
}
.sidebar-nav .nav-link {
    color: #4a4a5a;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 40px;
    margin-bottom: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}
.sidebar-nav .nav-link i {
    width: 24px;
    font-size: 1.2rem;
    margin-right: 12px;
    text-align: center;
}
.sidebar-nav .nav-link:hover {
    background: #f8f9fa;
}
.sidebar-nav .nav-link.active {
    background: #ffe962;
    color: #000;
}
.sidebar-logout {
    margin-top: 24px;
}

/* --- Таблицы --- */
.table {
    color: #1e1e2a;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 1rem 1rem;
    border-bottom-color: #edf2f7;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom-width: 1px;
}

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

/* Контейнер для таблиц с закругленными углами */
.table-container {
    background: #fff;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
}

/* --- Навигация --- */
.navbar {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    padding: 0.75rem 1.5rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: #1a1a2c !important;
    letter-spacing: -0.5px;
}

.navbar .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffe962;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #000;
}

/* Боковое меню (sidebar) */
.sidebar {
    background: #fff;
    border-radius: 24px;
    padding: 1.5rem 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar .nav-link {
    color: #4a4a5a;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 40px;
    margin-bottom: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .nav-link i, 
.sidebar .nav-link svg {
    width: 20px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background: #f8f9fa;
    color: #000;
}

.sidebar .nav-link.active {
    background: #ffe962;
    color: #000;
    font-weight: 600;
}

/* --- Формы --- */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #1e1e2a;
}

.form-control, .form-select {
    border-radius: 40px;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
    border-color: #ffe962;
    box-shadow: 0 0 0 3px rgba(255, 233, 98, 0.25);
    outline: none;
}

.input-group-text {
    border-radius: 40px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
}

/* Маска телефона (плюс 7) */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    padding: 0 1rem;
}

.phone-input-wrapper span {
    color: #6c757d;
    margin-right: 4px;
}

.phone-input-wrapper input {
    border: none;
    padding: 0.6rem 0;
    width: 100%;
    outline: none;
    background: transparent;
}

/* --- Индикаторы статуса (бейджи) --- */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-success {
    background: #e6f9ed;
    color: #0e6245;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-secondary {
    background: #e9ecef;
    color: #495057;
}

.status-assembled {
    color: #0e6245;
    font-weight: 600;
}

.status-pending {
    color: #856404;
    font-weight: 500;
}

/* --- Галерея фото (для выпускника) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    background: #f0f2f5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item.selected {
    border-color: #ffe962;
    box-shadow: 0 0 0 3px rgba(255, 233, 98, 0.4);
}

/* --- Конструктор альбома (развороты) --- */
.album-spreads-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.spread-item {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f2f5;
}

.spread-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.spread-title {
    font-weight: 600;
    font-size: 1.2rem;
}

.spread-type-badge {
    background: #ffe962;
    padding: 0.25rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
}

.spread-canvas {
    display: grid;
    gap: 8px;
    background: #fafbfc;
    border-radius: 16px;
    padding: 16px;
    min-height: 200px;
}

/* Шаблоны сеток для разных типов разворотов */
.spread-grid-vignette {
    /* Специфические стили для виньетки (одно фото каждого выпускника) */
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spread-grid-group {
    /* Одно фото на весь разворот */
    grid-template-columns: 1fr;
}

.spread-grid-4h {
    grid-template-columns: repeat(2, 1fr);
}

.spread-grid-2h4v {
    grid-template-columns: repeat(2, 1fr);
}

.photo-slot {
    background: #e9ecef;
    border-radius: 12px;
    aspect-ratio: 3/2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
    background-size: cover;
    background-position: center;
    position: relative;
}

.photo-slot.filled {
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.photo-slot:hover {
    border-color: #ffe962;
    background-color: #fffbe6;
}

.empty-slot-placeholder {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
}

/* --- Кнопка "Альбом собран" --- */
.btn-assemble {
    background: #ffe962;
    color: #000;
    font-weight: 700;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    border-radius: 60px;
    box-shadow: 0 10px 20px rgba(255, 233, 98, 0.3);
    width: 100%;
    max-width: 400px;
    margin: 30px auto;
    display: block;
}

.btn-assemble:hover {
    background: #f5d800;
    transform: scale(1.02);
}

.photographer-contact-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 16px;
    margin-top: 20px;
}
.photographer-contact-card .contact-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 12px;
}
.photographer-contact-card .contact-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #1e1e2a;
    margin-bottom: 8px;
}
.photographer-contact-card .contact-line:last-child {
    margin-bottom: 0;
}
.photographer-contact-card .contact-line i {
    width: 18px;
    color: #6c757d;
}
.photographer-contact-card a {
    color: #1e1e2a;
    text-decoration: none;
}
.photographer-contact-card a:hover {
    color: #000;
    text-decoration: underline;
}
/* --- Прогресс сборки альбома --- */
.progress-assembly {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-assembly .progress-bar {
    background: #ffe962;
}

/* --- Адаптивность для мобильных устройств --- */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }

    .sidebar {
        position: static;
        margin-bottom: 20px;
        border-radius: 20px;
        padding: 0.75rem;
    }

    .sidebar .nav-link {
        padding: 0.5rem 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .table-container {
        padding: 1rem;
    }

    .table th, .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .spread-canvas {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* --- Модальные окна --- */
.modal-content {
    border-radius: 32px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid #f0f2f5;
    padding: 1.5rem 1.5rem 0.5rem;
}

.modal-footer {
    border-top: 1px solid #f0f2f5;
    padding: 1rem 1.5rem 1.5rem;
}

/* --- Загрузка файлов (drag & drop) --- */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    background: #fafbfc;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #ffe962;
    background: #fffbe6;
}

.upload-area .icon {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

/* --- Иконки и декоративные элементы --- */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffe962;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
}

/* --- Утилиты --- */
.rounded-xl {
    border-radius: 24px !important;
}

.shadow-soft {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.text-muted-light {
    color: #6c757d;
}

.bg-soft-accent {
    background: #fff9e0;
}
.sidebar-footer {
    margin-top: auto;
}
.contact-block {
    padding: 0 8px;
}
.contact-block h6 {
    font-weight: 600;
    letter-spacing: 0.5px;
}
.contact-block a {
    color: #4a4a5a;
}
.contact-block a:hover {
    color: #000;
}

/* --- Анимации --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}