/* Стили для графика дежурств */
.duty-schedule-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.schedule-header h3 {
    margin: 0;
    color: #333;
}

.schedule-container {
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.schedule-table th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
}

.schedule-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.schedule-table tr:hover {
    background-color: #e9ecef;
}

.loading-schedule,
.no-schedule {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.schedule-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: #28a745;
    color: white;
    font-size: 12px;
    font-weight: bold;
}
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.schedule-date {
    font-weight: 500;
    color: #333;
}

.schedule-time {
    color: #666;
    font-family: monospace;
}

.loading-schedule, .no-schedule {
    text-align: center;
    padding: 20px;
    color: #666;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 95%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Whois страница */
.whois-container {
    width: 1000px;
    max-width: 1500px;
    margin: 0 auto;
    padding: 10px;
}

.whois-search {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #4CAF50;
}

.search-box button {
    padding: 15px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #45a049;
}

.search-box button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.quick-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.zone-btn {
    padding: 8px 15px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.zone-btn:hover {
    background: #e0e0e0;
    border-color: #4CAF50;
}

.whois-result {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.result-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.domain-status {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.domain-status.free {
    background: #4CAF50;
    color: white;
}

.domain-status.taken {
    background: #f44336;
    color: white;
}

.result-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    background: white;
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    display: block;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.info-value {
    font-size: 16px;
    color: #333;
    word-break: break-word;
}

.raw-data {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#rawTab {
    position: relative;
}

#rawTab .copy-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    padding: 8px 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#rawTab .copy-btn:hover {
    background: #45a049;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #f44336;
}

/* Стили для статуса домена */
.status-value {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.status-value.free {
    background-color: #4CAF50;
    color: white;
}

.status-value.registered {
    background-color: #2196F3;
    color: white;
}

.status-value.reserved {
    background-color: #FF9800;
    color: white;
}

.status-value.pending {
    background-color: #9C27B0;
    color: white;
}

.status-value.inactive {
    background-color: #f44336;
    color: white;
}

.status-value.unknown {
    background-color: #9e9e9e;
    color: white;
}

/* Стили для списка статусов */
.status-badge {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    background-color: #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
    color: #333;
}

/* Обновленные стили для info-grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.info-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    color: #212529;
    word-break: break-word;
    line-height: 1.5;
}

/* Модальное окно зон */
.zones-modal .modal-content {
    max-width: 800px;
}

.zones-body {
    max-height: 500px;
    overflow-y: auto;
}

.zone-region {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.zone-region h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.zone-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zone-item {
    padding: 5px 10px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.zone-item:hover {
    background: #4CAF50;
    color: white;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        width: 100%;
    }
    
    .quick-links {
        justify-content: center;
    }
    
    .result-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Переключатель отбойников */
.articles-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.toggle-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-radius: 4px;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: #f0f0f0;
}

.toggle-btn.active {
    background: #3498db;
    color: white;
}

/* Индикатор владельца статьи */
.article-owner {
    font-size: 11px;
    color: #666;
    margin-left: 10px;
    padding: 2px 6px;
    background: #f0f0f0;
    border-radius: 10px;
}

.article-private .article-header {
    border-left: 3px solid #3498db;
}

/* Кнопка копирования */
.copy-btn {
    background: #483D8B;
    color: white;
    padding: 0.75rem
}

.copy-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Уведомление о копировании */
.copy-notification {
    position: absolute;
    top: -30px;
    right: 10px;
    background: #27ae60;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(5px);
}

/* Анимация для кнопки при копировании */
@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.copy-btn.copied {
    animation: copyPulse 0.3s ease;
    background: #27ae60;
}

/* Обновим существующие стили для article-actions */
.article-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .copy-btn {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .copy-notification {
        top: -25px;
        right: 5px;
        font-size: 11px;
    }
}

/* Стиль для скрытой категории */
.category-hidden {
    background: #f0f0f0;
    border-left: 3px solid #f39c12;
}

.category-badge {
    display: inline-block;
    background: #f39c12;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 5px;
}

/* Уведомление о скрытой категории */
.hidden-category-notice {
    background: #f39c12;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 13px;
    text-align: center;
}

/* Navigation */
nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
}

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.header-content h1,
.header-content h1 a {
    font-size: 1.8rem;
    font-weight: 700;        /* Жирный (bold) - меняем с 300 на 700 */
    color: #ffffff;          /* Белый цвет текста */
    text-decoration: none;   /* Убирает подчеркивание */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Main Container */
.main-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    min-height: calc(100vh - 80px);
    width: 100%;
    max-width: none;
    margin: 0 auto;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.content-side {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    overflow: hidden;
    overflow-y: auto;
    height: 100%;
}

.buttons-sidebar {
    width: 300px;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

/* Forms */
.auth-form, .new-article-form, .new-category-form {
    max-width: 400px;
    margin: 0 auto;
    display: none;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    color: #666;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Buttons */
.admin-visible {
    display: flex !important;
}

.buttons-sidebar {
    transition: opacity 0.3s ease;
}

.buttons-sidebar[style*="display: block"] {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-add, .btn-manage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.btn-add {
    background: #27ae60;
}

.btn-add:hover {
    background: #219a52;
}

.btn-manage {
    background: #3498db;
}

.btn-manage:hover {
    background: #2980b9;
}

.btn-save {
    background: #27ae60;
    color: white;
}

.btn-save:hover {
    background: #219a52;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.btn-delete {
    background: #A52A2A;
    color: white;
    padding: 0.75rem;
}

.btn-delete:hover {
    background: #c0392b;
}

.users-page {
    max-width: 1100px;
    margin: 0 auto;
}

.users-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.user-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.user-form .form-group { margin: 0; }
.user-form button { height: 46px; }
.users-table-wrap { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; }
.users-table th, .users-table td { padding: .8rem; border-bottom: 1px solid #ddd; text-align: left; }
.users-table th { color: #2c3e50; }
.users-empty { text-align: center !important; color: #666; }
.current-user { color: #666; font-size: .85rem; }
.btn-delete:disabled { background: #bdc3c7; cursor: not-allowed; }

@media (max-width: 700px) {
    .user-form { grid-template-columns: 1fr; }
}

.btn-manage-small {
    background: none;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

.btn-manage-small:hover {
    background: #3498db;
    color: white;
}

/* Articles */
.articles-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.articles-actions {
    display: flex;
    gap: 0.5rem;
}

.article {
    background: #f8f9fa;
    border-radius: 2px;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s;
}

.article:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-header {
    padding: 0.25rem;
    margin-left: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-title-wrapper {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 1rem;
}

.article-header h4 {
    margin: 0;
    color: #2c3e50;
    flex-grow: 1;
    line-height: 1.3;
}

.article-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn {
    background: #808080;
    color: white;
    padding: 0.75rem;
}

.edit-btn:hover {
    background: #008000;
}

.article-content {
    display: none;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

.article-text {
    line-height: 1.6;
    color: #555;
}

/* Category sections */
.category-section {
    margin-bottom: 2rem;
}

.category-section h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.empty-category {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Category badges */
.article-category {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

.category-domains { background: #e74c3c; }
.category-hosting { background: #3498db; }
.category-servers { background: #9b59b6; }
.category-ssl { background: #f39c12; }
.category-cms { background: #1abc9c; }
.category-default { background: #95a5a6; }

/* Messages */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-modal, .close-button-form {
    font-size: 1.5rem;
    cursor: pointer;
    color: #95a5a6;
}

.close-modal:hover, .close-button-form:hover {
    color: #7f8c8d;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* Category and Button items */
.category-item, .button-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.category-basic {
    background: #f8f9fa;
    opacity: 0.7;
}

.category-info, .button-info {
    flex-grow: 1;
}

.category-name, .button-name {
    font-weight: 500;
    color: #2c3e50;
}

.category-slug, .button-url {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.button-order {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.category-actions, .button-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-delete-category, .btn-delete-button {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-delete-category:hover, .btn-delete-button:hover {
    background: #c0392b;
}

.btn-delete-category:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-edit {
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: #2980b9;
}

/* Sidebar buttons */
.buttons-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.buttons-header h3 {
    color: #2c3e50;
    font-weight: 400;
}

.sidebar-button {
    display: block;
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-align: center;
    transition: background 0.3s;
}

.sidebar-button:hover {
    background: #2980b9;
}

.no-buttons {
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Loading state */
.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Editable fields */
.editable {
    border: 1px dashed #3498db;
    padding: 0.5rem;
    border-radius: 4px;
    min-height: 1.5em;
}

.editable-textarea {
    width: 100%;
    min-height: 150px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.category-edit-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .buttons-sidebar {
        width: 100%;
    }
    
    .articles-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .articles-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .article-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .article-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}
