/* ========================================
   Подари - Основные стили
   ======================================== */

/* Сброс */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 16px/1.3 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #667085; background: #fff; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* Контейнер */
.container { width: 100%; max-width: 1256px; margin: 0 auto; padding: 0 16px; }

/* Обёртка */
.wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.content { flex: 1; }

/* Заголовки */
.title, h1, h2, h3 { color: #101828; font-weight: 500; }
.title-1, h1 { font-size: 30px; line-height: 1.25; }
.title-2, h2 { font-size: 20px; line-height: 1.1; }
.subtext { font-size: 14px; color: #667085; }
.fw-600 { font-weight: 600; }
.link { color: #2F54EB; cursor: pointer; }
.text-center { text-align: center; }

/* Flex-утилиты */
.flex { display: flex; flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Кнопки */
.button {
    display: inline-flex; align-items: center; justify-content: center;
    height: 44px; padding: 10px 24px; border-radius: 8px;
    font-size: 16px; font-weight: 500; line-height: 1;
    box-shadow: 0 1px 2px rgba(16,24,40,0.05);
    transition: all 0.1s linear;
}
.button-accent-bg { color: #fff; background: linear-gradient(180deg, #E94244 0%, #FFCA01 100%); }
.button-accent-bg:hover { background: #F24647; }
.button-gray-bd { color: #344054; background: #fff; border: 1px solid #D0D5DD; }
.button-gray-bd:hover { background: #F9FAFB; }
.button-sm { height: 40px; font-size: 14px; padding: 10px 16px; }
.button:disabled { color: #475467; background: #F9FAFB; box-shadow: none; cursor: default; }

/* Поля ввода */
.input {
    display: block; width: 100%; height: 44px; padding: 10px 16px;
    background: #fff; border: 1px solid #D0D5DD; border-radius: 8px;
    font-size: 16px; box-shadow: 0px 1px 2px rgba(16,24,40,0.05);
    transition: all 0.1s linear;
}
.input:focus { outline: none; border-color: #FFE9A5; box-shadow: 0px 1px 2px rgba(16,24,40,0.05), 0px 0px 0px 4px #F4EBFF; }
.textarea { height: 134px; resize: none; padding: 10px 16px; }
.label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: #344054; }

/* Хедер */
.header { padding: 20px 0; border-bottom: 1px solid #F2F4F7; background: #fff; }
.header__row { display: flex; align-items: center; }
.logo { margin-right: 48px; }
.header-nav { display: flex; gap: 8px; margin-left: auto; }
.header-nav a {
    padding: 8px 12px; border-radius: 6px; font-weight: 500; color: #344054;
}
.header-nav a:hover, .header-nav a.active { background: #F9FAFB; color: #101828; }

/* Футер */
.footer { margin-top: 68px; padding: 32px 0; text-align: center; }
.copy { font-size: 14px; color: #98A2B3; }

/* Страница входа */
.login { padding: 10.5vw 0 14.5vw; }
.login__center { width: 100%; max-width: 360px; margin: 0 auto; text-align: center; }
.login__logo { margin-bottom: 36px; }
.login__logo .img { margin: 0 auto; }
.login__ic { font-size: 10px; width: 6.6em; height: 6.6em; margin: 0 auto 24px; }
.login .title { margin-bottom: 12px; }
.login .subtext { margin-bottom: 32px; font-size: 16px; }
.login .form { text-align: left; }
.login__btn { width: 100%; margin-top: 24px; }
.check__help { margin-top: 18px; font-size: 14px; }
.check__back { margin-top: 32px; }
.button-back {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; color: #667085; cursor: pointer;
}
.error-txt { display: none; margin-top: 6px; font-size: 14px; color: #F04438; text-align: left; }

/* Поле СМС */
.code-input {
    width: 80px; height: 80px; font-size: 48px; font-weight: 500;
    text-align: center; letter-spacing: -0.02em;
}
.code-input:valid {
    border-color: #FFE9A5;
    background: linear-gradient(180deg, #E94244 0%, #FFCA01 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Дашборд */
.page-head { display: flex; align-items: center; margin-bottom: 24px; }
.page-head .title { margin-right: auto; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin: 24px 0 12px; }
.breadcrumbs a { color: #667085; }
.breadcrumbs span { color: #344054; background: #F9FAFB; padding: 4px 8px; border-radius: 6px; }

/* Таблица */
.table-wrap { background: #fff; border: 1px solid #EAECF0; border-radius: 8px; box-shadow: 0px 1px 3px rgba(16,24,40,0.1); overflow: hidden; }
.table-title { display: flex; align-items: center; padding: 20px 24px; font-size: 18px; font-weight: 500; color: #101828; }
.table-title .quantity { margin-left: 12px; padding: 2px 8px; font-size: 12px; background: #F9FAFB; border-radius: 16px; color: #344054; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 24px; font-size: 12px; font-weight: 500; background: #F9FAFB; text-align: left; white-space: nowrap; }
td { padding: 16px 24px; border-bottom: 1px solid #EAECF0; }
tr:hover td { background: #F9FAFB; }

/* Статусы */
.badge { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 500; border-radius: 16px; }
.badge-pending { color: #B54708; background: #FFFAEB; }
.badge-approved { color: #027A48; background: #ECFDF3; }
.badge-rejected { color: #B42318; background: #FEF3F2; }

/* Карточки статистики */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid #EAECF0; border-radius: 12px; padding: 20px 24px; box-shadow: 0px 1px 3px rgba(16,24,40,0.1); }
.stat-card .label { font-size: 14px; color: #667085; margin-bottom: 8px; }
.stat-card .value { font-size: 30px; font-weight: 600; color: #101828; }

/* Поиск */
.search-bar { display: flex; gap: 12px; margin-bottom: 24px; }
.search-bar .input { max-width: 400px; }

/* Модалки */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border-radius: 12px; padding: 24px; width: 90%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: 0px 20px 24px -4px rgba(16,24,40,0.08); }
.modal-box h2 { font-size: 22px; margin-bottom: 8px; }
.modal-box .subtext { margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 32px; }
.modal-actions .button { min-width: 120px; }

/* Форма загрузки фото */
.attach-area {
    padding: 24px; border: 2px dashed #EAECF0; border-radius: 8px; text-align: center;
    position: relative; cursor: pointer; transition: all .2s;
}
.attach-area:hover, .attach-area.dragover { border-color: #FFE9A5; background: #FFF5D6; }
.attach-area input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.attach-preview { margin-top: 12px; width: 120px; height: 120px; border-radius: 8px; overflow: hidden; }
.attach-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Адаптив */
@media (max-width: 767px) {
    .title-1 { font-size: 24px; }
    .stats-row { grid-template-columns: 1fr; }
    th, td { padding: 10px 12px; }
    .header__row { flex-wrap: wrap; }
    .logo { margin-right: auto; }
}