.custom-form p { margin-bottom: 15px; }
.custom-form input { padding: 8px; width: 100%; max-width: 300px; }
.custom-form button {
    margin-top: 10px;
    padding: 10px 18px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background: #0073aa;
    color: #fff;
    font-weight: 500;
}
.custom-form .message {
    margin-top: 15px; padding: 10px;
    border-radius: 5px; font-weight: 500;
}
.custom-form .message.error   { background: #ffe5e5; color: #d60000; }
.custom-form .message.success { background: #e6ffed; color: #008f00; }
.auth-buttons, .login-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.auth-buttons a, .auth-buttons button,
.login-actions a, .login-actions button,
.btn-logout a, .btn-logout button {
    display: inline-flex;           /* чтобы можно было центрировать текст */
    align-items: center;            /* вертикальное центрирование */
    justify-content: center;        /* горизонтальное центрирование */
    flex: 1 1 120px;
    max-width: 200px;
    text-align: center;
    padding: 10px 15px;             /* одинаковый padding для всех */
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.2;
    border: none;
    box-sizing: border-box;
    color: #fff;
}
.btn-ui-adm {
    background: #28a745;
    display: block;
    margin: 0 auto 10px;
    width: fit-content; 
    padding: 10px 20px;  
    color: white;        
    text-decoration: none; 
    border-radius: 5px;
}
.btn-ui-usr {
    background: #009dff;
    display: block;
    margin: 0 auto 10px;
    width: fit-content; 
    padding: 10px 20px;  
    color: white;        
    text-decoration: none; 
    border-radius: 5px;
}
.delete-form,.btn-delete,.inst-delete,.delete-user,.vpo-delete,.npo-delete,.spo-delete,.oo-delete,.protocol-delete,.order-delete,.btn-delete-employee,.btn-delete-classifier,.btn-delete-orgdata,.niarss-delete,.niars-del,.conclusion-delete {
    background-color: #e74c3c; /* красная */
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.delete-form,.btn-delete,.delete-user,.inst-delete,.vpo-delete,.npo-delete,.spo-delete,.oo-delete,.protocol-delete,.order-delete,.btn-delete-employee,.btn-delete-classifier,.btn-delete-orgdata,.niarss-delete,.niars-del,.conclusion-delete:hover {
    background-color: #c0392b;
}
.edit-form,.edit-role,.reset-pass,.btn-edit,.inst-edit,.inst_export,.vpo_export,.oo_export,.spo_export,.dpo_export,.pvo_export,.do_export,.npo_export,.vpo-edit,.npo-edit,.spo-edit,.oo-edit,.protocol-edit,.order-edit,.btn-edit-employee,.btn-edit-classifier,.btn-edit-orgdata,.niarss-edit,.niars-edit,.conclusion-edit {
    background-color: #2ecc71; /* зелёная */
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.edit-form,.edit-role,.reset-pass,.btn-edit,.inst-edit,.vpo-edit,.inst_export,.vpo_export,.oo_export,.spo_export,.dpo_export,.pvo_export,.do_export,.npo_export,.npo-edit,.spo-edit,.oo-edit,.protocol-edit,.order-edit,.btn-edit-employee,.btn-edit-classifier,.btn-edit-orgdata,.niarss-edit,.niars-edit,.conclusion-edit:hover {
    background-color: #27ae60;
}
.btn-register { background: #28a745; }
.btn-login    { background: #009dff; }
.btn-account  { background: #009dff; }
.btn-logout   { background: #d63638; }
.auth-buttons a:hover, .auth-buttons button:hover,
.login-actions a:hover, .login-actions button:hover {
    opacity: 0.85;
    color: #fff;
    text-decoration: none;
}
.account-menu {
    position: relative;
    display: inline-block;
}
.account-menu-btn {
    background: #0073aa; color: #fff; padding: 10px 15px;
    border-radius: 5px; cursor: pointer; border: none; font-weight: 500;
}
.account-menu-dropdown {
    display: none;
    position: absolute;
    top: 110%; left: 0;
    background: #fff; border: 1px solid #ddd; border-radius: 5px;
    min-width: 180px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 9999;
}
.account-menu-dropdown.show { display: block; }
.account-menu-dropdown a,
.account-menu-dropdown button {
    display: block; width: 100%;
    padding: 10px 12px;
    text-align: left; background: none; border: none; cursor: pointer;
    text-decoration: none; color: #333; font-size: 14px;
}
.account-menu-dropdown a:hover,
.account-menu-dropdown button:hover { background: #f2f2f2; }
.employees-table {
    width: 100%;
    border-collapse: collapse;
}
.employees-table th, .employees-table td {
    word-wrap: break-word;
    max-width: 200px; /* можно подогнать */
	padding: 8px;
    text-align: center;
}
/* Фон под модалкой */
.modal-edit {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* поверх всего */
}

/* Окошко модалки */
.modal-edit .modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  text-align: left;
  z-index: 10000;
}

/* Кнопки внутри */
.modal-edit button {
  margin: 5px;
  padding: 8px 15px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.modal-edit button[type="submit"] {
  background: #28a745;
  color: #fff;
}

.modal-edit .close-modal {
  background: #dc3545;
  color: #fff;
}
/* === Фон модалки === */
#niars_modal {
  display: none; /* по умолчанию скрыто */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;

  animation: fadeIn 0.25s ease;
}

/* === Контейнер формы === */
#niars_edit_form {
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);

  animation: slideUp 0.25s ease;
  font-family: Arial, sans-serif;
}

/* Заголовки и подписи */
#niars_edit_form label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 14px;
  color: #444;
}

#niars_edit_form p {
  margin-bottom: 14px;
}

/* Поля */
#niars_edit_form input,
#niars_edit_form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

#niars_edit_form input:focus,
#niars_edit_form select:focus {
  border-color: #0073aa;
  outline: none;
}

/* Кнопки */
#niars_edit_form button {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#niars_edit_form button[type="submit"] {
  background: #0073aa;
  color: #fff;
}

#niars_edit_form button[type="submit"]:hover {
  background: #005f87;
  transform: scale(1.05);
}

#niars_edit_form #niars_modal_close {
  background: #ccc;
  color: #333;
  margin-left: 8px;
}

#niars_edit_form #niars_modal_close:hover {
  background: #aaa;
  transform: scale(1.05);
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.rating-form-table {
  width: 100%;
  border-collapse: collapse;
}
.rating-form-table th {
  text-align: left;
  padding: 8px;
  background: #f2f2f2;
}
.rating-form-table td {
  padding: 6px 8px;
  vertical-align: middle;
}
.rating-form-table input,
.rating-form-table select,
.rating-form-table textarea {
  width: 100%;
  max-width: 350px;
}
.form-table {
            width: 100%;
            border-collapse: collapse;
        }
.form-table td {
            border: 1px solid #ddd;
            padding: 8px 12px;
            vertical-align: top;
        }
.form-table td:first-child {
            font-weight: bold;
            background: #f9f9f9;
            width: 45%;
        }
.form-table tr:nth-child(even) {
            background: #fafafa;
        }
.docverify-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.docverify-table th, 
.docverify-table td {
    border: 1px solid #ccc;
    padding: 8px 10px;
    vertical-align: top;
}

.docverify-table th {
    background: #f5f5f5;
    text-align: left;
}

.docverify-table .decision {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eef5ee;
    font-size: 0.9em;
    color: #2d6a2d;
}
.decision {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    color: #fff;
}

.decision-ok {
    background: #2e7d32; /* насыщенный зелёный */
    border: 1px solid #1b5e20;
}

.decision-bad {
    background: #c62828; /* ярко-красный фон */
    border: 1px solid #b71c1c;
}