/*
 * admin-pages.css
 * Дополнительные стили для специфичных страниц Admin панели
 */

/* ============================================================
   COMMON PAGE STYLES
   ============================================================ */
.admin-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--admin-text-secondary);
}

.admin-empty-state i {
    margin-bottom: 16px;
}

.admin-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin-bottom: 8px;
}

.admin-empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

.admin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.admin-loading p {
    margin-top: 16px;
    color: var(--admin-text-secondary);
}

/* Form controls */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-text-primary);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--admin-text-primary);
    background-color: var(--admin-bg-default);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-bg);
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--admin-text-secondary);
}

/* Buttons */
.btn-admin-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background-color: var(--admin-accent);
    border: none;
    border-radius: var(--admin-radius-md);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-admin-primary:hover {
    background-color: var(--admin-accent-dark);
}

.btn-admin-primary:active {
    transform: scale(0.98);
}

.btn-admin-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-admin-primary.w-100 {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--admin-radius-sm);
    color: var(--admin-text-secondary);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-icon:hover {
    background-color: var(--admin-grey-25);
    color: var(--admin-text-primary);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--admin-radius-md);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Utility classes */
.text-muted {
    color: var(--admin-text-secondary) !important;
}

.text-primary {
    color: var(--admin-accent) !important;
}

.small {
    font-size: 13px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 24px;
}

.mt-3 {
    margin-top: 16px;
}

.mt-4 {
    margin-top: 24px;
}

.w-100 {
    width: 100%;
}

.me-2 {
    margin-right: 8px;
}

/* Grid system */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 8px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 8px;
}

.g-3 {
    margin: 0 -12px;
}

.g-3 > * {
    padding: 0 12px;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.125em;
}

.text-primary .spinner-border {
    color: var(--admin-accent);
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .col-md-3,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .companies-grid,
    .styles-grid,
    .schools-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
}
