:root {
       --b24-primary: #2fc6f7; /* Основной синий Битрикс24 */
       --b24-secondary: #9dcf00; /* Зеленый Битрикс24 */
       --b24-primary-hover: #1ab8ea;
       --b24-secondary-hover: #8bc600;
       --b24-bg-light: #f5f7f8;
       --b24-text: #333;
       --b24-text-secondary: #6a737f;
       --b24-border: #e6e9eb;
     }
     
     body { 
       margin: 0; 
       font-family: 'Open Sans', system-ui, sans-serif;
       height: 100vh;
       overflow: hidden;
       color: var(--b24-text);
     }
     
     .center { 
       display: flex; 
       justify-content: center; 
       align-items: center; 
       height: 100vh; 
       background: var(--b24-bg-light);
     }
     
     .btn { 
       padding: 12px 24px; 
       font-size: 16px; 
       background: var(--b24-primary); 
       color: #fff;
       border-radius: 3px; 
       text-decoration: none; 
       transition: background 0.2s;
     }
     
     .btn:hover {
       background: var(--b24-primary-hover);
     }
     
     .employer-banner {
       height: 50px;
       background: white;
       border-bottom: 1px solid var(--b24-border);
       display: flex;
       align-items: center;
       padding: 0 15px;
       box-shadow: 0 1px 3px rgba(0,0,0,0.05);
     }
     
     .employer-name {
       font-weight: 600;
       font-size: 16px;
       margin: 0;
       color: var(--b24-text);
     }
     
     #app { 
       display: flex; 
       height: calc(100vh - 50px);
       background: var(--b24-bg-light);
     }
     
     #vacancies-panel, #responses-panel { 
       display: flex;
       flex-direction: column;
       border-right: 1px solid var(--b24-border); 
       overflow-y: auto;
       background: white;
     }
     
     #vacancies-panel {
       width: 260px;
     }
     
     #responses-panel {
       width: 350px;
     }
     
     #vacancies-panel h2, #responses-panel h2, #resume-panel h2 {
       padding: 10px 15px;
       margin: 0;
       font-size: 14px;
       text-transform: uppercase;
       font-weight: 600;
       color: var(--b24-text-secondary);
       background: var(--b24-bg-light);
       border-bottom: 1px solid var(--b24-border);
     }
     
     .vacancy-title {
       padding: 10px 15px;
       font-weight: 600;
       border-bottom: 1px solid var(--b24-border);
       background: white;
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
     }
     
     #vacancies-list, #responses-list { 
       list-style: none; 
       margin: 0; 
       padding: 0;
       overflow-y: auto;
       flex: 1;
     }
     
     #vacancies-list li, #responses-list li { 
       padding: 12px 15px; 
       cursor: pointer; 
       border-bottom: 1px solid var(--b24-border); 
       transition: background 0.2s;
     }
     
     #vacancies-list li:hover, #responses-list li:hover { 
       background: var(--b24-bg-light); 
     }
     
     #vacancies-list li.active, #responses-list li.active {
       background: rgba(47, 198, 247, 0.1);
       border-left: 3px solid var(--b24-primary);
       padding-left: 12px;
     }
     
     #chat-panel { 
       flex: 1; 
       display: flex; 
       flex-direction: column;
       background: white;
     }
     
     #resume-panel {
       width: 350px;
       border-left: 1px solid var(--b24-border);
       overflow-y: auto;
       padding: 0;
       background: white;
       display: none; /* Скрыт по умолчанию */
     }
     
     #resume-content {
       padding: 15px;
     }
     
     #resume-panel h3 {
       margin-top: 0;
       font-size: 18px;
       margin-bottom: 15px;
       border-bottom: 1px solid var(--b24-border);
       padding-bottom: 10px;
     }
     
     #resume-panel p {
       margin-bottom: 8px;
       font-size: 13px;
       line-height: 1.4;
     }
     
     #resume-panel img.resume-photo {
       max-width: 150px;
       height: auto;
       border-radius: 4px;
       margin-bottom: 10px;
       box-shadow: 0 1px 3px rgba(0,0,0,0.1);
     }
     
     #resume-panel a {
       color: var(--b24-primary);
       text-decoration: none;
     }
     
     #resume-panel a:hover {
       text-decoration: underline;
     }
     
     #chat-header { 
       padding: 12px 15px; 
       border-bottom: 1px solid var(--b24-border); 
       background: white;
     }
     
     #candidate-info {
       display: flex;
       flex-direction: column;
     }
     
     #candidate-name { 
       font-weight: bold; 
       font-size: 16px;
       color: var(--b24-text);
     }
     
     #candidate-name .hh-link {
       margin-left: 10px;
       font-size: 12px;
       font-weight: normal;
       color: var(--b24-text-secondary);
       text-decoration: none;
     }
     
     #candidate-name .hh-link:hover {
       text-decoration: underline;
     }
     
     #vacancy-name {
       font-size: 14px;
       color: var(--b24-text-secondary);
       margin-top: 3px;
     }
     
     #messages { 
       flex: 1; 
       overflow-y: auto; 
       padding: 15px; 
       display: flex; 
       flex-direction: column;
       background: var(--b24-bg-light);
     }
     
     #messages .in { 
       background: white; 
       align-self: flex-start; 
       border-radius: 18px 18px 18px 0;
       box-shadow: 0 1px 2px rgba(0,0,0,0.05);
     }
     
     #messages .out { 
       background: var(--b24-primary); 
       color: white;
       align-self: flex-end; 
       border-radius: 18px 18px 0 18px;
     }
     
     #messages .in, #messages .out { 
       margin: 5px 0; 
       padding: 10px 15px; 
       max-width: 80%; 
       position: relative;
     }
     
     #messages .message-content {
       margin-bottom: 4px;
       line-height: 1.4;
       white-space: pre-wrap; /* Сохраняем переносы строк */
     }
     
     #messages .message-time {
       font-size: 11px;
       opacity: 0.7;
       text-align: right;
       margin-top: 2px;
     }
     
     .date-separator {
       text-align: center;
       margin: 20px 0 10px;
       font-size: 12px;
       color: var(--b24-text-secondary);
       position: sticky;
       top: 0;
       z-index: 1;
       background: var(--b24-bg-light);
       padding: 5px 0;
     }
     
     #messages .in.unread {
       border-left: 3px solid var(--b24-secondary);
     }
     
     #input-area { 
       border-top: 1px solid var(--b24-border); 
       padding: 12px 15px; 
       background: white;
     }
     
     #input-area form { 
       display: flex; 
       gap: 10px; 
     }
     
     #message-input { 
       flex: 1; 
       padding: 10px 12px; 
       border: 1px solid var(--b24-border); 
       border-radius: 4px; 
       font-size: 14px;
       transition: border 0.2s;
     }
     
     #message-input:focus {
       border-color: var(--b24-primary);
       outline: none;
     }
     
     button { 
       padding: 10px 16px; 
       background: var(--b24-primary);
       color: white;
       border: none;
       border-radius: 4px;
       font-weight: 600;
       cursor: pointer;
       transition: background 0.2s;
     }
     
     button:hover {
       background: var(--b24-primary-hover);
     }
     
     .response-item {
       position: relative;
       display: flex;
       align-items: center;
       gap: 10px;
     }
     
     .avatar-container {
       width: 40px;
       height: 40px;
       border-radius: 50%;
       overflow: hidden;
       display: flex;
       align-items: center;
       justify-content: center;
       background: var(--b24-bg-light);
       flex-shrink: 0;
     }
     
     .response-avatar {
       display: block;
       width: 100%;
       height: 100%;
       object-fit: cover;
     }
     
     .response-avatar-initials {
       font-size: 16px;
       font-weight: bold;
       color: var(--b24-text-secondary);
       text-transform: uppercase;
     }
     
     .response-details {
       flex: 1;
     }
     
     .response-item .status {
       position: absolute;
       right: 10px;
       top: 10px;
       width: 10px;
       height: 10px;
       border-radius: 50%;
     }
     
     .response-item .status.new {
       background: var(--b24-secondary);
     }
     
     .response-item .status.read {
       background: #bec5cc;
     }
     
     .response-item .title {
       font-weight: 600;
       margin-bottom: 5px;
       color: var(--b24-text);
     }
     
     .response-item .info {
       font-size: 12px;
       color: var(--b24-text-secondary);
     }
     
     .empty-state {
       display: flex;
       flex-direction: column;
       align-items: center;
       justify-content: center;
       height: 100%;
       color: var(--b24-text-secondary);
       padding: 20px;
       text-align: center;
     }
     
     .empty-state p {
       margin: 10px 0;
       line-height: 1.5;
     }
     
     .vacancy-item .counters {
       margin-top: 5px;
       font-size: 12px;
       color: var(--b24-text-secondary);
     }
     
     /* Показываем панель резюме только когда выбран соискатель */
     .has-selected-response #resume-panel {
       display: block;
     }
     
     /* Респонсивность для маленьких экранов */
     @media (max-width: 1200px) {
       #resume-panel {
         width: 250px;
       }
     }
     
     @media (max-width: 992px) {
       #vacancies-panel {
         width: 220px;
       }
       
       #responses-panel {
         width: 250px;
       }
     }
     
     #vacancy-select {
       width: calc(100% - 30px);
       padding: 10px 15px;
       margin: 10px 15px 0;
       border: 1px solid var(--b24-border);
       border-radius: 4px;
       background: white;
       font-size: 14px;
       color: var(--b24-text);
       appearance: none; /* Убираем стандартную стрелку */
       background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20512%22%3E%3Cpath%20fill%3D%22%236a737f%22%20d%3D%22M119.5%20326.9L3.5%20201c-4.7-4.7-4.7-12.3%200-17l19.8-19.8c4.7-4.7%2012.3-4.7%2017%200L128%20279.3l87.7-87.9c4.7-4.7%2012.3-4.7%2017%200l19.8%2019.8c4.7%204.7%204.7%2012.3%200%2017l-116%20125.9c-4.7%204.6-12.3%204.6-17-.1z%22%2F%3E%3C%2Fsvg%3E'); /* Кастомная стрелка */
       background-repeat: no-repeat;
       background-position: right 15px center;
       background-size: 10px;
       cursor: pointer;
     }

     #vacancy-select:focus {
       border-color: var(--b24-primary);
       outline: none;
     }

     .toast-container {
       position: fixed;
       right: 20px;
       bottom: 20px;
       display: flex;
       flex-direction: column;
       gap: 10px;
       z-index: 2000;
       pointer-events: none;
     }

     .toast {
       padding: 12px 16px;
       border-radius: 6px;
       background: #f44336;
       color: #fff;
       box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
       font-size: 14px;
       pointer-events: all;
       transition: opacity 0.3s ease;
     }

     .toast--info {
       background: #2196f3;
     }

     .toast--success {
       background: #4caf50;
     }

     .toast--error {
       background: #f44336;
     }

     .toast.fade-out {
       opacity: 0;
     }

     .hidden {
         display: none !important;
     }

     #loader {
         position: fixed;
         top: 50%;
         left: 50%;
         transform: translate(-50%, -50%);
         z-index: 1000;
         background-color: rgba(255, 255, 255, 0.8);
         padding: 20px;
         border-radius: 5px;
         font-size: 1.2em;
         font-weight: bold;
         color: #333;
     }
