@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Manrope', sans-serif;
    background: #f7f7f9;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

a { color: #1a1a1a; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }

/* Шапка */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 10;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo::before { content: '🎨'; }
.site-header nav { display: flex; gap: 24px; align-items: center; }
.site-header nav a { font-size: 15px; font-weight: 600; color: #555; }
.site-header nav a:hover { color: #000; opacity: 1; }

/* Кнопка в шапке */
.btn-create-order {
    background-color: #4a7cff !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    margin-left: 16px !important;
    font-size: 14px !important;
    display: inline-block !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(74, 124, 255, 0.3) !important;
    transition: background-color 0.2s, transform 0.1s !important;
    font-family: inherit !important;
}
.btn-create-order:hover {
    background-color: #3a66e0 !important;
    transform: translateY(-1px);
    opacity: 1 !important;
}

/* Контейнер */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
    width: 100%;
}

/* Главный экран */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 24px;
    margin-bottom: 48px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #eaeaea;
}
.hero h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    line-height: 1.1;
}
.hero p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 32px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}
.btn:hover { background: #000; transform: scale(1.02); opacity: 1; }
.btn.secondary { background: #f0f0f2; color: #1a1a1a; }
.btn.secondary:hover { background: #e5e5e8; }
.btn.green { background: #10b981; }
.btn.green:hover { background: #059669; }

/* Заголовки секций */
h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 40px 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Сетка карточек */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Карточка заказа */
.card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 20px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: #ddd;
}
.card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}
.card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    flex-grow: 1;
}

/* Бюджет */
.budget {
    display: inline-block;
    background: #ecfdf5;
    color: #059669;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    width: fit-content;
    margin-top: auto;
}

/* Карточка работы художника */
a.card.work {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}
a.card.work:hover {
    transform: translateY(-4px);
    box-shadow: none;
    border-color: transparent;
}
a.card.work img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    margin-bottom: 10px;
    background: #e0e0e0;
    transition: transform 0.3s;
}
a.card.work:hover img { transform: scale(1.02); }
.work-info { padding: 0 4px; }
.work-info p {
    margin: 0 0 4px;
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 600;
}
.card.work {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: none;
    display: block;
}
.card.work:hover { transform: translateY(-4px); box-shadow: none; }
.card.work img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    margin-bottom: 12px;
    background: #e0e0e0;
    transition: transform 0.3s;
}
.card.work:hover img { transform: scale(1.02); }
.card.work p {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    padding: 0 4px;
    margin: 0;
}

.muted { color: #888; font-size: 14px; font-weight: 500; }

/* Формы */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 480px;
    background: #fff;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid #eaeaea;
    margin-bottom: 32px;
}
.form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.form input, .form textarea, .form select {
    padding: 14px 16px;
    background: #f7f7f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    color: #1a1a1a;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}
.form input:focus, .form textarea:focus, .form select:focus {
    outline: none;
    border-color: #1a1a1a;
    background: #fff;
}

/* Уведомления (сообщения) */
.msg {
    padding: 16px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 14px;
    font-weight: 600;
}
.msg.err { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* Подвал */
.site-footer {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 14px;
    border-top: 1px solid #eaeaea;
    background: #fff;
    margin-top: 40px;
}

/* Уведомления (плитки) */
.notif-grid { display: flex; flex-direction: column; gap: 12px; }
.notif-tile {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 20px;
    padding: 20px 24px;
    transition: all 0.2s ease;
    text-decoration: none !important;
    color: inherit;
    position: relative;
    overflow: hidden;
}
.notif-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-color: #d0d0d0;
}
.notif-tile.new {
    background: #f8faff;
    border-color: #dbeafe;
}
.notif-tile-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0; background: #f0f0f2;
}
.notif-tile.response .notif-tile-icon { background: #f3e8ff; color: #9333ea; }
.notif-tile.delivery .notif-tile-icon { background: #ecfdf5; color: #059669; }
.notif-tile.success .notif-tile-icon { background: #fff7ed; color: #ea580c; }
.notif-tile.info .notif-tile-icon { background: #eff6ff; color: #2563eb; }
.notif-tile-body { flex: 1; }
.notif-tile-text { font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 6px; line-height: 1.4; }
.notif-tile-time { font-size: 13px; color: #888; font-weight: 500; }
.notif-tile-arrow { font-size: 20px; color: #ccc; transition: color 0.2s, transform 0.2s; }
.notif-tile:hover .notif-tile-arrow { color: #4a7cff; transform: translateX(4px); }
.notif-tile.new::after {
    content: ''; position: absolute; top: 24px; right: 24px;
    width: 10px; height: 10px; background: #4a7cff; border-radius: 50%; box-shadow: 0 0 0 4px #dbeafe;
}

/* =========================================
   МОДАЛЬНОЕ ОКНО
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 15, 18, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 540px;
    position: relative;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 20px; right: 24px;
    background: #f0f0f2;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.2s, color 0.2s;
}
.modal-close:hover {
    background: #e0e0e0;
    color: #000;
}

/* Адаптивность */
@media (max-width: 768px) {
    .site-header { padding: 16px 20px; flex-direction: column; gap: 16px; }
    .hero { padding: 40px 20px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .grid { grid-template-columns: 1fr; }
    .notif-tile { flex-direction: column; align-items: flex-start; text-align: left; }
    .notif-tile-icon { margin-bottom: 12px; }
    .notif-tile-arrow { display: none; }
}
/* =========================================
   КНОПКА СОЗДАНИЯ ЗАКАЗА (в шапке)
   ========================================= */
button.btn-create-order {
    background-color: #4a7cff !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    margin-left: 16px !important;
    font-size: 14px !important;
    display: inline-block !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(74, 124, 255, 0.3) !important;
    transition: background-color 0.2s, transform 0.1s !important;
    font-family: inherit !important;
}

button.btn-create-order:hover {
    background-color: #3a66e0 !important;
    transform: translateY(-1px) !important;
}

/* =========================================
   МОДАЛЬНОЕ ОКНО
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 18, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 540px;
    position: relative;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: #f0f0f2;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #000;
}
/* =========================================
   КЛИКАБЕЛЬНАЯ КАРТОЧКА ЗАКАЗА
   ========================================= */
a.card.order-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    text-decoration: none !important;
    color: inherit !important;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 20px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    height: 100%;
}

a.card.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: #ddd;
    opacity: 1 !important;
}

a.card.order-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #1a1a1a;
}

a.card.order-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    flex-grow: 1;
}