:root {
    --aop-bg: #ffffff;
    --aop-bg-alt: #f8fafc;
    --aop-text: #1e293b;
    --aop-text-light: #64748b;
    --aop-border: #e2e8f0;
    --aop-accent: #3b82f6;
    --aop-accent-hover: #2563eb;
    --aop-warning: #f59e0b;
    --aop-success: #10b981;
    --aop-error: #ef4444;

    --aop-radius: 8px;
    --aop-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --aop-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --aop-transition: all 0.2s ease-in-out;
}



.aop-card {
    background: var(--aop-bg);
    border: 1px solid var(--aop-border);
    border-radius: var(--aop-radius);
    box-shadow: var(--aop-shadow);
    padding: 24px;
    color: var(--aop-text);
    transition: var(--aop-transition);
}

.aop-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--aop-text);
}

.aop-form-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.aop-form-group {
    margin-bottom: 1.25rem;
}

.aop-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--aop-text);
}

.aop-form-group label small {
    color: var(--aop-text-light);
    font-weight: normal;
}

.aop-form-group input[type="text"],
.aop-form-group input[type="email"],
.aop-form-group select,
.aop-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--aop-border);
    border-radius: 8px;
    background: var(--aop-bg-alt);
    color: var(--aop-text);
    font-family: inherit;
    transition: var(--aop-transition);
}

.aop-form-group input:focus,
.aop-form-group select:focus,
.aop-form-group textarea:focus {
    outline: none;
    border-color: var(--aop-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.aop-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 6px;
    cursor: pointer;
}

.aop-terms label {
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--aop-text-light);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.aop-terms input[type="checkbox"] {
    margin-top: 3px;
}

.aop-form-msgs {
    margin-top: 16px;
    font-size: 0.95rem;
}

.aop-msg-error {
    color: var(--aop-error);
}

.aop-msg-success {
    color: var(--aop-success);
}


.aop-board-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--aop-text);
}

.aop-board-header {
    margin-bottom: 24px;
}

.aop-board-title {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 12px;
}

.aop-board-disclaimer {
    font-size: 1rem;
    color: var(--aop-text-light);
    max-width: 800px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.aop-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* ═══ BASE CARD (left-border style) ═══ */
.aop-case-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    border-left: 4px solid #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    transition: box-shadow .2s, transform .2s;
}

.aop-case-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}

/* Domain left-border colours */
.aop-domain-drept-penal {
    border-left-color: #dc2626;
}

.aop-domain-drept-civil {
    border-left-color: #16a34a;
}

.aop-domain-dreptul-familiei,
.aop-domain-drept-familie {
    border-left-color: #d97706;
}

.aop-domain-dreptul-muncii,
.aop-domain-drept-muncii {
    border-left-color: #0891b2;
}

.aop-domain-drept-administrativ,
.aop-domain-contencios-administrativ {
    border-left-color: #9333ea;
}

.aop-domain-altul,
.aop-domain-altele {
    border-left-color: #64748b;
}

/* Card Header */
.aop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.aop-card-person {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.aop-card-county {
    font-weight: 400;
    color: #6b7280;
}

/* Shared badge base */
.aop-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: .02em;
}

/* Domain badge — color keyed by data-domain */
.aop-badge-domain {
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
    text-transform: uppercase;
    font-size: 0.70rem;
    letter-spacing: .04em;
}

.aop-badge-domain[data-domain="drept-penal"] {
    background: #fee2e2;
    color: #dc2626;
}

.aop-badge-domain[data-domain="drept-civil"] {
    background: #dcfce7;
    color: #15803d;
}

.aop-badge-domain[data-domain="dreptul-familiei"],
.aop-badge-domain[data-domain="drept-familie"] {
    background: #fef3c7;
    color: #b45309;
}

.aop-badge-domain[data-domain="dreptul-muncii"],
.aop-badge-domain[data-domain="drept-muncii"] {
    background: #cffafe;
    color: #0e7490;
}

.aop-badge-domain[data-domain="drept-administrativ"],
.aop-badge-domain[data-domain="contencios-administrativ"] {
    background: #f3e8ff;
    color: #7e22ce;
}

.aop-badge-domain[data-domain="altul"],
.aop-badge-domain[data-domain="altele"] {
    background: #f1f5f9;
    color: #475569;
}

/* Demers badge */
.aop-badge-demers {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
    font-weight: 500;
}

/* Status badge */
.aop-badge-status {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-weight: 500;
}

.aop-badge-ico {
    font-style: normal;
    line-height: 1;
}

.aop-badge-status.status-no-reply {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.aop-badge-status.status-in-term {
    background: #fefce8;
    color: #a16207;
    border-color: #fde68a;
}

.aop-badge-status.status-rejected {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.aop-badge-status.status-clasat {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.aop-badge-status.status-in-progress {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.aop-badge-status.status-default {
    background: #f4f4f5;
    color: #71717a;
    border-color: #e4e4e7;
}

.aop-badge-status.status-answered {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
    font-weight: 700;
    box-shadow: 0 0 0 1px #bbf7d0;
}

/* Admin Reply Box on Card */
.aop-admin-reply-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 2px;
}

.aop-admin-reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #15803d;
    margin-bottom: 6px;
    font-weight: 600;
}

.aop-admin-reply-meta {
    color: #6b7280;
    font-weight: 400;
    font-size: 0.78rem;
}

.aop-admin-reply-text {
    font-size: 0.88rem;
    color: #1e293b;
    line-height: 1.55;
    margin: 0 0 6px 0;
}

/* Toggle button */
.aop-reply-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    margin-top: 4px;
    font-size: 0.80rem;
    font-weight: 600;
    color: #15803d;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.aop-reply-toggle:hover {
    color: #166534;
    text-decoration: underline;
}

.aop-reply-toggle-icon {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.aop-reply-toggle[aria-expanded="true"] .aop-reply-toggle-icon {
    transform: rotate(180deg);
}



/* Pills row */
.aop-case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

/* Description */
.aop-case-desc {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #374151;
    margin: 0;
    flex: 1;
}

/* Footer */
.aop-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.aop-card-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #6b7280;
}


.aop-filter-select {
    padding: 8px 12px;
    border: 1px solid var(--aop-border);
    border-radius: 6px;
    background-color: var(--aop-bg);
    color: var(--aop-text);
    font-size: 0.9rem;
    transition: var(--aop-transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 32px;
}

.aop-filter-select:focus {
    outline: none;
    border-color: var(--aop-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.aop-filters-bar {
    font-size: 0.95rem;
}




.aop-btn {
    border-radius: 6px;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    transition: var(--aop-transition);
    font-size: 0.95rem;
}

.aop-btn-primary {
    background: var(--aop-accent);
    color: white;
}

.aop-btn-primary:hover {
    background: var(--aop-accent-hover);
}

.aop-btn-accent {
    background: var(--aop-accent);
    color: white;
    width: auto;
    display: inline-block;
}

.aop-btn-accent:hover {
    background: var(--aop-accent-hover);
}

.aop-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding-top: 60px;
}

.aop-modal-content {
    background: var(--aop-bg);
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: aopModalFadeIn 0.3s;
}

.aop-modal-close {
    color: var(--aop-text-light);
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.aop-modal-close:hover,
.aop-modal-close:focus {
    color: var(--aop-text);
    text-decoration: none;
}

.aop-captcha {
    margin-bottom: 1rem;
}

@keyframes aopModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}