:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
    direction: rtl;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.wide {
    width: 100%;
}

h2,
h3 {
    margin-top: 0;
    color: var(--text);
}

h3 {
    color: var(--primary);
    border-bottom: 2px solid var(--bg);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    border-color: var(--primary);
    outline: none;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-outline,
.btn-back {
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    border: none;
    transition: transform 0.1s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-back {
    background: #64748b;
    color: white;
    margin-bottom: 20px;
    width: auto;
}

.hidden {
    display: none;
}

.score-circle {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.decision-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.decision-text {
    font-size: 1.2rem;
    color: var(--primary-dark);
}

/* Data Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--border);
    padding: 12px;
    text-align: right;
}

.data-table th {
    background-color: var(--bg);
    color: var(--text-light);
}

.data-table tr:hover {
    background-color: var(--bg);
}

/* Tag Styles */
.tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.tag-red {
    background: #fecaca;
    color: #991b1b;
}

.tag-yellow {
    background: #fef08a;
    color: #854d0e;
}

.mitigation {
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--secondary);
    background: #ecfdf5;
    padding: 8px;
    border-radius: 6px;
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: white;
        margin: 0;
        padding: 0;
    }

    .container {
        max-width: 100%;
        box-shadow: none;
    }

    .btn-back,
    .btn-secondary,
    .btn-outline {
        display: none;
    }

    .card {
        border: none;
        box-shadow: none;
        break-inside: avoid;
    }
}