/* common.css - общие стили для всей админки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f3f4f6;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1f2937;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #374151;
}

.sidebar-header h1 {
    font-size: 20px;
}

.sidebar-header p {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.nav-item {
    padding: 12px 20px;
    margin: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background: #374151;
    color: white;
}

/* Main content */
.content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card h4 {
    margin-bottom: 16px;
    font-size: 16px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Status badges */
.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-blocked {
    background: #fee2e2;
    color: #991b1b;
}

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

/* Loading & Error */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.error {
    color: #dc2626;
    text-align: center;
    padding: 20px;
}

.status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.status-green {
    background-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.status-red {
    background-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.phone-link {
    text-decoration: none;
    color: #3b82f6;
}

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

.copy-phone-btn:hover {
    background: #d1d5db;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.btn-save-settings {
    margin-top: 8px;
    padding: 10px 16px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-save-settings:hover {
    background: #4338ca;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.form-group {
    margin-bottom: 12px;
}
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #374151;
}
.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

/* Кнопка-гамбургер */
.hamburger {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Оверлей для закрытия меню */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1060;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .content {
        padding: 16px;
        padding-top: 56px;
        width: 100%;
    }

    .card {
        padding: 14px;
    }

    table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th, td {
        padding: 8px 10px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .manager-modal__container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .manager-modal__header {
        padding: 12px 16px;
    }

    .manager-modal__content {
        padding: 16px;
    }

    .manager-modal__tabs {
        overflow-x: auto;
        padding: 0 4px;
    }

    .manager-tab {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .manager-info-grid {
        grid-template-columns: 1fr;
    }
}
