/* =========================================
   1. ГЛОБАЛЬНЫЕ НАСТРОЙКИ И ШРИФТЫ
   ========================================= */
body, html, #cv-page-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    background-color: #f4f6f8 !important; /* Светло-серый фон вместо белого */
}

/* Ссылка на главную */
a {
    transition: color 0.2s ease;
}

/* =========================================
   2. ШАПКА ПОРТАЛА (HEADER)
   ========================================= */
/* Делаем шапку градиентной и современной */
header.cv-main-header, .cv-header {
    background: linear-gradient(135deg, #0052cc 0%, #0747a6 100%) !important; /* Ваш корпоративный цвет тут */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-bottom: none !important;
    padding-bottom: 20px !important;
}

/* Логотип и текст в шапке */
.cv-header-text {
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}

/* =========================================
   3. ПОЛЕ ПОИСКА (БОЛЬШОЕ)
   ========================================= */
/* Контейнер поиска */
.cv-smart-search-container {
    max-width: 800px !important;
    margin-top: 20px !important;
}

/* Само поле ввода */
input.cv-smart-search-input {
    background-color: rgba(255, 255, 255, 0.15) !important; /* Полупрозрачный белый */
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50px !important; /* Круглые края */
    color: #fff !important;
    height: 50px !important;
    padding-left: 25px !important;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease !important;
}

/* Плейсхолдер (текст подсказки) */
input.cv-smart-search-input::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Поле поиска при нажатии */
input.cv-smart-search-input:focus {
    background-color: #fff !important;
    color: #333 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    transform: scale(1.02); /* Легкое увеличение */
}

/* =========================================
   4. ПЛИТКИ ЗАЯВОК (ГЛАВНАЯ СТРАНИЦА)
   ========================================= */
/* Сетка портала */
.cv-request-group-item, .cv-portal-card {
    background-color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important; /* Скругленные углы карточек */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    padding: 20px !important;
    margin-bottom: 15px !important;
}

/* Эффект наведения на карточку */
.cv-request-group-item:hover, .cv-portal-card:hover {
    transform: translateY(-5px); /* Карточка всплывает вверх */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
    cursor: pointer;
}

/* Заголовки групп на главной */
.cv-request-group-name {
    color: #172b4d !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
    border-bottom: 2px solid #0052cc;
    display: inline-block;
    padding-bottom: 5px;
}

/* Ссылки внутри карточек */
.cv-request-type-item {
    padding: 8px 0 !important;
    border-bottom: 1px dashed #eee;
}
.cv-request-type-item:last-child {
    border-bottom: none;
}

/* =========================================
   5. ФОРМА СОЗДАНИЯ ЗАЯВКИ
   ========================================= */
/* Фон формы */
.cv-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Поля ввода в форме */
.aui-select2-container .select2-choice, 
.text, .textarea, .password, .aui-select, 
.multi-select {
    border-radius: 6px !important;
    border: 1px solid #dfe1e6 !important;
    padding: 10px !important;
    height: auto !important;
}

.text:focus, .textarea:focus {
    border-color: #0052cc !important;
    box-shadow: 0 0 0 3px rgba(0,82,204,0.1) !important;
}

/* =========================================
   6. КНОПКИ
   ========================================= */
/* Основные кнопки (Создать, Отправить) */
.aui-button-primary, button.cv-login-button {
    background-color: #0052cc !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 20px !important;
    transition: background 0.3s;
}

.aui-button-primary:hover {
    background-color: #0747a6 !important;
}

/* =========================================
   7. УБИРАЕМ ЛИШНЕЕ
   ========================================= */
/* Скрыть футер "Powered by Atlassian" (если лицензия позволяет) */
.cv-footer .cv-powered-by {
    opacity: 0;
    pointer-events: none;
}

/* Скрыть лишние границы */
.cv-main-group, .cv-secondary-group {
    border: none !important;
}
/* =========================================
   СТИЛИЗАЦИЯ СТРАНИЦЫ ВХОДА (LOGIN PAGE)
   ========================================= */

/* 1. Фон всей страницы */
body.aui-page-focused-medium {
    background-color: #eaeff2 !important; /* Светло-серый фон как на макете */
    background-image: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Скрываем стандартную шапку и футер Jira на странице входа */
body.aui-page-focused-medium #header,
body.aui-page-focused-medium #footer {
    display: none !important;
}

/* 2. Карточка входа (Белый квадрат) */
body.aui-page-focused-medium .aui-page-panel {
    background-color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05) !important;
    width: 400px !important; /* Фиксированная ширина */
    margin: 0 auto !important;
    padding: 40px !important;
    position: relative;
}

/* Убираем лишние отступы внутри */
body.aui-page-focused-medium .aui-page-panel-inner {
    display: flex;
    flex-direction: column;
}

/* 3. Логотип (ВойсЛинк) */
/* Мы скрываем стандартный заголовок и ставим логотип картинкой */
body.aui-page-focused-medium .aui-page-header {
    margin-bottom: 30px !important;
    text-align: center;
}

body.aui-page-focused-medium .aui-page-header h1 {
    font-size: 0 !important; /* Скрываем текст "Log in" */
    height: 60px; /* Высота под логотип */
    background-image: url('/logo.png'); /* ПУТЬ К ВАШЕМУ ЛОГОТИПУ */
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin: 0 !important;
}

/* 4. Поля ввода (Логин и Пароль) */
body.aui-page-focused-medium input.text {
    background-color: #f4f6f8 !important; /* Серый фон полей */
    border: 1px solid #dfe1e6 !important;
    border-radius: 5px !important;
    height: 45px !important;
    padding-left: 15px !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 20px !important;
}

body.aui-page-focused-medium input.text:focus {
    border-color: #0052cc !important;
    background-color: #fff !important;
}

/* Лейблы (надписи Логин/Пароль) */
body.aui-page-focused-medium label {
    color: #6b778c !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
    display: block;
}

/* 5. Кнопка "Войти" (Зеленая) */
body.aui-page-focused-medium #login-form-submit {
    background-color: #43a047 !important; /* Зеленый цвет */
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    height: 45px !important;
    width: 100% !important;
    font-size: 16px !important;
    font-weight: bold !important;
    margin-top: 10px !important;
    text-shadow: none !important;
    transition: background 0.2s;
}

body.aui-page-focused-medium #login-form-submit:hover {
    background-color: #2e7d32 !important; /* Темно-зеленый при наведении */
}

/* 6. Ссылки "Забыли пароль" и чекбокс */
body.aui-page-focused-medium .checkbox {
    margin-top: 5px !important;
    color: #42526e !important;
}

/* Ссылка "Забыли пароль" справа */
body.aui-page-focused-medium #forgot-password {
    float: right;
    color: #43a047 !important; /* Зеленый текст */
    text-decoration: none;
    font-size: 13px;
}
