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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f5f7fa;
    color: #1a202c;
    line-height: 1.5;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: #2d3748;
}

.modal-content input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.modal-content button {
    width: 100%;
    padding: 0.75rem;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-content button:hover {
    background: #2c5282;
}

/* Общие контейнеры */
.admin-container, .dev-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2d3748;
}

.logout-btn {
    background: #e53e3e;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

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

/* Карточки */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
}

/* Формы */
.resource-form input,
.resource-form textarea,
.inline-form input,
.edit-fields input,
.edit-fields textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.resource-form input,
.resource-form textarea {
    margin-bottom: 0.75rem;
}

.resource-form button,
.inline-form button {
    background: #38a169;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.resource-form button:hover {
    background: #2f855a;
}

/* Управление паролями */
.passwords-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.password-item {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
}

.password-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.password-display code {
    background: #edf2f7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

.copy-btn {
    background: #718096;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.inline-form input {
    flex: 1;
}

.note {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.5rem;
}

/* Ресурсы в админке */
.resources-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.edit-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.edit-buttons {
    display: flex;
    gap: 0.5rem;
}

.save-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.delete-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

/* Сетка ресурсов для разработчика */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.resource-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.resource-card p {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.resource-link {
    display: inline-block;
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
}

.resource-link:hover {
    text-decoration: underline;
}

/* Сообщения */
.success {
    background: #c6f6d5;
    color: #22543d;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.error {
    background: #fed7d7;
    color: #742a2a;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .passwords-section {
        grid-template-columns: 1fr;
    }
    
    .admin-container, .dev-container {
        padding: 1rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
}