html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}
.hero {
    text-align: center;
    padding: 80px 20px;
}

    .hero h1 {
        color: #c8102e;
        font-size: 55px;
        font-weight: bold;
    }

    .hero p {
        font-size: 22px;
        color: #555;
        margin-top: 15px;
    }

.main-btn {
    display: inline-block;
    margin-top: 25px;
    padding: 15px 35px;
    background: #c8102e;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 18px;
    transition: 0.3s;
}

    .main-btn:hover {
        background: #a50d25;
        color: white;
    }

.cards {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.card {
    background: white;
    width: 300px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}

    .card h3 {
        color: #c8102e;
        margin-bottom: 15px;
    }

body {
    background-color: #f8f9fa;
}

.training-header {
    text-align: center;
    margin-top: 40px;
}

    .training-header h1 {
        color: #c8102e;
        font-size: 42px;
    }

.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
    gap: 25px;
    margin-top: 40px;
}

.item-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,.08);
}

    .item-card img {
        width: 170px;
        height: 170px;
        object-fit: contain;
    }

    .item-card h4 {
        margin-top: 15px;
        color: #001b44;
    }

.amount-input {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    text-align: center;
    font-size: 20px;
}

.action-buttons {
    margin-top: 40px;
    text-align: center;
}

.check-btn {
    background: #c8102e;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 18px;
}

.page-container {
    display: flex;
    flex-direction: row-reverse;
    gap: 30px;
    margin-top: 30px;
}

.bags-sidebar {
    width: 280px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,.08);
    height: fit-content;
}

    .bags-sidebar h3 {
        text-align: center;
        margin-bottom: 20px;
        color: #001b44;
    }

.bag {
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 18px;
    transition: .2s;
}

    .bag:hover {
        background: #f5f5f5;
    }

.selected {
    border: 2px solid #c8102e;
    background: #fff5f5;
}

.content-area {
    flex: 1;
}

.placeholder-image {
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f1;
    border-radius: 10px;
    color: #888;
    font-size: 20px;
}

.custom-navbar {
    background: #001d4a;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
}

.navbar-right {
    font-size: 28px;
    font-weight: bold;
}

.navbar-center {
    display: flex;
    gap: 35px;
    margin-right: 45px;
}

    .navbar-center a {
        color: white;
        text-decoration: none;
        font-size: 18px;
    }

        .navbar-center a:hover {
            color: #ffdddd;
        }

.admin-btn {
    background: white;
    color: #001d4a;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
}

    .admin-btn:hover {
        background: #f0f0f0;
    }

.bag {
    display: block;
    text-decoration: none;
    color: #222;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: .2s;
}

    .bag:hover {
        background: #f5f5f5;
    }

.selected {
    background: #fff1f1;
    border: 2px solid #c8102e;
    font-weight: bold;
}

.counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.plus-btn,
.minus-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #c8102e;
    background: white;
    color: #c8102e;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
}

.counter span {
    font-size: 24px;
    font-weight: bold;
}

.counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.amount-input {
    width: 70px;
    text-align: center;
    font-size: 20px;
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 5px;
}

.plus-btn,
.minus-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 10px;
    background: #c8102e;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.tips-header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

    .tips-header h1 {
        color: #001d4a;
        font-size: 42px;
    }

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(320px,1fr));
    gap: 25px;
}

.tip-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,.08);
    transition: .2s;
}

    .tip-card:hover {
        transform: translateY(-4px);
    }

.tip-title {
    font-size: 24px;
    font-weight: bold;
    color: #c8102e;
    margin-bottom: 15px;
}

.tips-main-header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

    .tips-main-header h1 {
        font-size: 48px;
        color: #001d4a;
    }

    .tips-main-header p {
        color: #666;
        font-size: 20px;
    }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
    gap: 25px;
}

.category-card {
    background: white;
    border-radius: 18px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,.08);
    transition: .2s;
    cursor: pointer;
}

    .category-card:hover {
        transform: translateY(-5px);
    }

.category-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.category-name {
    font-size: 24px;
    font-weight: bold;
    color: #001d4a;
}

.category-card {
    text-decoration: none;
    color: inherit;
}

.tip-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
    font-size: 20px;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.importance-filter {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 16px;
}

body {
    direction: rtl;
    text-align: right;
}

.tips-list {
    text-align: right;
}

.tip-item {
    text-align: right;
}

.filters {
    justify-content: flex-start;
}

body {
    direction: rtl;
}

.category-card,
.tip-item,
.tips-main-header {
    text-align: right;
}

.tip-card {
    display: block;
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0,0,0,.08);
    transition: .2s;
}

    .tip-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0,0,0,.15);
    }

.tip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.tip-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #001b4a;
}

.importance-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.red {
    background: #d62828;
}

.yellow {
    background: #fcbf49;
}

.green {
    background: #2a9d8f;
}

.tip-readtime {
    color: #666;
    font-size: 15px;
    margin-bottom: 10px;
}

.tip-summary {
    color: #444;
    line-height: 1.6;
    font-size: 17px;
}

.global-search {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 18px;
    margin-bottom: 25px;
}

.check-btn {
    background: #c8102e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

.clear-btn {
    background: white;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

    .check-btn:hover,
    .clear-btn:hover {
        transform: translateY(-1px);
    }

    .clear-btn:hover {
        opacity: 0.9;
    }

.action-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: flex-start;
    gap: 12px;
}

.result-box {
    margin-top: 20px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
    min-height: 80px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 20px;
    margin-top: 30px;
}

.admin-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: black;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(0,0,0,.1);
}

.add-tip-btn {
    display: inline-block;
    background: #c8102e;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 20px;
}

.tips-table {
    width: 100%;
    border-collapse: collapse;
}

    .tips-table th,
    .tips-table td {
        border: 1px solid #ddd;
        padding: 12px;
    }

.form-control {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
}

.save-btn {
    background: #c8102e;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

    .admin-table th,
    .admin-table td {
        border: 1px solid #ddd;
        padding: 12px;
    }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

    .admin-table th,
    .admin-table td {
        border: 1px solid #ddd;
        padding: 12px;
        text-align: right;
    }

    .admin-table th {
        background: #f5f5f5;
    }

.item-image {
    width: 170px;
    height: 170px;
    object-fit: contain;
}

.case-page {
    max-width: 900px;
    margin: auto;
    padding: 30px;
}

    .case-page h1 {
        text-align: center;
        margin-bottom: 30px;
    }

.scene-btn {
    width: 100%;
    padding: 15px;
    border: none;
    background: #0d6efd;
    color: white;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
}

.scene-content {
    display: none;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin-top: 10px;
    white-space: pre-line;
}

.history-box {
    margin-top: 20px;
}

    .history-box textarea {
        width: 100%;
        border-radius: 10px;
        padding: 15px;
        resize: none;
    }

.diagnosis-box {
    margin-top: 20px;
}

    .diagnosis-box input {
        width: 100%;
        padding: 15px;
        border-radius: 10px;
    }

.bottom-buttons {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

.case-button {
    flex: 1;
    padding: 18px;
    border: none;
    border-radius: 12px;
    background: #198754;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.case-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.4);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.case-modal-content {
    width: 1400px;
    max-width: 95vw;
    height: 850px;
    max-height: 95vh;
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    flex-direction: column;
}
.case-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.actions-container {
    display: flex;
    margin-top: 20px;
    height: 430px;
}

.abc-column {
    width: 70px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .abc-column button {
        height: 55px;
        font-size: 22px;
        border: none;
        border-radius: 10px;
        cursor: pointer;
    }

.actions-list {
    flex: 1;
    margin-right: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    overflow: auto;
}

.actions-footer {
    margin-top: 20px;
    text-align: left;
}

.history-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: #0d6efd;
    color: white;
    cursor: pointer;
}

.actions-layout {
    display: flex;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

.letters-column {
    width: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.letter-btn {
    height: 55px;
    border: none;
    border-radius: 10px;
    font-size: 22px;
    cursor: pointer;
}

.actions-panel {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.category-panel {
    display: none;
}

.action-card {
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border: none;
    border-radius: 10px;
    background: #f3f3f3;
    cursor: pointer;
    text-align: right;
}

.last-result {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

#resultBox {
    min-height: 60px;
    background: #f8f8f8;
    border-radius: 10px;
    padding: 15px;
}

.history-panel {

    width: 340px;

    display: flex;

    flex-direction: column;

    height: 100%;

    border-right: 1px solid #ddd;

    padding-right: 15px;

}

.history-panel h4{

    margin-bottom:15px;

    flex-shrink:0;

}

#historyList{

    flex:1;

    overflow-y:auto;

    min-height:0;

    border:1px solid #ddd;

    border-radius:10px;

    background:#fafafa;

    padding:10px;

}

.history-card {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

#historyList {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: #fafafa;
}
.history-panel {
    width: 340px;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid #ddd;
    padding-right: 15px;
}

    .history-panel h4 {
        margin-bottom: 15px;
        flex-shrink: 0;
    }

#historyList {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
    padding: 10px;
}

.questions-chat {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    background: #fafafa;
}

.empty-chat {
    color: gray;
    text-align: center;
    margin-top: 40px;
}

.questions-input {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

    .questions-input input {
        flex: 1;
        padding: 15px;
        border-radius: 10px;
        border: 1px solid #ccc;
        font-size: 16px;
    }

    .questions-input button {
        width: 120px;
        border: none;
        border-radius: 10px;
        background: #198754;
        color: white;
        cursor: pointer;
    }

.suggestions {
    margin-top: 15px;
    min-height: 40px;
}

.suggestion {
    display: inline-block;
    margin: 5px;
    padding: 8px 14px;
    background: #e9ecef;
    border-radius: 20px;
    cursor: pointer;
}

.chat-question {
    background: #d9f5df;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    text-align: right;
}

.chat-answer {
    background: #eef4ff;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    margin-right: 40px;
}

.suggestion:hover {
    background: #198754;
    color: white;
}

.admin-page {
    max-width: 1100px;
    margin: auto;
}

.top-bar {
    margin: 25px 0;
}

.add-btn {
    background: #198754;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
}

    .add-btn:hover {
        color: white;
    }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

    .admin-table th {
        background: #198754;
        color: white;
        padding: 15px;
    }

    .admin-table td {
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

.edit-btn {
    background: #0d6efd;
    color: white;
    padding: 8px 13px;
    border-radius: 8px;
    text-decoration: none;
    margin-left: 10px;
}

.delete-btn {   
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
}

    .edit-btn:hover,
    .delete-btn:hover {
        color: white;
    }

.empty-box {
    padding: 40px;
    background: white;
    border-radius: 10px;
    text-align: center;
}

.case-editor {
    max-width: 900px;
}

.editor-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

    .editor-card label {
        display: block;
        font-weight: bold;
        margin-bottom: 10px;
    }

.editor-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.coming-box {
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 35px;
    text-align: center;
    color: #777;
}

.case-selection-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 35px 20px;
    direction: rtl;
}

    .case-selection-page h1 {
        text-align: center;
        margin-bottom: 10px;
    }

.case-selection-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 35px;
}

.case-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

.case-selection-card {
    display: block;
    background: white;
    padding: 30px 22px;
    border-radius: 16px;
    text-decoration: none;
    color: #222;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    border: 1px solid #eee;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .case-selection-card:hover {
        color: #222;
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
    }

.case-selection-icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.case-selection-card h3 {
    font-weight: 700;
    margin-bottom: 12px;
}

.case-selection-card p {
    color: #666;
    margin: 0;
}

.submit-case-area {
    margin-top: 25px;
    text-align: center;
}

.submit-case-btn {
    padding: 15px 35px;
    border: none;
    border-radius: 12px;
    background: #0d6efd;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.results-modal-content {
    width: 1200px;
    max-width: 95vw;
    height: 850px;
    max-height: 94vh;
}

.results-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 15px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.comparison-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 18px;
    background: #fafafa;
}

.comparison-text {
    white-space: pre-line;
    min-height: 90px;
}

.diagnosis-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    background: #f3f3f3;
    font-weight: bold;
}

.result-section {
    margin: 15px 0;
    padding: 15px;
    border-radius: 12px;
}

.good-result {
    background: #e8f7ee;
}

.missing-result {
    background: #fdecec;
}

.unnecessary-result {
    background: #fff7df;
}

.result-item {
    background: white;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 9px;
    padding: 12px;
    margin-top: 8px;
}

.empty-result {
    color: #777;
    padding: 10px;
}

@media (max-width: 750px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

.login-page {
    min-height: 75vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 15px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    padding: 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .10);
}

/* ensure login card is above any potential overlays on mobile */
.login-card {
    position: relative;
    z-index: 1000;
}

.login-icon {
    text-align: center;
    font-size: 48px;
    margin-bottom: 10px;
}

.login-card h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 28px;
}

.login-submit-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 13px;
    background: #198754;
    color: white;
    font-size: 17px;
    font-weight: 600;

    /* make the submit button more responsive to touch on iOS/Chrome */
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    cursor: pointer;
    position: relative;
    z-index: 2000; /* ensure button sits above other elements */
}

.logout-form {
    display: inline;
    margin: 0;
}

.logged-user {
    margin-left: 12px;
}

.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 35px 20px;
}

.admin-dashboard-header {
    text-align: center;
    margin-bottom: 35px;
}

    .admin-dashboard-header h1 {
        margin-bottom: 10px;
    }

    .admin-dashboard-header p {
        color: #666;
        font-size: 17px;
    }

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 22px;
}

.admin-dashboard-card {
    display: block;
    background: white;
    border: 1px solid #e7e7e7;
    border-radius: 16px;
    padding: 28px 22px;
    color: #222;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .07);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .admin-dashboard-card:hover {
        color: #222;
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
    }

.admin-card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.admin-dashboard-card h3 {
    font-size: 21px;
    margin-bottom: 10px;
}

.admin-dashboard-card p {
    color: #666;
    margin: 0;
}

.admin-card-disabled {
    opacity: .55;
    cursor: not-allowed;
}

.statistics-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 35px 20px;
}

.statistics-header {
    text-align: center;
    margin-bottom: 35px;
}

    .statistics-header h1 {
        font-size: 34px;
        margin-bottom: 8px;
    }

    .statistics-header p {
        color: #666;
        font-size: 17px;
    }

.statistics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-bottom: 35px;
}

.statistics-card {
    background: white;
    border: 1px solid #e7e7e7;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,.07);
}

.statistics-icon {
    font-size: 35px;
    margin-bottom: 8px;
}

.statistics-number {
    font-size: 30px;
    font-weight: bold;
}

.statistics-label {
    color: #666;
    margin-top: 5px;
}

.statistics-table-card {
    background: white;
    border: 1px solid #e7e7e7;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,.07);
}

    .statistics-table-card h2 {
        margin-bottom: 20px;
    }

.statistics-table {
    vertical-align: middle;
}

    .statistics-table th {
        white-space: nowrap;
    }

.statistics-no-data {
    color: #999;
    font-size: 14px;
}

.bag-statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
    margin-top: 25px;
}

.bag-stat-card {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

    .bag-stat-card h4 {
        margin-bottom: 18px;
        font-weight: 700;
    }

.bag-chart-container {
    height: 210px;
    position: relative;
    margin-bottom: 18px;
}

.bag-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -58%);
    font-size: 25px;
    font-weight: bold;
    pointer-events: none;
}

.bag-stat-info {
    text-align: right;
    line-height: 2;
}

.ambulance-admin-image {
    width: 90px;
    height: 70px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: white;
    padding: 5px;
}

.ambulance-no-image {
    width: 90px;
    height: 70px;
    border-radius: 10px;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 13px;
    text-align: center;
}

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0,0,0,.5);
    animation: zoomImage .2s ease;
}

@keyframes zoomImage {

    from {
        transform: scale(.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.tip-details-page {
    max-width: 950px;
    margin: 0 auto;
    padding: 40px 20px 70px;
}

.tip-article {
    background: white;
    border-radius: 22px;
    padding: 42px 48px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    border: 1px solid #ececec;
}

.tip-article-header {
    text-align: right;
}

.tip-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.tip-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.category-badge {
    background: #eaf2ff;
    color: #0d6efd;
}

.importance-badge {
    background: #fff3cd;
    color: #856404;
}

.time-badge {
    background: #e8f7ee;
    color: #198754;
}

.tip-article h1 {
    font-size: 38px;
    line-height: 1.25;
    margin-bottom: 18px;
    font-weight: 800;
}

.tip-summary {
    font-size: 20px;
    line-height: 1.7;
    color: #555;
    background: #f8f9fa;
    border-right: 5px solid #198754;
    border-radius: 12px;
    padding: 18px 20px;
}

.tip-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 32px 0;
}

.tip-content {
    font-size: 19px;
    line-height: 2;
    color: #2d2d2d;
}

    .tip-content p {
        margin-bottom: 22px;
    }

    .tip-content strong {
        font-weight: 800;
        color: #111;
    }

    .tip-content h2 {
        font-size: 27px;
        margin-top: 38px;
        margin-bottom: 16px;
    }

    .tip-content h3 {
        font-size: 23px;
        margin-top: 30px;
        margin-bottom: 14px;
    }

    .tip-content ul,
    .tip-content ol {
        padding-right: 25px;
        margin-bottom: 24px;
    }

    .tip-content li {
        margin-bottom: 10px;
    }

    .tip-content blockquote {
        margin: 28px 0;
        padding: 18px 22px;
        background: #f4f8ff;
        border-right: 5px solid #0d6efd;
        border-radius: 12px;
        color: #333;
    }

.tip-bottom-box {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: #fff8e1;
    border: 1px solid #f0df9b;
    border-radius: 16px;
    padding: 20px;
    font-size: 17px;
}

    .tip-bottom-box > div:first-child {
        font-size: 30px;
    }

    .tip-bottom-box p {
        margin: 5px 0 0;
        color: #555;
    }

.tip-back-area {
    margin-top: 30px;
}

@media (max-width: 700px) {

    .tip-article {
        padding: 28px 20px;
    }

        .tip-article h1 {
            font-size: 30px;
        }

    .tip-summary {
        font-size: 18px;
    }

    .tip-content {
        font-size: 17px;
    }
}

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@400;500;600;700;800&display=swap');

.tip-details-page,
.tip-details-page * {
    font-family: 'Assistant', sans-serif;
}

    .tip-details-page,
    .tip-details-page * {
        font-family: 'Assistant', sans-serif !important;
    }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.container,
.page-container,
.case-page,
.admin-page,
.statistics-page,
.tip-details-page {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {

    body {
        font-size: 16px;
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 22px;
    }

    .page-container {
        display: block;
        padding: 10px;
    }

    .bags-sidebar {
        width: 100%;
        margin-bottom: 15px;
    }

    .content-area {
        width: 100%;
    }

    .training-grid {
        grid-template-columns: 1fr;
    }

    .case-page {
        padding: 10px;
    }

    .bottom-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .case-button {
        width: 100%;
    }

    .case-modal-content {
        width: 95vw;
        height: 90vh;
        padding: 15px;
    }

    .actions-layout {
        flex-direction: column;
    }

    .letters-column {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .letter-btn {
        width: 55px;
    }

    .actions-panel {
        width: 100%;
    }

    .history-panel {
        width: 100%;
        height: 220px;
    }

    .statistics-cards {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .tip-article {
        padding: 22px 16px;
    }

        .tip-article h1 {
            font-size: 28px;
        }

    .tip-content {
        font-size: 17px;
        line-height: 1.8;
    }
}

@media (max-width: 576px) {

    .case-modal {
        align-items: flex-start;
        padding-top: 10px;
    }

    .case-modal-content {
        width: 98vw;
        max-width: 98vw;
        height: 95vh;
        max-height: 95vh;
        border-radius: 10px;
    }

    .questions-input {
        flex-direction: column;
    }

        .questions-input input,
        .questions-input button {
            width: 100%;
        }
}

/* �� ������ */
@media (max-width: 768px) {

    .mobile-menu-btn {
        display: block;
    }

    .navbar-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 12px;
    }

        .navbar-links.open {
            display: flex;
        }

    .navbar-inner {
        flex-wrap: wrap;
    }

    .navbar-links a,
    .navbar-links form,
    .navbar-links span {
        width: 100%;
    }
}

.mobile-menu-btn {
    display: none;
}

.mobile-menu-content {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-between;
    z-index: 5;
}

/* ����� */
@media (max-width: 768px) {

    .custom-navbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-menu-btn {
        display: block;
        border: none;
        background: transparent;
        font-size: 30px;
        cursor: pointer;
    }

    .mobile-menu-content {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-top: 15px;
    }

        .mobile-menu-content.open {
            display: flex;
        }

    .navbar-center {
        display: flex;
        flex-direction: column;
        width: 100%;

    }

        .navbar-center a {
            width: 100%;
            padding: 12px 10px;

        }

    .navbar-left {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
        margin-top: 10px;
    }

        .navbar-left .admin-btn {
            width: 100%;
        }

    .logout-form {
        width: 100%;
    }

        .logout-form button {
            width: 100%;
        }
}

.bp-simulator {
    width: min(760px, 95vw);
    max-height: 95vh;
    overflow-y: auto;
    background: #f7f7f7;
    border: 4px solid #111;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.bp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

    .bp-header h3 {
        margin: 0;
        font-weight: 800;
    }

.bp-close {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}


/* ========================= */
/* �� */
/* ========================= */
.bp-gauge {
    position: relative;
    width: 360px;
    height: 360px;
    margin: 0 auto 25px;
    border: 8px solid #1b1b1b;
    border-radius: 50%;
    background: white;
    box-shadow: inset 0 0 25px rgba(0,0,0,.08), 0 7px 25px rgba(0,0,0,.15);
}


/* �� ���� ������ */

#bpGaugeTicks {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}


/* ���� */

.bp-tick {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 12px;
    background: #222;
    transform-origin: 50% 0;
    z-index: 2;
}


/* ���� ����� */

.bp-tick-major {
    width: 3px;
    height: 20px;
    background: #000;
}


/* ���� */

.bp-dynamic-label {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 800;
    z-index: 3;
}


/* ����� */

.bp-needle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 145px;
    height: 4px;
    background: #d00000;
    border-radius: 10px;
    transform-origin: left center;
    transform: rotate(-225deg);
    z-index: 5;
    transition: transform .08s linear;
}


/* ���� ����� */

.bp-center-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    background: #111;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
}


/* mmHg */

.bp-unit {
    position: absolute;
    left: 50%;
    top: 67%;
    transform: translateX(-50%);
    font-size: 15px;
    font-weight: 700;
    color: #666;
}

.site-footer {
    margin-top: 60px;
    padding: 25px 15px;
    text-align: center;
    border-top: 1px solid #ddd;
    font-family: "Assistant", sans-serif;
    color: #555;
}

    .site-footer p {
        margin: 4px 0;
    }

.copyright-note {
    font-size: 14px;
    color: #777;
}

/* ========================================
   Copyright Page
======================================== */

.copyright-page {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    font-family: "Assistant", sans-serif;
}

.copyright-header {
    text-align: center;
    margin-bottom: 35px;
}

.copyright-icon {
    width: 75px;
    height: 75px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #d32f2f;
    color: white;
    font-size: 42px;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(0,0,0,.15);
}

.copyright-header h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 5px;
}

.copyright-header p {
    color: #777;
    font-size: 18px;
}


.copyright-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 3px 14px rgba(0,0,0,.07);
    border: 1px solid #eee;
}

    .copyright-section h2 {
        font-size: 22px;
        font-weight: 800;
        margin-bottom: 15px;
        color: #222;
    }

    .copyright-section p {
        font-size: 17px;
        line-height: 1.8;
        color: #444;
        margin-bottom: 12px;
    }

.copyright-disclaimer {
    border-right: 5px solid #d32f2f;
}

.copyright-bottom {
    margin-top: 35px;
    padding: 25px;
    text-align: center;
    border-radius: 15px;
    background: #f5f5f5;
}

    .copyright-bottom strong {
        display: block;
        font-size: 19px;
        margin-bottom: 5px;
    }

    .copyright-bottom span {
        color: #666;
    }


/* ����� */

@media (max-width: 768px) {

    .copyright-page {
        margin: 20px auto;
        padding: 12px;
    }

    .copyright-header h1 {
        font-size: 27px;
    }

    .copyright-section {
        padding: 18px;
    }

        .copyright-section h2 {
            font-size: 20px;
        }

        .copyright-section p {
            font-size: 16px;
        }
}

/* ========================================
   Main Footer
======================================== */

.main-footer {
    margin-top: 60px;
    padding: 25px 15px;
    background: #f7f7f7;
    border-top: 1px solid #ddd;
    text-align: center;
    font-family: "Assistant", sans-serif;
}

.main-footer-content {
    max-width: 1100px;
    margin: auto;
}

.main-footer-links {
    margin-top: 7px;
}

    .main-footer-links a {
        color: #c62828;
        text-decoration: none;
        font-weight: 700;
    }

        .main-footer-links a:hover {
            text-decoration: underline;
        }

.main-footer-disclaimer {
    margin-top: 8px;
    font-size: 13px;
    color: #888;
}
/* ������ ������� */




/* ========================= */
/* ��� ����� */
/* ========================= */

.bp-pressure-display {
    text-align: center;
    font-size: 21px;
    margin-bottom: 25px;
}

    .bp-pressure-display strong {
        font-size: 30px;
    }


/* ========================= */
/* ����� + ����� */
/* ========================= */

.bp-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.bp-control-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.bp-pump {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid #222;
    background: #333;
    color: white;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 7px 0 #111;
    transition: transform .08s, box-shadow .08s;
}

    .bp-pump:active {
        transform: translateY(6px);
        box-shadow: 0 1px 0 #111;
    }

.bp-valve {
    width: 100%;
}

.bp-valve-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
}

.bp-help {
    margin-top: 12px;
    color: #777;
    font-size: 14px;
}


/* ========================= */
/* ���� ����� */
/* ========================= */

.bp-user-result {
    background: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.bp-result-inputs {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
}

    .bp-result-inputs > div:not(.bp-slash) {
        width: 140px;
    }

.bp-slash {
    font-size: 40px;
    font-weight: 700;
    padding-bottom: 3px;
}


/* ========================= */
/* ������ */
/* ========================= */

@media (max-width: 600px) {

    .bp-simulator {
        padding: 15px;
    }

    .bp-gauge {
        width: 280px;
        height: 280px;
    }

    .bp-needle {
        width: 110px;
    }

    .bp-controls {
        grid-template-columns: 1fr;
    }

    .bp-result-inputs > div:not(.bp-slash) {
        width: 110px;
    }
}

.bp-tick {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 11px;
    background: #222;
    transform-origin: 50% 170px;
    z-index: 2;
}

.bp-tick-major {
    width: 3px;
    height: 18px;
    background: #000;
}

.bp-dynamic-label {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 15px;
    font-weight: 800;
    z-index: 3;
    pointer-events: none;
}

.bp-release-status {
    margin-top: 12px;
    font-weight: 700;
    min-height: 25px;
}
/* training cards */
.training-section {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 15px;
}

.training-section-title {
    text-align: right;
    color: #001d4a;
    font-size: 26px;
    margin-bottom: 20px;
}

.training-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.training-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transition: transform .16s ease, box-shadow .16s ease;
}

.training-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.training-emoji {
    font-size: 46px;
    margin-bottom: 8px;
}

.training-card-title {
    color: #c8102e;
    font-size: 22px;
    margin: 0 0 8px 0;
}

.training-card-desc {
    color: #555;
    font-size: 15px;
    margin-bottom: 14px;
    text-align: right;
}

.training-card-btn {
    background: #001d4a;
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .training-emoji {
        font-size: 40px;
    }

    .training-card-btn {
        padding: 12px 18px;
    }