/* ============================================================
   Admin Resources  (ar-* prefix)
   ============================================================ */

/* ── New Resource button ── */
.ar-new-btn {
    background: var(--bg-main);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.ar-new-btn:hover {
    opacity: 0.9;
    color: #fff;
}

/* ── Filter bar ── */
.ar-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ar-filter-btn {
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1.5px solid #d1d5db;
    border-radius: 20px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.ar-filter-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.ar-filter-btn.active {
    background: var(--bg-main);
    color: #fff;
    border-color: var(--info-color);
}

/* ── Resource card list ── */
.ar-resource-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ar-resource-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.ar-resource-card:hover {
    border-color: var(--info-color);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.08);
}

.ar-resource-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #fff;
}

.ar-resource-icon.document { background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); }
.ar-resource-icon.video    { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.ar-resource-icon.link     { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

.ar-resource-meta {
    flex: 1;
    min-width: 0;
}

.ar-resource-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-resource-url {
    font-size: 0.75rem;
    color: var(--info-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.ar-resource-info {
    font-size: 0.73rem;
    color: #6b7280;
}

.ar-resource-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ar-btn-edit {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 8px;
    border: 1.5px solid var(--info-color);
    color: var(--info-color);
    background: #fff;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ar-btn-edit:hover {
    background: var(--info-color);
    color: #fff;
}

.ar-btn-delete {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 8px;
    border: 1.5px solid var(--danger-color);
    color: var(--danger-color);
    background: #fff;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ar-btn-delete:hover {
    background: var(--danger-color);
    color: #fff;
}

/* ── Empty state ── */
.ar-empty {
    text-align: center;
    padding: 48px 16px;
    color: #9ca3af;
}

/* ── Form overlay ── */
.ar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 768px) {
    .ar-overlay {
        align-items: center;
    }
}

.ar-form-card {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: arSlideUp 0.22s ease;
}

@media (min-width: 768px) {
    .ar-form-card {
        border-radius: 16px;
        max-height: 85vh;
    }
}

@keyframes arSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

.ar-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.ar-form-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
}

.ar-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ar-form-body label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    display: block;
}

.ar-form-body input,
.ar-form-body select,
.ar-form-body textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
}

.ar-form-body input:focus,
.ar-form-body select:focus,
.ar-form-body textarea:focus {
    outline: none;
    border-color: var(--info-color);
}

.ar-form-body textarea {
    resize: vertical;
    min-height: 72px;
}

.ar-form-footer {
    padding: 12px 18px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.ar-btn-cancel {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
}

.ar-btn-save {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: var(--bg-main);
    color: #fff;
    cursor: pointer;
}

.ar-btn-save:hover {
    opacity: 0.9;
}
