/* Админ-панель Содконсалт */

.admin-sidebar {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.admin-sidebar > nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.admin-sidebar > div:first-child,
.admin-sidebar > div:last-child {
    flex-shrink: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
}

.admin-nav-link:hover {
    background: #f1f5f9;
    color: #2663DD;
}

.admin-nav-link.active {
    background: #eff6ff;
    color: #2663DD;
    font-weight: 600;
}

.admin-nav-badge {
    margin-left: auto;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.admin-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

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

.admin-card-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.admin-table th {
    text-align: left;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.admin-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.admin-table tbody tr.row-new {
    background: #eff6ff;
}

.admin-table tbody tr.row-new td {
    font-weight: 600;
    color: #0f172a;
}

.admin-table tbody tr.row-new:hover {
    background: #dbeafe;
}

.admin-ticket-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    margin-left: 0.25rem;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    vertical-align: middle;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-progress {
    background: #fef3c7;
    color: #b45309;
}

.badge-done {
    background: #d1fae5;
    color: #047857;
}

.badge-cancelled {
    background: #f1f5f9;
    color: #64748b;
}

.stat-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.stat-card:hover {
    border-color: #2663DD;
    box-shadow: 0 4px 12px rgba(38, 99, 221, 0.1);
}

.stat-card.active {
    border-color: #2663DD;
    background: #eff6ff;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.btn-view {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: #2663DD;
    color: #fff;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-view:hover {
    background: #1e4fa8;
}

.field-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.375rem;
}

.field-value {
    font-size: 1.0625rem;
    color: #0f172a;
}

.field-text {
    line-height: 1.6;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
}

.admin-input,
.admin-select,
.admin-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.15s ease;
}

.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
    outline: none;
    border-color: #2663DD;
    box-shadow: 0 0 0 3px rgba(38, 99, 221, 0.15);
}

.admin-textarea {
    resize: vertical;
    min-height: 120px;
}

.admin-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: #2663DD;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.admin-btn-primary:hover {
    background: #1e4fa8;
}

.admin-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #334155;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.admin-alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 500;
}

.tariff-row-controls {
    vertical-align: middle;
}

.tariff-row-controls-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tariff-move-btn,
.tariff-col-move {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tariff-move-btn:hover:not(:disabled),
.tariff-col-move:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.tariff-move-btn:disabled,
.tariff-col-move:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.tariff-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
}

.tariff-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    color: #94a3b8;
    font-size: 0.95rem;
    letter-spacing: -0.15em;
    cursor: grab;
    user-select: none;
}

.tariff-feature-row--dragging {
    opacity: 0.55;
}

.tariff-feature-row--drag-over td {
    box-shadow: inset 0 3px 0 #2663DD;
}

.tariff-col-controls {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.tariff-plan-title {
    display: block;
    font-weight: 700;
}

.tariff-plan-col--highlight {
    background: #ecfdf8 !important;
}

.tariff-plan-header-edit {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.tariff-plan-highlight {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #059669;
}

.tariff-feature-name-edit {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tariff-inline-input {
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    min-width: 0;
    width: 100%;
}

.tariff-plan-title-input {
    font-weight: 700;
    text-align: center;
}

.tariff-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    background: #fff;
    color: #dc2626;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.tariff-delete-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.tariff-price-row td {
    border-top: 2px solid #e2e8f0;
    background: #f8fafc;
    vertical-align: middle;
}

.tariff-price-input {
    font-weight: 700;
}

.admin-alert-success {
    background: #d1fae5;
    color: #047857;
}

.admin-alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

.login-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

@media (max-width: 1024px) {
    .admin-sidebar {
        display: none;
    }

    .flex-1.ml-64 {
        margin-left: 0;
    }
}
