/* Altun Qay Custom Styles */
.altun-qay-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #fdf8f3 0%, #f5efe6 100%);
    padding-bottom: 60px;
}

.aq-form-page {
    padding-top: 20px;
}

/* Hero Header */
.aq-form-header {
    background: linear-gradient(135deg, #d4af37 0%, #b89500 50%, #d4af37 100%);
    color: white;
    padding: 30px 20px;
    margin: -20px -20px 30px;
    border-radius: 0 0 24px 24px;
}

.aq-form-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.aq-form-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.aq-header-actions {
    display: flex;
    gap: 12px;
}

.aq-btn-back {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    border-radius: 10px !important;
    padding: 8px 18px !important;
    font-size: 13px !important;
}

.aq-btn-back:hover {
    background: rgba(255,255,255,0.3) !important;
}

.aq-btn-save {
    background: white !important;
    color: #d4af37 !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 8px 24px !important;
}

.aq-btn-save:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Form Cards */
.aq-form-card {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.aq-form-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.aq-form-card-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(135deg, #d4af37 0%, #f0d76e 100%);
}

/* Form Group */
.aq-form-group {
    margin-bottom: 20px;
}

.aq-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.aq-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fafafa;
}

.aq-form-control:focus {
    outline: none;
    border-color: #d4af37;
    background: white;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.aq-form-control:hover {
    border-color: #d4af37;
}

select.aq-form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' 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;
    padding-right: 40px;
}

/* Member Cards */
.aq-member-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 12px;
}

.aq-member-summary {
    display: flex;
    gap: 24px;
}

.aq-member-count,
.aq-estimated-total {
    font-size: 13px;
    color: #666;
}

.aq-member-count span,
.aq-estimated-total span {
    font-weight: 700;
    color: #d4af37;
    font-size: 16px;
}

.aq-add-member-btn {
    background: #d4af37 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.aq-add-member-btn:hover {
    background: #b89500 !important;
}

.aq-member-list {
    max-height: 360px;
    overflow-y: auto;
}

.aq-member-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.aq-member-card:hover {
    background: #f0f0f0;
}

.aq-member-card.selected {
    background: #fff8e6;
    border: 2px solid #d4af37;
}

.aq-member-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d4af37 0%, #f0d76e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.aq-member-info {
    flex: 1;
    min-width: 0;
}

.aq-member-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aq-member-phone {
    font-size: 12px;
    color: #888;
}

.aq-member-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d4af37;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.aq-member-checkbox.checked {
    background: #d4af37;
}

.aq-member-checkbox.checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
}

.aq-member-checkbox input {
    display: none;
}

/* Edit Mode Member Summary */
.aq-member-summary-box {
    background: #fafafa;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.aq-member-summary-count {
    font-size: 32px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 8px;
}

.aq-member-summary-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.aq-member-summary-hint {
    font-size: 12px;
    color: #888;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

/* Rule List */
.aq-rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aq-rule-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.aq-rule-item:last-child {
    border-bottom: none;
}

.aq-rule-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #d4af37 0%, #f0d76e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.aq-rule-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    padding-top: 4px;
}

/* Bottom Actions */
.aq-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.aq-btn-cancel {
    background: white !important;
    color: #666 !important;
    border: 1px solid #ddd !important;
    border-radius: 12px !important;
    padding: 12px 28px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.aq-btn-cancel:hover {
    background: #fafafa !important;
}

.aq-btn-submit {
    background: linear-gradient(135deg, #d4af37 0%, #b89500 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 32px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.aq-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Modal Styles */
.aq-modal-header {
    background: linear-gradient(135deg, #d4af37 0%, #b89500 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.aq-modal-header .modal-title {
    font-weight: 600;
}

.aq-modal-header .btn-close {
    color: white;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .aq-form-title {
        font-size: 20px;
    }
    
    .aq-member-summary {
        flex-direction: column;
        gap: 8px;
    }
    
    .aq-form-actions {
        flex-direction: column;
    }
    
    .aq-btn-cancel,
    .aq-btn-submit {
        width: 100%;
    }
}

/* RTL Support */
[dir="rtl"] .aq-form-card-title::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .aq-member-summary {
    flex-direction: row-reverse;
}

[dir="rtl"] .aq-rule-item {
    flex-direction: row-reverse;
}

[dir="rtl"] select.aq-form-control {
    background-position: left 12px center;
    padding-right: 16px;
    padding-left: 40px;
}