/* Основные стили и переменные */
:root {
    --primary-color: #d75196;
    --primary-dark: #b8327a;
    --primary-light: #e06bb3;
    --secondary-color: #282828;
    --text-color: #000;
    --text-light: #00000080;
    --white: #fff;
    --background: #d7519680;
    --border-color: rgba(0, 0, 0, 0.51);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Inter Display', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-color);
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Safe-area support for iOS notch/home indicator */
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Контейнер авторизации */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    padding: 0;
    box-sizing: border-box;
}

.auth-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5lvh;
    row-gap: 5lvh;
    column-gap: 5lvh;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

/* Логотип авторизации */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.logo-image {
    width: 100px;
    height: auto;
}

.logo-text {
    color: var(--white);
    font-size: 48px;
    font-weight: 600;
    font-family: 'Inter Display', sans-serif;
}

/* Форма авторизации */
.auth-form-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2lvw 2lvw 2lvh 2lvw;
    border: 1px solid var(--border-color);
    width: auto;
    box-sizing: border-box;
    display: block;
}

.auth-form {
    display: flex;
    flex-direction: row;
    column-gap: 1lvw;
    row-gap: 1lvw;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: auto;
    box-sizing: border-box;
}

.form-control {
    display: block;
    border-radius: 5px;
    height: 5lvh;
    border: 1px solid var(--text-light);
    width: 30lvw;
    padding-left: 10px;
    font-size: 16px;
    font-family: inherit;
    background: var(--white);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control::placeholder {
    color: var(--text-light);
}

/* Кнопка входа */
.btn-login {
    width: 10lvw;
    border-radius: 5px;
    background-color: var(--primary-color);
    height: 5lvh;
    border: none;
    color: var(--white);
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover {
    background-color: var(--primary-dark);
}

/* Основной интерфейс */
#mainInterface {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Заголовок */
.header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    align-content: space-between;
    flex-wrap: wrap;
    background-color: var(--white);
    color: var(--text-color);
    margin: 1lvh 1lvw;
    border-radius: 10px;
    padding: 1lvh 2lvw;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: start;
    flex-wrap: nowrap;
    align-self: center;
    flex-grow: 0;
    flex-shrink: 1;
}

.logo .logo-image {
    width: 50px;
}

.logo .logo-text {
    color: var(--text-color);
    font-size: 24px;
    margin-left: 1rem;
}

.menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.menu-item {
    display: inline-block;
    margin: 0;
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
    font-family: 'Inter Display', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-link {
    display: inline-block;
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

/* Основной контент */
.body-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Зона статистики */
.dashboard-zone {
    padding: 5lvh 5lvw;
}

.dashboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    align-content: space-between;
    flex-direction: row;
    gap: 2lvw;
}

/* Карточки статистики */
.stat-card {
    display: block;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: baseline;
    flex-direction: column;
    padding: 2lvh 2lvw;
    border-radius: 10px;
    width: 20lvw;
    min-width: 200px;
}

/* Карточки "по нашим данным" - РОЗОВЫЕ */
.stat-card:has(.stat-note:contains("по нашим данным")) {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Карточки "по данным amoCRM" - БЕЛЫЕ */
.stat-card:has(.stat-note:contains("по данным amoCRM")) {
    background-color: var(--white);
    color: var(--text-color);
}

/* Карточки аккаунтов - БЕЛЫЕ */
.account-card {
    background-color: var(--white);
    color: var(--text-color);
}

.account-card .stat-title {
    margin-top: 0;
    margin-bottom: 3lvh;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
}

.account-card .stat-number {
    font-weight: 400;
    text-transform: none;
    font-size: 32px;
    margin-top: -3lvh;
    margin-bottom: 1lvh;
    color: var(--text-color);
}

.account-card .stat-note {
    font-weight: 400;
    text-transform: none;
    font-size: 12px;
    margin-top: 1lvh;
    margin-bottom: 0;
    color: var(--text-light);
}

/* Карточки виджетов - РОЗОВЫЕ */
.widgets-card {
    background-color: var(--primary-color);
    color: var(--white);
}

.widgets-card .stat-title {
    margin-top: 0;
    margin-bottom: 3lvh;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
}

.widgets-card .stat-number {
    font-weight: 400;
    text-transform: none;
    font-size: 32px;
    margin-top: -3lvh;
    margin-bottom: 1lvh;
    color: var(--white);
}

.widgets-card .stat-note {
    font-weight: 400;
    text-transform: none;
    font-size: 12px;
    margin-top: 1lvh;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.5);
}

/* Зона поиска */
.search-zone {
    padding: 5lvh 5lvw;
}

.search-initial {
    border-radius: 10px;
    filter: blur(0px);
    background-color: var(--white);
    padding: 2lvh 2lvw;
    border: 1px solid var(--border-color);
}

.search-title {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 20px 0;
    font-family: 'Inter Display', sans-serif;
    text-align: center;
}

.search {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    align-content: space-between;
    column-gap: 1lvh;
    row-gap: 1lvh;
    margin-top: 2lvh;
    margin-bottom: 2lvh;
}

.search-field {
    flex-grow: 1;
    flex-shrink: 0;
}

/* Заголовки полей поиска */
.field-label {
    margin-top: 0;
    margin-bottom: 1lvh;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    display: block;
}

/* Поля поиска */
.search-input {
    display: block;
    border-radius: 5px;
    height: 5lvh;
    border: 1px solid var(--text-light);
    width: 30lvw;
    padding-left: 10px;
    font-size: 16px;
    font-family: inherit;
    background: var(--white);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(215, 81, 150, 0.2);
}

.search-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.search-button {
    align-items: center;
    justify-content: center;
    align-self: flex-end;
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1lvh 2lvw;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    height: 5lvh;
    min-width: 120px;
}

.btn-search:hover {
    background-color: var(--primary-dark);
}

/* Карточки результатов поиска */
.search-results .account-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--text-color);
}

.search-results .account-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.search-results .account-card h4 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-results .account-card p {
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

/* Секции результатов */
.results-section,
.account-details-section {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 5lvw;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.results-header,
.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.results-header h3,
.details-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.back-btn {
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--text-color);
    transform: translateY(-2px);
}

/* Информация об аккаунте */
.account-info-card {
    background: var(--primary-color);
    border-radius: 10px;
    padding: 2lvh 2lvw;
    color: var(--white);
    margin-bottom: 2rem;
}

.account-info-card h4 {
    margin-top: 0;
    margin-bottom: 1lvh;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
}

.account-info-card p {
    font-weight: 400;
    font-size: 24px;
    margin-top: -1lvh;
    margin-bottom: 2lvh;
    color: var(--white);
    text-transform: uppercase;
}

/* Стили для информации об аккаунте */
.account-info-card {
    background: var(--primary-color);
    color: white;
    padding: 2lvh 3lvw;
    border-radius: 12px;
    margin-bottom: 2lvh;
    box-shadow: 0 4px 12px rgba(215, 81, 150, 0.3);
}

.account-info-card h3 {
    margin: 0 0 2lvh 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5lvw;
}

.account-info-card h3::before {
    font-size: 1.3em;
    opacity: 0.9;
}

.account-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5lvh 2lvw;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1lvw;
}

.info-item label {
    font-weight: 600;
    min-width: 180px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5lvw;
}

.info-item label::before {
    font-size: 1.1em;
    opacity: 0.9;
}

.info-item span {
    font-weight: 500;
    color: white;
}

/* Стили для виджетов */
.widgets-section {
    background: white;
    border-radius: 12px;
    padding: 2lvh 3lvw;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widgets-section h4 {
    margin: 0 0 2lvh 0;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5lvw;
}

.widgets-table {
    display: flex;
    flex-direction: column;
    gap: 1.5lvh;
}

.widget-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2lvw;
    align-items: center;
    padding: 1.5lvh 2lvw;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.widget-name h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5lvw;
}

.widget-name h4::before {
    font-size: 1.2em;
    opacity: 0.8;
}

.widget-fields {
    display: flex;
    flex-direction: column;
    gap: 1lvh;
}

.field-group {
    display: flex;
    align-items: center;
    gap: 1lvw;
}

.field-group label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 120px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5lvw;
}

.field-group label::before {
    font-size: 1.1em;
    opacity: 0.9;
}

.widget-status-select,
.widget-date-input {
    padding: 0.5lvh 1lvw;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 120px;
    transition: all 0.3s ease;
}

.widget-status-select:focus,
.widget-date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(215, 81, 150, 0.2);
}

.widget-status-select option[value="active"] {
    color: #28a745;
    font-weight: 600;
}

.widget-status-select option[value="inactive"] {
    color: #dc3545;
    font-weight: 600;
}

.payment-status {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5lvh 1lvw;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.9rem;
    text-transform: capitalize;
}

/* Цветовое кодирование статусов оплаты */
.payment-free {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.payment-paid_before {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.payment-test_period {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.payment-expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.payment-unknown {
    background: #e9ecef;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.widget-actions {
    display: flex;
    justify-content: center;
}

.btn-save {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1lvh 2lvw;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    min-width: 120px;
    height: 4lvh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5lvw;
    box-shadow: 0 2px 8px rgba(215, 81, 150, 0.3);
}

.btn-save:hover {
    background: #c4457a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(215, 81, 150, 0.4);
    scale: 1.02;
}

.btn-save:active {
    transform: translateY(0);
    scale: 0.98;
}

.btn-text {
    display: inline-block;
}

/* Футер */
.footer {
    background-color: var(--secondary-color);
    height: 5lvh;
    display: flex;
    margin: 1lvh 1lvw;
    border-radius: 10px;
    margin-top: auto;
    align-self: stretch;
    width: auto;
    /* Lift footer above iOS home indicator */
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
}

.footer-text {
    text-align: center;
    color: var(--white);
    align-self: center;
    flex-grow: 1;
    flex-shrink: 0;
}

/* Уведомления */
.notifications-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1050;
    max-width: 400px;
}

.notification {
    background: var(--white);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out;
    font-weight: 500;
}

.notification.alert-success {
    border-left-color: #28a745;
    color: #155724;
}

.notification.alert-warning {
    border-left-color: #ffc107;
    color: #856404;
}

.notification.alert-error {
    border-left-color: #dc3545;
    color: #721c24;
}

.notification.alert-info {
    border-left-color: #17a2b8;
    color: #0c5460;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.modal-header {
    border-bottom: 2px solid var(--border-color);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 2rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 2px solid var(--border-color);
    border-radius: 0 0 20px 20px;
    padding: 1.5rem 2rem;
}

/* Кнопки */
.btn {
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
}
.btn:visited,
.btn:focus,
.btn:hover {
    text-decoration: none;
}

.btn-search {
    width: 10lvw;
    border-radius: 5px;
    background-color: var(--primary-color);
    height: 5lvh;
    border: none;
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-search:hover {
    background-color: var(--primary-dark);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background: var(--text-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 1lvh 2lvw;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    height: 5lvh;
    min-width: 120px;
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Дополнительные стили для элементов */
.account-id-search, .subdomain-search {
    flex-grow: 1;
    flex-shrink: 0;
}

/* Стили для результатов поиска */
.results-section {
    padding: 5lvh 5lvw;
}

.results-header h3 {
    color: var(--text-color);
    font-size: 24px;
    margin-bottom: 2lvh;
}

/* Стили для деталей аккаунта */
.account-details-section {
    padding: 5lvh 5lvw;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2lvh;
}

.details-header h3 {
    color: var(--text-color);
    font-size: 24px;
}

.back-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.back-btn:hover {
    background-color: #1a1a1a;
}

/* Адаптивность */
@media all and (max-width: 991px) {
    .logo {
        align-items: center;
        justify-content: center;
        column-gap: 1lvw;
        row-gap: 0;
    }
    
    .logo .logo-text {
        font-family: 'Inter', sans-serif;
    }
}

@media all and (max-width: 767px) {
    .menu {
        display: block;
    }
    
    .dashboard {
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        flex-wrap: nowrap;
        row-gap: 3svh;
    }
    
    .stat-card {
        width: auto;
    }
    
    .search-title {
        text-align: center;
    }
    
    .search {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        align-content: stretch;
        flex-wrap: nowrap;
        row-gap: 2lvh;
        column-gap: 2lvh;
    }
    
    .search-input {
        width: 50lvw;
    }
    
    .search-button {
        align-self: auto;
    }
    
    .btn-search {
        width: 20lvw;
    }
    
    /* Мобильная версия формы авторизации */
    .auth-form {
        flex-direction: column;
    }
    
    .form-control {
        width: 50lvw;
    }
    
    .btn-login {
        width: 20lvw;
    }
    
    .widget-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .widget-fields {
        flex-direction: column;
        gap: 1rem;
    }
}

@media all and (max-width: 479px) {
    .header {
        padding: 2lvh 2lvw;
        flex-direction: column;
        align-content: center;
        row-gap: 3lvh;
        column-gap: 3lvh;
    }
    
    .logo .logo-image {
        width: 40px;
    }
    
    .logo .logo-text {
        font-size: 20px;
    }
    
    .search-title {
        font-size: 24px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-title {
        font-size: 14px;
    }
    
    .widget-name h4 {
        font-size: 18px;
    }
    
    /* Мобильная версия формы для очень маленьких экранов */
    .auth-form {
        gap: 0.75rem;
    }
    
    .form-control {
        max-width: 200px;
        height: 2.5rem;
        font-size: 14px;
    }
    
    .btn-login {
        max-width: 200px;
        height: 2.5rem;
        font-size: 14px;
    }
    
    .auth-form-card {
        padding: 1.5rem;
    }
    
    .logo-image {
        width: 80px;
    }
    
    .logo-text {
        font-size: 36px;
    }
} 

@media all and (max-height: 600px) {
    .auth-container {
        padding: 1lvh;
        min-height: 100vh;
    }
    
    .auth-content {
        gap: 2vh;
        min-height: 100vh;
    }
    
    .auth-form-card {
        padding: 2rem;
        gap: 1.5rem;
    }
    
    .logo-image {
        width: 60px;
    }
    
    .logo-text {
        font-size: 28px;
    }
    
    .form-control {
        height: 2.5rem;
    }
    
    .btn-login {
        height: 2.5rem;
    }
}

@media all and (max-height: 500px) {
    .auth-container {
        padding: 0.5lvh;
    }
    
    .auth-content {
        gap: 1vh;
    }
    
    .auth-form-card {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .logo-image {
        width: 50px;
    }
    
    .logo-text {
        font-size: 24px;
    }
} 

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .account-info-grid {
        grid-template-columns: 1fr;
        gap: 1lvh 1lvw;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5lvh;
    }
    
    .info-item label {
        min-width: auto;
    }
    
    .widget-item {
        grid-template-columns: 1fr;
        gap: 1lvh;
        text-align: center;
    }
    
    .field-group {
        flex-direction: column;
        align-items: center;
        gap: 0.5lvh;
    }
    
    .field-group label {
        min-width: auto;
    }
    
    .widget-actions {
        margin-top: 1lvh;
    }
} 

/* Анимации для уведомлений */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Стили для уведомлений */
.notification {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    font-family: 'Inter Display', sans-serif;
} 

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
        width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* Keep modal away from screen edges */
    padding: 16px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px 32px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    color: #212529;
    font-family: 'Inter Display', sans-serif;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: #495057;
    transform: scale(1.1);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    /* Fit height on small screens including safe areas */
    max-height: calc(100vh - 200px - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0));
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    display: none;
}

/* Секция информации об аккаунте */
.account-info-section {
    margin-bottom: 40px;
}

.account-info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 28px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.account-info-card h4 {
    margin: 0 0 24px 0;
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    font-family: 'Inter Display', sans-serif;
}

.account-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: 'Inter', sans-serif;
}

.detail-item span {
    font-size: 15px;
    color: #212529;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    padding: 8px 0;
}

/* Секция виджетов */
.widgets-section {
    margin-top: 20px;
}

.widgets-header {
    margin-bottom: 24px;
}

.widgets-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    font-family: 'Inter Display', sans-serif;
}

.widgets-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.widget-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.widget-header {
    margin-bottom: 20px;
}

.widget-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    font-family: 'Inter Display', sans-serif;
    text-transform: lowercase;
}

.widget-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 24px;
    margin-bottom: 20px;
    align-items: center;
}

/* Специальная раскладка для getdoc: название | количество+кнопки | сохранить */
.widget-content.getdoc-row {
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
}

.widget-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-field label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

/* Inline loader for small placeholders */
.inline-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #dee2e6;
    border-top-color: #d75196;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
}

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

/* Figure-eight inline loader */
.inline-eight {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 26px;
    vertical-align: -4px;
    margin-right: 6px;
}

.inline-eight::before,
.inline-eight::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid #d75196;
    border-radius: 50%;
    box-sizing: border-box;
    opacity: 0.6;
}

.inline-eight::before {
    top: 0;
    animation: eightPulse 1s ease-in-out infinite;
}

.inline-eight::after {
    bottom: 0;
    animation: eightPulse 1s ease-in-out infinite 0.5s;
}

@keyframes eightPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateX(-50%) scale(0.7);
        opacity: 1;
    }
}

/* GETDOC: поле количества генераций стилизовано как общие поля */
.getdoc-generations-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.getdoc-generations-input {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    text-align: center;
    min-width: 160px;
}

.getdoc-generations-input:focus {
    outline: none;
    border-color: #d75196;
    box-shadow: 0 0 0 3px rgba(215, 81, 150, 0.1);
}

.getdoc-current-info {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.widget-status-select,
.widget-date-input,
.payment-status-select {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    transition: all 0.2s ease;
    text-align: center;
}

.widget-status-select:focus,
.widget-date-input:focus,
.payment-status-select:focus {
    outline: none;
    border-color: #d75196;
    box-shadow: 0 0 0 3px rgba(215, 81, 150, 0.1);
}

.widget-date-input:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.payment-status-select {
    background: #ffffff;
    color: #212529;
    cursor: pointer;
}

.payment-status-select option {
    padding: 8px;
    background: #ffffff;
    color: #212529;
}

.payment-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.payment-free {
    background: #d4edda;
    color: #155724;
}

.payment-paid_before {
    background: #cce7ff;
    color: #004085;
}

.payment-test_period {
    background: #fff3cd;
    color: #856404;
}

.payment-expired {
    background: #f8d7da;
    color: #721c24;
}

.payment-unknown {
    background: #e2e3e5;
    color: #383d41;
}

.widget-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.widget-actions.inline {
    margin-top: 0;
    align-self: center;
    justify-self: end;
}

.btn-save {
    background: #d75196;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-save:hover {
    background: #c4457f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(215, 81, 150, 0.3);
}

.no-widgets {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
    font-family: 'Inter', sans-serif;
}

/* Быстрые действия для дат и getdoc */
.date-quick-wrap,
.getdoc-generations-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-buttons {
    display: flex;
    gap: 8px;
}

.quick-buttons.two-rows {
    flex-direction: column;
}

.quick-buttons .row {
    display: flex;
    gap: 8px;
}

.quick-buttons .row.center {
    justify-content: center;
}

.quick-btn {
    background: #d75196;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 60px;
    height: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(215, 81, 150, 0.3);
}

.quick-btn:hover {
    background: #c4457f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(215, 81, 150, 0.25);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    /* Search form: prevent overflow */
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    .search-group {
        width: 100%;
    }
    .search-input {
        width: 100%;
        max-width: 100%;
    }
    .search-buttons {
        justify-content: center;
        width: 100%;
    }

    .modal-content {
        width: 100%;
        margin: 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .modal-overlay {
        padding: 12px;
    }
    
    .account-details-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .widget-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Force getdoc/getcalls special row to stack vertically */
    .widget-content.getdoc-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .widget-item {
        padding: 20px;
    }
    
    .widget-field label {
        text-align: left;
    }
    
    .widget-status-select,
    .widget-date-input,
    .payment-status-select,
    .widget-name-display {
        text-align: left;
    }

    /* Center actions and avoid overflow */
    .widget-actions,
    .widget-actions.inline {
        justify-content: center;
        width: 100%;
    }
    .btn-save {
        width: 100%;
        max-width: 320px;
    }

    /* Inputs shouldn't force horizontal scroll */
    .getdoc-generations-input,
    .getcalls-credits-input {
        min-width: 0;
        width: 100%;
        max-width: 320px;
    }

    .modal-header h3 {
        font-size: 22px;
    }
} 

.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.search-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-group label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    font-family: 'Inter', sans-serif;
}

.search-input {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #d75196;
    box-shadow: 0 0 0 3px rgba(215, 81, 150, 0.1);
}

.search-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-primary {
    background: #d75196;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #c4457f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(215, 81, 150, 0.3);
} 

.widget-name-display {
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #212529;
    font-weight: 500;
    text-align: center;
    text-transform: lowercase;
} 

/* ===== PartnerCabinet styles ===== */
.partner-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    background: var(--white);
    border-radius: 12px;
    margin: 1lvh 1lvw;
    padding: 1lvh 2lvw;
    box-shadow: var(--shadow);
}
.partner-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 220px;
}
.partner-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.partner-logo {
    width: 40px;
    height: 40px;
}
.partner-brand-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Inter Display', 'Inter', sans-serif;
}
.partner-topbar .partner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.partner-wrapper {
    padding: 2lvh 2lvw;
}
.partner-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-width: 1400px;
    margin: 0 auto;
}
.partner-card-inner {
    padding: 4lvh 4lvw;
}
.partner-title {
    margin: 0 0 2lvh 0;
    font-size: 36px;
    font-weight: 700;
    color: #6b6b6b;
}
.partner-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin: 16px 0 32px 0;
}
.partner-input {
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    color: var(--text-color);
}
.partner-btn {
    padding: 14px 24px;
    border-radius: 10px;
}
.partner-section-title {
    margin: 16px 0;
    font-size: 32px;
    font-weight: 700;
    color: #6b6b6b;
}
.partner-clients-section {
    margin-top: 32px;
}
.partner-message {
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
    transition: opacity 0.2s ease;
}
.partner-message.status-success {
    background: #d4edda;
    color: #155724;
}
.partner-message.status-error {
    background: #f8d7da;
    color: #721c24;
}
.partner-message.status-info {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.is-hidden {
    display: none !important;
}
.client-pill {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: #d75196;
    color: #fff;
    padding: 16px 22px;
    border-radius: 12px;
}
.client-pill-title {
    opacity: 0.9;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.client-pill-value {
    font-weight: 700;
    font-size: 18px;
    word-break: break-all;
    overflow-wrap: anywhere;
}
.client-pill .partners-detach {
    width: 100%;
    min-width: 0;
    align-self: stretch;
    text-align: center;
    margin-top: 8px;
    height: auto;
    padding: 10px 16px;
    background: #fff;
    color: #d75196;
    border: none;
    font-weight: 600;
}
.client-pill .partners-detach:hover {
    background: rgba(255, 255, 255, 0.9);
}
.partner-note {
    font-size: 16px;
    line-height: 1.35;
    color: #ffffff;
    background: #d75196;
    opacity: 0.9;
    padding: 12px 2lvw;
    border-radius: 12px;
    margin: 1.5lvh 1lvw 0 1lvw;
}

/* ===== Widgets catalog (public page) ===== */
.widgets-page {
    min-height: 100vh;
    background: var(--background);
    display: flex;
    flex-direction: column;
}
.widgets-page .header {
    margin-bottom: 0;
}
.menu-item.is-active {
    color: var(--primary-color);
}
.widgets-main {
    flex: 1;
    padding: 2lvh 5lvw 4lvh;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.widgets-catalog {
    width: 100%;
}
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.widget-card {
    background: linear-gradient(180deg, #d75196 0%, #c84388 100%);
    border-radius: 20px;
    padding: 2lvh 2lvw;
    box-shadow: 0 20px 60px rgba(215, 81, 150, 0.25);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    isolation: isolate;
}
.widget-card::before {
    display: none;
}
.widget-card-header h2 {
    margin: 0;
    font-size: 28px;
    color: #fff;
}
.widget-card-eyebrow {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}
.widget-card-description {
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
}
.widget-card-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.widget-metric {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.widget-metric-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 4px;
}
.widget-metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}
.widget-card-features {
    margin: 16px 0 0 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.widget-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.widget-card-actions .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}
.widget-card--loading,
.widget-card--empty {
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    min-height: 220px;
}
.widget-card-loading {
    width: 100%;
}
.widget-price-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.widget-price-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px 16px;
    gap: 16px;
}
.widget-price-name {
    font-weight: 600;
}
.widget-price-list small {
    display: block;
    color: #6c757d;
    font-size: 12px;
}
.widget-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.widget-modal-description {
    margin: 0;
    color: rgba(0, 0, 0, 0.78);
}
.widget-modal-note {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
}
.widgets-footer {
    margin-top: auto;
}
.btn-disabled {
    pointer-events: none;
    opacity: 0.5;
}
.modal-open {
    overflow: hidden;
}
.widgets-page .btn-primary {
    background: #fff;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.widgets-page .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}
.widgets-page .btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.widgets-page .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}
.widgets-page .btn-secondary.btn-disabled {
    opacity: 0.4;
    border-style: dashed;
}

@media (max-width: 768px) {
    .widgets-page .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .widgets-page .menu {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: flex-start;
    }
    .widgets-page .user-menu {
        width: 100%;
    }
    .widgets-page .user-link {
        display: inline-flex;
        width: auto;
    }
    .widget-card-metrics {
        grid-template-columns: 1fr;
    }
    .widget-card-actions {
        flex-direction: column;
    }
    .widget-card-actions .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .partner-title {
        font-size: 28px;
    }
    .partner-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Partners page styles ===== */
.partners-counter {
    text-align: center;
    font-weight: 700;
    color: #6b6b6b;
    font-size: 36px;
    margin: 1.5lvh 0;
}
.partners-grid {
    max-width: 1400px;
    margin: 0 auto 2lvh auto;
    padding: 0 2lvw;
    display: grid;
    grid-template-columns: 0.9fr 1.2fr;
    gap: 48px; /* дальше друг от друга */
}
.partners-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.partners-card-inner {
    padding: 24px;
}
.partners-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.partners-field label {
    font-weight: 600;
    font-size: 14px;
    color: #6b6b6b;
}
.partners-input {
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #fff;
    font-size: 16px;
    color: var(--text-color);
}
.partners-actions {
    margin-top: 8px;
}
.partners-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}
.partners-subtitle {
    text-align: center;
    margin: 16px 0 12px 0;
    color: #6b6b6b;
    font-weight: 800;
    font-size: 32px;
}
.partners-attached {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    align-items: stretch;
}
.partners-detach {
    background: #f8f9fa;
}

@media (max-width: 1024px) {
    .partners-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .partners-counter {
        font-size: 28px;
    }
}

/* ===== Partners layout per provided spec ===== */
.partners-title {
    color: rgb(0 0 0 / 0.5);
    font-size: 32px;
    margin-bottom: 2lvh;
    margin-left: 5lvw;
    margin-right: 5lvw;
    text-align: center;
    text-transform: none;
    box-sizing: border-box;
}

.partners-search-zone {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    column-gap: 2lvh;
    row-gap: 2lvh;
    padding-top: 5lvh;
    padding-bottom: 5lvh;
    padding-left: 5lvw;
    padding-right: 5lvw;
    box-sizing: border-box;
}

.partner-create,
.search-initial {
    background-color: rgb(255 255 255 / 1);
    border: 1px solid rgb(0 0 0 / 0.51);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    filter: blur(0px);
    padding-top: 2lvh;
    padding-bottom: 2lvh;
    padding-left: 2lvw;
    padding-right: 2lvw;
    box-sizing: border-box;
    width: 48%;
}

/* Left column content */
.pc-search {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: space-between;
    align-items: stretch;
    justify-content: center;
    column-gap: 2lvw;
    row-gap: 2lvw;
    margin-top: 2lvh;
    margin-bottom: 2lvh;
    box-sizing: border-box;
}

/* Make inputs fill container width */
.partners-input {
    width: 100%;
    box-sizing: border-box;
}

/* Right column rows */
.si-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: space-between;
    align-items: center;
    justify-content: space-around;
    column-gap: 1lvh;
    row-gap: 1lvh;
    margin-top: 2lvh;
    margin-bottom: 2lvh;
    box-sizing: border-box;
}

.si-attached {
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.search-buttons-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.partners-list-zone {
    padding: 5lvh 5lvw;
}
.partners-list-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 3lvh 3lvw;
}
.partners-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2lvh;
}
.partners-list-header h4 {
    margin: 0;
    font-size: 24px;
    color: #212529;
    font-weight: 700;
}
.partners-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.partner-item-card {
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.partner-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: #212529;
}
.partner-item-info span {
    font-size: 15px;
}
.partner-item-label {
    font-weight: 600;
    color: #6c757d;
    margin-right: 6px;
}
.partner-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .partners-search-zone {
        flex-direction: column;
    }
    .partner-create,
    .search-initial {
        width: 100%;
    }
    .partner-item-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .partners-list-card {
        padding: 2lvh 2lvw;
    }
    .partners-attached {
        grid-template-columns: 1fr;
    }
    .client-pill .partners-detach {
        width: 100%;
    }
    .widgets-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .widgets-nav {
        flex-wrap: wrap;
    }
    .widget-card-metrics {
        grid-template-columns: 1fr;
    }
    .widget-card-actions {
        flex-direction: column;
    }
    .widget-card-actions .btn {
        width: 100%;
    }
}