/* ============================================================
   IHT REHAB - MEDICAL REPORT SYSTEM
   Theme CSS
   ============================================================ */

:root {
    --iht-primary: #00A651;
    --iht-primary-dark: #007A3D;
    --iht-primary-light: #E8F5E9;
    --iht-accent: #4CAF50;
    --iht-text: #333333;
    --iht-text-light: #666666;
    --iht-bg: #F5F5F5;
    --iht-white: #FFFFFF;
    --iht-border: #E0E0E0;
    --iht-danger: #DC3545;
    --iht-warning: #FFC107;
    --iht-info: #17A2B8;
    --iht-success: #28A745;
}

/* ============================================================
   BASE
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--iht-text);
    background-color: var(--iht-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--iht-primary);
    text-decoration: none;
}

a:hover {
    color: var(--iht-primary-dark);
    text-decoration: underline;
}

/* ============================================================
   HEADER
   ============================================================ */
.iht-header {
    background-color: var(--iht-white);
    border-bottom: 3px solid var(--iht-primary);
    padding: 12px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.iht-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.iht-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.iht-logo img {
    height: 48px;
    width: auto;
}

.iht-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--iht-primary);
    letter-spacing: 0.5px;
}

.iht-logo-text small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--iht-text-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.iht-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
}

.iht-container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
}

/* ============================================================
   CARD
   ============================================================ */
.iht-card {
    background: var(--iht-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 20px;
}

.iht-card-header {
    border-bottom: 2px solid var(--iht-primary-light);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.iht-card-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--iht-primary-dark);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.iht-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.iht-btn-primary {
    background-color: var(--iht-primary);
    color: white;
}

.iht-btn-primary:hover {
    background-color: var(--iht-primary-dark);
    color: white;
    text-decoration: none;
}

.iht-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.iht-btn-secondary:hover {
    background-color: #5a6268;
    color: white;
    text-decoration: none;
}

.iht-btn-outline {
    background-color: white;
    color: var(--iht-primary);
    border: 2px solid var(--iht-primary);
}

.iht-btn-outline:hover {
    background-color: var(--iht-primary-light);
    text-decoration: none;
}

.iht-btn-block {
    display: block;
    width: 100%;
}

/* ============================================================
   FORMS
   ============================================================ */
.iht-form-group {
    margin-bottom: 20px;
}

.iht-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--iht-text);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iht-label .required {
    color: var(--iht-danger);
}

.iht-input,
.iht-textarea,
.iht-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid var(--iht-border);
    border-radius: 6px;
    background-color: white;
    transition: border-color 0.2s;
    font-family: inherit;
}

.iht-input:focus,
.iht-textarea:focus,
.iht-select:focus {
    outline: none;
    border-color: var(--iht-primary);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.iht-textarea {
    min-height: 100px;
    resize: vertical;
}

.iht-radio-group,
.iht-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.iht-radio-item,
.iht-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--iht-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.iht-radio-item:hover,
.iht-checkbox-item:hover {
    border-color: var(--iht-primary);
    background-color: var(--iht-primary-light);
}

.iht-radio-item input,
.iht-checkbox-item input {
    margin: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--iht-primary);
}

/* ============================================================
   ALERTS
   ============================================================ */
.iht-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.iht-alert-info {
    background-color: #E3F2FD;
    border-color: var(--iht-info);
    color: #0C5460;
}

.iht-alert-success {
    background-color: #D4EDDA;
    border-color: var(--iht-success);
    color: #155724;
}

.iht-alert-warning {
    background-color: #FFF3CD;
    border-color: var(--iht-warning);
    color: #856404;
}

.iht-alert-danger {
    background-color: #F8D7DA;
    border-color: var(--iht-danger);
    color: #721C24;
}

/* ============================================================
   PROGRESS STEPS
   ============================================================ */
.iht-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.iht-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--iht-border);
    z-index: 0;
}

.iht-progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.iht-progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--iht-border);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
}

.iht-progress-step.active .iht-progress-circle {
    background: var(--iht-primary);
}

.iht-progress-step.completed .iht-progress-circle {
    background: var(--iht-primary-dark);
}

.iht-progress-label {
    font-size: 12px;
    color: var(--iht-text-light);
    text-align: center;
}

.iht-progress-step.active .iht-progress-label {
    color: var(--iht-primary-dark);
    font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.iht-footer {
    background-color: var(--iht-primary-dark);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 14px;
}

.iht-footer a {
    color: #B8E6C9;
}

/* ============================================================
   UTILITY
   ============================================================ */
.iht-text-center { text-align: center; }
.iht-text-right { text-align: right; }
.iht-mb-0 { margin-bottom: 0; }
.iht-mb-1 { margin-bottom: 10px; }
.iht-mb-2 { margin-bottom: 20px; }
.iht-mb-3 { margin-bottom: 30px; }
.iht-mt-1 { margin-top: 10px; }
.iht-mt-2 { margin-top: 20px; }
.iht-mt-3 { margin-top: 30px; }
.iht-flex { display: flex; }
.iht-flex-between { display: flex; justify-content: space-between; align-items: center; }
.iht-gap-1 { gap: 10px; }
.iht-gap-2 { gap: 20px; }

/* ============================================================
   ADMIN - USER MANAGEMENT / OFFICER MANAGEMENT
   ============================================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--iht-primary-light);
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--iht-primary-dark);
    margin: 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
}

.btn:hover {
    text-decoration: none;
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--iht-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--iht-primary-dark);
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

.btn-warning {
    background-color: var(--iht-warning);
    color: #000;
}

.btn-warning:hover {
    background-color: #e0a800;
    color: #000;
}

.btn-danger {
    background-color: var(--iht-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.btn-success {
    background-color: var(--iht-success);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.data-table thead {
    background-color: var(--iht-primary);
    color: white;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--iht-border);
    font-size: 14px;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background-color: var(--iht-primary-light);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    background-color: var(--iht-primary-light);
    color: var(--iht-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #D4EDDA;
    color: #155724;
}

.badge-danger {
    background-color: #F8D7DA;
    color: #721C24;
}

.badge-warning {
    background-color: #FFF3CD;
    color: #856404;
}

.badge-info {
    background-color: #D1ECF1;
    color: #0C5460;
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
    font-size: 14px;
}

.alert-success {
    background-color: #D4EDDA;
    border-color: var(--iht-success);
    color: #155724;
}

.alert-danger {
    background-color: #F8D7DA;
    border-color: var(--iht-danger);
    color: #721C24;
}

.alert-warning {
    background-color: #FFF3CD;
    border-color: var(--iht-warning);
    color: #856404;
}

.alert-info {
    background-color: #D1ECF1;
    border-color: var(--iht-info);
    color: #0C5460;
}

.form-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 30px;
    max-width: 700px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--iht-text);
    font-size: 14px;
}

.form-group .required {
    color: var(--iht-danger);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid var(--iht-border);
    border-radius: 6px;
    background-color: white;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--iht-primary);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

select.form-control {
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--iht-border);
}

.error {
    display: block;
    color: var(--iht-danger);
    font-size: 13px;
    margin-top: 4px;
}

.text-muted {
    color: var(--iht-text-light);
    font-size: 12px;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .iht-container, .iht-container-wide {
        padding: 15px;
    }

    .iht-card {
        padding: 20px;
    }

    .iht-btn {
        padding: 14px 20px;
        width: 100%;
    }

    .iht-logo-text {
        font-size: 18px;
    }

    .iht-logo img {
        height: 36px;
    }

    .iht-progress-label {
        font-size: 10px;
    }

    .iht-progress-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .form-container {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .no-print,
    .iht-header,
    .iht-footer,
    button,
    nav {
        display: none !important;
    }

    body {
        background: white !important;
        font-size: 12pt;
    }

    .iht-card {
        box-shadow: none !important;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .iht-container,
    .iht-container-wide {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    a {
        text-decoration: none !important;
        color: #000 !important;
    }

    .iht-btn {
        display: none !important;
    }
}