/* ═══════════════════════════════════════
   ADMIN PANEL — Pro Design
   ═══════════════════════════════════════ */

.admin-container {
    padding-top: calc(80px + var(--sp-8));
    min-height: 100vh;
    background: var(--bg-muted);
}

.admin-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--sp-6);
    align-items: start;
}

/* Sidebar */
.admin-sidebar {
    background: var(--bg-main);
    padding: var(--sp-8);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    position: sticky;
    top: calc(80px + var(--sp-8));
}

.admin-sidebar h2 {
    font-size: var(--text-lg);
    margin-bottom: var(--sp-8);
    padding-bottom: var(--sp-4);
    border-bottom: 1px solid var(--border);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.admin-nav-item {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--text-body);
    transition: all var(--duration-fast) var(--ease-out);
}

.admin-nav-item:hover {
    background: var(--bg-soft);
    color: var(--primary-light);
}

.admin-nav-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(56, 189, 248, 0.08));
    color: var(--primary-light);
    font-weight: 600;
}

/* Content Area */
.admin-content {
    background: var(--bg-main);
    padding: var(--sp-10);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    min-height: 500px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-8);
    padding-bottom: var(--sp-6);
    border-bottom: 1px solid var(--border);
}

.admin-header h2 {
    font-size: var(--text-xl);
}

/* Admin Forms */
.admin-form-group {
    margin-bottom: var(--sp-6);
}

.admin-form-group label {
    display: block;
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-main);
    margin-bottom: var(--sp-2);
}

.admin-form-group input,
.admin-form-group textarea,
.admin-form-group select {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--text-main);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
    outline: none;
    background: var(--bg-main);
}

.admin-form-group input:focus,
.admin-form-group textarea:focus,
.admin-form-group select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.admin-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Data Table */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    padding: var(--sp-3) var(--sp-4);
    text-align: left;
    border-bottom: 2px solid var(--border);
    background: var(--bg-soft);
}

.admin-table th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.admin-table th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.admin-table td {
    padding: var(--sp-4);
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border);
    color: var(--text-body);
}

.admin-table tbody tr {
    transition: background var(--duration-fast);
}

.admin-table tbody tr:hover {
    background: var(--bg-soft);
}

/* Action Buttons */
.action-btns {
    white-space: nowrap;
}

.action-btns > button {
    display: inline-flex;
    margin-right: var(--sp-2);
    vertical-align: middle;
}

.action-btns > button:last-child {
    margin-right: 0;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.btn-edit {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-light);
}

.btn-edit:hover {
    background: rgba(37, 99, 235, 0.15);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Sidebar Utilities */
.sidebar-utils {
    margin-top: var(--sp-8);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

/* ═══════════════════════════════════════
   RRHH PAGE — Pro Design
   ═══════════════════════════════════════ */
.rrhh-hero {
    padding-top: calc(80px + var(--sp-16));
    padding-bottom: var(--sp-16);
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-mid) 100%);
    color: white;
}

.rrhh-hero h1 {
    color: white;
    margin-bottom: var(--sp-4);
}

.rrhh-hero p {
    color: var(--text-muted);
    font-size: var(--text-xl);
    max-width: 600px;
}

.rrhh-content {
    padding: var(--sp-24) 0;
}

.job-category-title {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    padding-bottom: var(--sp-4);
    margin-bottom: var(--sp-8);
    border-bottom: 2px solid var(--primary-light);
    display: inline-block;
}

.job-card {
    padding: var(--sp-8);
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: var(--sp-6);
    transition: all var(--duration-normal) var(--ease-out);
}

.job-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.job-card h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--sp-4);
}

.job-card ul {
    list-style: disc;
    margin-left: var(--sp-6);
    margin-bottom: var(--sp-4);
}

.job-card li {
    font-size: var(--text-sm);
    color: var(--text-body);
    line-height: var(--leading-relaxed);
}

.job-card p {
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.postular-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--primary-light);
    cursor: pointer;
    padding: 0;
    border: none;
    background: none;
    transition: gap var(--duration-fast) var(--ease-out);
}

.postular-btn:hover {
    gap: var(--sp-3);
}

/* ═══════════════════════════════════════
   FORMS / CERTIFICATIONS PAGE — Pro
   ═══════════════════════════════════════ */
.forms-hero {
    padding-top: calc(80px + var(--sp-16));
    padding-bottom: var(--sp-16);
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-mid) 100%);
    color: white;
}

.forms-hero h1 {
    color: white;
    margin-bottom: var(--sp-4);
}

.forms-hero p {
    color: var(--text-muted);
    font-size: var(--text-xl);
    max-width: 600px;
}

.forms-content {
    padding: var(--sp-24) 0;
}

.forms-category-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-bottom: var(--sp-6);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--border);
}

.forms-grid-pro {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-12);
}

.form-download-card {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-6);
    border-radius: var(--radius-lg);
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all var(--duration-normal) var(--ease-out);
    text-decoration: none;
}

.form-download-card:hover {
    border-color: var(--primary-light);
    background: rgba(37, 99, 235, 0.04);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.form-download-card svg {
    color: var(--primary-light);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════
   CATALOG PAGE
   ═══════════════════════════════════════ */
.catalog-hero {
    padding-top: calc(80px + var(--sp-16));
    padding-bottom: var(--sp-16);
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-mid) 100%);
    color: white;
}

.catalog-hero h1 {
    color: white;
    margin-bottom: var(--sp-4);
}

.catalog-hero p {
    color: var(--text-muted);
    font-size: var(--text-xl);
    max-width: 600px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--sp-6);
}

.catalog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.catalog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.catalog-card-body {
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    flex: 1;
}

.catalog-card-badge {
    align-self: flex-start;
    background: var(--primary);
    color: white;
    padding: var(--sp-1) var(--sp-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-wide);
}

.catalog-card-body h3 {
    font-size: var(--text-lg);
}

.catalog-card-body p {
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    flex: 1;
}

/* Featured toggle in admin */
.btn-featured {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
    background: rgba(234, 179, 8, 0.08);
    color: #ca8a04;
}

.btn-featured:hover {
    background: rgba(234, 179, 8, 0.15);
}

.btn-featured.is-featured {
    background: #fbbf24;
    color: white;
}

.btn-upload {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
    background: rgba(22, 163, 74, 0.08);
    color: var(--secondary);
}

.btn-upload:hover {
    background: rgba(22, 163, 74, 0.15);
}

/* Inline edit inputs */
.inline-edit {
    padding: var(--sp-2) var(--sp-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--text-main);
    background: var(--bg-main);
    outline: none;
    transition: border-color var(--duration-fast);
}

.inline-edit:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Job detail page */
.job-detail-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--sp-10);
}

/* ═══════════════════════════════════════
   ADMIN MODAL OVERLAY
   ═══════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-6);
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-card {
    background: var(--bg-main);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.25s var(--ease-out);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-6) var(--sp-8);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: var(--text-lg);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--bg-soft);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.modal-body {
    padding: var(--sp-8);
}

.modal-body .admin-form-group {
    margin-bottom: var(--sp-5);
}

.modal-footer {
    display: flex;
    gap: var(--sp-3);
    justify-content: flex-end;
    padding: var(--sp-6) var(--sp-8);
    border-top: 1px solid var(--border);
}

.modal-body .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
}

.file-preview {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    margin-top: var(--sp-2);
}

.file-preview span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-1) var(--sp-3);
    background: var(--bg-soft);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
}

.chip button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    display: flex;
}

.chip button:hover {
    color: #ef4444;
}

/* ═══════════════════════════════════════
   ADMIN RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
    .admin-wrapper {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-content {
        padding: var(--sp-6);
    }

    .admin-table {
        font-size: var(--text-xs);
    }

    .admin-table th,
    .admin-table td {
        padding: var(--sp-2) var(--sp-3);
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}