/* ===== Condition Scoring Page ===== */

.cs-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.cs-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cs-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cs-section {
    background: var(--background-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.cs-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs-section-title svg {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
}

/* ===== FILTERS ===== */
.cs-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.cs-filter-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    display: block;
}

.cs-filter-group select,
.cs-filter-group input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.85rem;
    background: var(--background-dark);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    transition: border-color 0.2s;
}

.cs-filter-group select:focus,
.cs-filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* ===== ASSET LIST ===== */
.cs-asset-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--background-dark);
}

.cs-asset-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}

.cs-asset-item:last-child {
    border-bottom: none;
}

.cs-asset-item:hover {
    background: var(--background-hover);
}

.cs-asset-item.selected {
    background: rgba(14, 165, 233, 0.12);
    border-right: 3px solid var(--primary-color);
}

.cs-asset-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cs-asset-loc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.cs-no-result {
    padding: 32px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.cs-placeholder {
    text-align: center;
    padding: 28px;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* ===== ASSET INFO ===== */
.cs-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.cs-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: var(--background-hover);
    border-radius: 12px;
}

.cs-info-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.cs-info-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cs-condition.good {
    color: #22c55e;
}

.cs-condition.average {
    color: #f59e0b;
}

.cs-condition.poor {
    color: #ef4444;
}

.cs-risk.low {
    color: #22c55e;
}

.cs-risk.medium {
    color: #f59e0b;
}

.cs-risk.high {
    color: #fb923c;
}

.cs-risk.critical {
    color: #ef4444;
}

/* ===== SCORING FORM ===== */
.cs-score-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cs-condition-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.cs-radio-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--background-hover);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cs-radio-card input[type="radio"] {
    display: none;
}

.cs-radio-card:hover {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.06);
}

.cs-radio-card.active {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.cs-radio-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cs-radio-icon.good {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.cs-radio-icon.average {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.cs-radio-icon.poor {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.cs-radio-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cs-notes-field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 6px;
}

.cs-notes-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.88rem;
    background: var(--background-dark);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    resize: vertical;
    transition: border-color 0.2s;
}

.cs-notes-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.cs-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn', sans-serif;
    align-self: flex-start;
}

.cs-submit-btn svg {
    width: 18px;
    height: 18px;
}

.cs-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ===== HISTORY TIMELINE ===== */
.cs-timeline {
    display: flex;
    flex-direction: column;
}

.cs-timeline-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-right: 2px solid var(--border-color);
    padding-right: 18px;
    position: relative;
}

.cs-timeline-item.latest {
    border-color: var(--primary-color);
}

.cs-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    right: -7px;
    top: 18px;
    background: var(--border-color);
}

.cs-timeline-dot.good {
    background: #22c55e;
}

.cs-timeline-dot.average {
    background: #f59e0b;
}

.cs-timeline-dot.poor {
    background: #ef4444;
}

.cs-timeline-content {
    flex: 1;
}

.cs-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.cs-timeline-condition {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 6px;
}

.cs-timeline-condition.good {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
}

.cs-timeline-condition.average {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.cs-timeline-condition.poor {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.cs-timeline-date {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.cs-timeline-user {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.cs-timeline-notes {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 6px 10px;
    background: var(--background-dark);
    border-radius: 8px;
    margin-top: 4px;
}

/* ===== EXCEL SECTION ===== */
.cs-excel-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cs-excel-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.cs-excel-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn', sans-serif;
    border: 1px solid var(--border-color);
}

.cs-excel-btn svg {
    width: 18px;
    height: 18px;
}

.cs-excel-btn.download {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.cs-excel-btn.download:hover {
    background: rgba(16, 185, 129, 0.2);
}

.cs-excel-btn.upload {
    background: rgba(14, 165, 233, 0.1);
    color: #38bdf8;
    border-color: rgba(14, 165, 233, 0.3);
}

.cs-excel-btn.upload:hover {
    background: rgba(14, 165, 233, 0.2);
}

.cs-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.2s;
    cursor: pointer;
}

.cs-upload-area:hover,
.cs-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.04);
}

.cs-upload-area svg {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.cs-upload-hint {
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .cs-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .cs-filters {
        grid-template-columns: 1fr 1fr;
    }

    .cs-condition-options {
        grid-template-columns: 1fr;
    }
}