* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    min-height: 100vh;
    padding: 15px;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 25px;
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1976d2;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    padding: 20px;
    border-radius: 12px;
    color: white;
    margin: -25px -25px 20px -25px;
}

header h1 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #e3f2fd;
    font-size: 0.9rem;
    font-weight: 500;
}

.warning-box {
    background: #fff8e1;
    border-left: 4px solid #ffa726;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.warning-box p {
    color: #e65100;
    margin-bottom: 3px;
    line-height: 1.4;
}

.warning-box strong {
    color: #d84315;
}

.patient-info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.dose-input-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 8px;
    border: 1px solid #b3e5fc;
}

.dose-input-section h2 {
    color: #0277bd;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.dose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #424242;
    font-size: 0.85rem;
}

.form-group input {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group input:hover {
    border-color: #bdbdbd;
}

.isf-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f3e5f5;
    border-radius: 8px;
    border: 1px solid #ce93d8;
}

.isf-section h2 {
    color: #6a1b9a;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.isf-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.isf-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.isf-info p {
    font-size: 0.95rem;
}

.isf-info span {
    color: #6a1b9a;
    font-weight: bold;
    font-size: 1.1rem;
}

.isf-amend-section {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 2px solid #ab47bc;
}

.button-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover {
    background: #1565c0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-secondary:hover {
    background: #616161;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(117, 117, 117, 0.3);
}

.calculator-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
    border: 1px solid #a5d6a7;
}

.calculator-section h2 {
    color: #2e7d32;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.instruction {
    color: #616161;
    margin-bottom: 12px;
    font-style: italic;
    font-size: 0.85rem;
}

.instruction-ar {
    color: #616161;
    margin-bottom: 12px;
    font-style: italic;
    direction: rtl;
    text-align: right;
    font-size: 0.85rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.calculator-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    border: 2px solid #c8e6c9;
}

.calculator-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #66bb6a;
}

.calculator-card h3 {
    color: #2e7d32;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.result-box {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #f1f8f4 0%, #e8f5e9 100%);
    border-radius: 6px;
    text-align: center;
    border: 1px solid #a5d6a7;
}

.result-box p:first-child {
    color: #757575;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.dose-result {
    font-size: 1.6rem;
    font-weight: bold;
    color: #2e7d32;
}

.print-section {
    margin-bottom: 20px;
    padding: 15px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
    border-radius: 8px;
    border: 2px dashed #1976d2;
}

.btn-print {
    padding: 12px 35px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

.btn-print:active {
    transform: translateY(0);
}

.correction-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff3e0;
    border-radius: 8px;
    border: 1px solid #ffcc80;
}

.correction-section h2 {
    color: #e65100;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.correction-section .result-box {
    background: linear-gradient(135deg, #fef5e7 0%, #fff3e0 100%);
    max-width: 400px;
    margin: 15px auto 0;
    border: 1px solid #ffcc80;
}

.correction-section .dose-result {
    color: #e65100;
}

footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    color: #757575;
    font-size: 0.85rem;
}

.contact {
    font-size: 0.8rem;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header {
        margin: -15px -15px 15px -15px;
        padding: 15px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .patient-info-section {
        grid-template-columns: 1fr;
    }

    .dose-grid {
        grid-template-columns: 1fr;
    }

    .calculator-grid {
        grid-template-columns: 1fr;
    }

    .isf-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .isf-info {
        flex-direction: column;
        gap: 8px;
    }
}

