/* Competition cards */
.ac-comp-cards {
    margin: 2rem auto;
    font-family: Vazirmatn, Tahoma, sans-serif;
}
.ac-comp-cards h2 {
    font-size: 1.5rem;
    color: #0a1628;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgb(1, 85, 153);
}
.ac-comp-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.ac-comp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.ac-comp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.ac-comp-card:hover {
    border-color: rgb(1, 85, 153);
    box-shadow: 0 4px 20px rgba(1, 85, 153, 0.1);
    transform: translateY(-2px);
}
.ac-comp-card.ac-active {
    border-color: rgb(1, 85, 153);
    background: rgba(1, 85, 153, 0.04);
    box-shadow: 0 4px 20px rgba(1, 85, 153, 0.12);
    transform: translateY(-2px);
}
.ac-comp-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: rgba(1, 85, 153, 0.06);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(1, 85, 153);
}
.ac-comp-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 0.5rem;
    line-height: 1.5;
}
.ac-comp-card p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}
@media (max-width: 640px) {
    .ac-comp-grid { grid-template-columns: 1fr; }
}

/* Skeleton loader */
.ac-skeleton {
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}
.ac-skeleton-line {
    height: 1rem;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: ac-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}
@keyframes ac-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ac-form {
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    font-family: Vazirmatn, Tahoma, sans-serif;
}

.ac-form h2 {
    font-size: 1.5rem;
    color: #0a1628;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgb(1, 85, 153);
}

.ac-form h3 {
    font-size: 1.05rem;
    color: rgb(1, 85, 153);
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.ac-field {
    margin-bottom: 1.25rem;
}

.ac-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.35rem;
}

.ac-field label span {
    color: #dc2626;
}

.ac-field input[type="text"],
.ac-field input[type="tel"],
.ac-field input[type="email"],
.ac-field input[type="url"],
.ac-field input[type="password"],
.ac-field textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
    box-sizing: border-box;
}

.ac-field input:focus,
.ac-field textarea:focus {
    outline: none;
    border-color: rgb(1, 85, 153);
    box-shadow: 0 0 0 3px rgba(1, 85, 153, 0.1);
    background: #fff;
}

.ac-field input[type="file"] {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    font-family: inherit;
}

.ac-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Radio group */
.ac-radio-group {
    display: flex;
    gap: 1.5rem;
    padding-top: 0.25rem;
}

.ac-comp-group {
    flex-direction: column;
    gap: 0.75rem;
}

.ac-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
}

.ac-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: rgb(1, 85, 153);
}

.ac-hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.25rem 0;
}

/* Two-column row */
.ac-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ac-row .ac-field {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .ac-row,
    .ac-category-grid {
        grid-template-columns: 1fr;
    }
}

/* Category grid */
.ac-category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.ac-category-grid .ac-field {
    margin-bottom: 0;
}

.ac-field select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    color: #334155;
}

.ac-field select:focus {
    outline: none;
    border-color: rgb(1, 85, 153);
    box-shadow: 0 0 0 3px rgba(1, 85, 153, 0.1);
    background: #fff;
}

/* Sheet repeater */
.ac-sheet-row,
.ac-image-row {
    margin-bottom: 0.5rem;
}

.ac-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-family: inherit;
    border: 1px dashed rgb(1, 85, 153);
    color: rgb(1, 85, 153);
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.25rem;
}

.ac-add-btn:hover {
    background: rgba(1, 85, 153, 0.06);
}

.ac-add-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ac-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Submit */
.ac-submit {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: rgb(1, 85, 153);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 1rem;
}

.ac-submit:hover {
    background: #014a7e;
}

.ac-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.ac-message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.ac-message.ac-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ac-message.ac-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Field errors */
.ac-field.ac-invalid input,
.ac-field.ac-invalid textarea,
.ac-field.ac-invalid select {
    border-color: #dc2626;
    background: #fef2f2;
}

.ac-field.ac-invalid label {
    color: #dc2626;
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                          */
/* ------------------------------------------------------------------ */
.ac-dashboard {
    margin: 2rem auto;
    font-family: Vazirmatn, Tahoma, sans-serif;
}

.ac-dashboard h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    color: #0a1628;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgb(1, 85, 153);
}

.ac-project-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    overflow: hidden;
}

.ac-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ac-project-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #0a1628;
}

.ac-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}

.ac-project-meta span {
    white-space: nowrap;
}

.ac-project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1.25rem;
}

.ac-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.ac-btn-sm {
    background: #f1f5f9;
    color: #475569;
}

.ac-btn-sm:hover {
    background: #e2e8f0;
    color: #0a1628;
}

.ac-btn-pay {
    background: rgb(1, 85, 153) !important;
    color: #fff !important;
    margin-right: auto !important;
    text-decoration: none !important;
}

.ac-btn-pay:hover {
    background: #014a7e !important;
    color: #fff !important;
    text-decoration: none !important;
}

.ac-text-muted {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: auto;
}

.ac-text-success {
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 600;
    margin-left: auto;
}

.ac-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.ac-badge-pending { background: #fef3c7; color: #92400e; }
.ac-badge-approved { background: #d1fae5; color: #065f46; }
.ac-badge-wait_for_payment { background: #dbeafe; color: #1e40af; }
.ac-badge-declined { background: #fee2e2; color: #991b1b; }

/* Detail expand */
.ac-project-detail {
    display: none;
    padding: 1rem 1.25rem;
    background: #f9f9f9;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.8;
}
.ac-project-detail.ac-open {
    display: block;
}
.ac-project-detail p {
    margin: 0.25rem 0;
}

/* ------------------------------------------------------------------ */
/* Payment modal                                                      */
/* ------------------------------------------------------------------ */
.ac-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: Vazirmatn, Tahoma, sans-serif;
}
.ac-modal[hidden] {
    display: none;
}
.ac-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.55);
}
.ac-modal-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
}
.ac-modal-close {
    position: absolute;
    top: 0.6rem;
    left: 0.9rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    font-family: inherit;
}
.ac-modal-box h3 {
    font-size: 1.15rem;
    color: #0a1628;
    margin: 0 0 0.5rem;
}
.ac-modal-box .ac-muted {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1rem;
}
.ac-pay-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ac-pay-option {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
}
.ac-pay-option-disabled {
    background: #f8fafc;
    opacity: 0.75;
}
.ac-pay-option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #0a1628;
    margin-bottom: 0.5rem;
}
.ac-bank-line {
    font-size: 0.9rem;
    color: #334155;
    margin: 0.3rem 0;
    line-height: 1.7;
}
.ac-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    margin: 0.5rem 0;
    box-sizing: border-box;
    background: #fafafa;
}
.ac-input:focus {
    outline: none;
    border-color: rgb(1, 85, 153);
    box-shadow: 0 0 0 3px rgba(1, 85, 153, 0.1);
    background: #fff;
}
.ac-input-ltr {
    text-align: left;
}
.ac-bank-confirm {
    width: 100%;
    justify-content: center;
    margin: 0 !important;
}
.ac-form-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}
