/* Blurred SVG overlay for hero background */
/* Hero background for index page */
.hero-background {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-background {
        background-size: cover;
        background-position: center center;
        min-width: 100vw;
        min-height: 100vh;
    }
}
@media (max-width: 480px) {
    .hero-background {
        background-size: cover;
        background-position: center center;
        min-width: 100vw;
        min-height: 100vh;
    }
}
body .container, body main, body footer, body nav {
    position: relative;
    z-index: 2;
}
/* Uniform topbar title style for all pages */
.topbar-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: white;
}

/* Logo next to title in topbar - responsive */
.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.topbar-brand img.logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

@media (max-width: 600px) {
    .topbar-brand img.logo {
        width: 28px;
        height: 28px;
    }
    .topbar-title {
        font-size: 1.125rem;
    }
}
/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.topbar {
    margin-bottom: 2rem;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    /* Prevent all overflow and scrollbars */
}

/* Ensure root elements take full height so child fixed elements align with viewport */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: none;
}

/* Robust hero image that fills viewport without gaps */
/* hero background removed to display only the lookup card and topbar */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Normalize topbar navigation spacing across pages */
.topbar .main-nav {
  margin-left: 2rem; /* consistent left offset */
}

.topbar .main-nav a {
  margin-right: 1.5rem; /* consistent spacing between links */
}

.topbar .main-nav a:last-child {
  margin-right: 0;
}

/* Main Content */
main {
    flex: 1;
    background: transparent;
    border-radius: 8px;
    box-shadow: none;
    padding: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Buttons */
.btn,
button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover,
button:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-danger {
    background: #e74c3c;
}

.btn-warning {
    background: #f39c12;
}

.btn-success {
    background: #27ae60;
}

/* Lookup Section */
.lookup-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.lookup-section h1 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
}

.lookup-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
}

.lookup-section p {
    margin-bottom: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.lookup-form {
    margin-bottom: 2rem;
}

.lookup-form .form-group {
    text-align: left;
}

/* Case Result and Details - Clean Modern Design */
/* Defensive/fallback styles so cards display even if theme CSS is not applied */
.case-result,
.case-details {
    border-radius: 12px;
    margin-top: 2rem;
    overflow: hidden;
    display: block;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Ensure generic .card and .case-card also have visible defaults */
.card,
.case-card {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: block;
    position: relative;
    z-index: 2;
}

/* Case Header */
.case-header {
    background: #2c3e50;
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.case-header h2,
.case-header h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.case-status {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Case Content */
.case-content {
    padding: 2rem;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Simplified Case Info - Single Column List */
.case-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.case-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

.case-info-item:last-child {
    border-bottom: none;
}

.case-info-item:hover {
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 6px;
}

.case-info-item strong {
    color: #475569;
    font-weight: 500;
    min-width: 140px;
}

.case-info-item span:not(.status-badge) {
    color: #1e293b;
    font-weight: 400;
}

/* Case Description Section */
.case-description {
    margin-top: 1.5rem;
}

.case-description h3,
.case-description h4 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.case-description p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

/* Case Actions */
.case-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 3rem 2rem;
}

.error-section h2 {
    color: #dc2626;
    margin-bottom: 1rem;
}

.error-section .error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 500;
}

/* Status badges - Modern Design */
.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.status-open {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.status-in_progress {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.status-resolved {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-closed {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.priority-low {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
}

.priority-medium {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.priority-high {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
}

.priority-urgent {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    50% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.success-message {
    background: #27ae60;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    margin-top: 2rem;
}

/* Transactions table and form styles */
.btc-widget {
    border: 1px solid #e6e9ee;
    padding: 12px;
    margin-top: 16px;
    border-radius: 8px;
    background: linear-gradient(180deg,#ffffff,#fbfdff);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btc-widget #btcPrice {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 6px;
    color: #0f172a;
}

.btc-widget #btcPriceTime {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

.btc-widget #btcAmount {
    width: 220px;
    max-width: 50%;
    padding: 8px;
    border: 1px solid #dde6f0;
    border-radius: 6px;
}

.btc-widget #btcResult {
    min-width: 170px;
    text-align: right;
    font-weight: 700;
    color: #0f172a;
}

.btc-widget button#btcRefresh {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* Structured BTC widget layout used by JS */
.btc-widget .btc-top { display:flex; justify-content:space-between; align-items:center; }
.btc-widget .btc-left { display:flex; flex-direction:column; }
.btc-widget .btc-right { text-align:right; }
.btc-widget .btc-row { margin-top:12px; display:flex; gap:8px; align-items:center; }
.btc-widget .btc-amount-label { font-weight:600; min-width:90px; }
.btc-widget .btc-amount-input { padding:8px; border:1px solid #dde6f0; border-radius:6px; width:220px; max-width:40%; }
.btc-widget .btc-result { min-width:170px; text-align:right; font-weight:700; }

/* Make input flexible and prevent btc-result overflow */
@media (max-width: 820px) {
    .btc-widget .btc-amount-input { max-width:180px; width:40%; }
    .btc-widget .btc-result { min-width: 140px; }
}

@media (max-width: 600px) {
    .btc-widget { padding:10px; }
    .btc-widget .btc-top { flex-direction:row; gap:8px; }
    .btc-widget .btc-row { flex-direction:column; align-items:stretch; }
    .btc-widget .btc-amount-input { width:100%; max-width:100%; }
    .btc-widget .btc-amount-label { min-width:unset; }
    /* allow result to wrap and keep inside the card */
    .btc-widget .btc-result { text-align:left; white-space:normal; word-break:break-word; }
}

.tx-wrapper {
    margin-top: 1rem;
    /* allow horizontal scroll on small screens rather than collapsing the table */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tx-wrapper h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.tx-table thead th {
    text-align: left;
    padding: 10px 12px;
    background: #f1f5f9;
    font-size: 0.9rem;
    color: #475569;
    border-bottom: 1px solid #e6eef6;
}

.tx-table tbody td {
    padding: 10px 12px;
    border-top: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #0f172a;
}

.tx-table tbody tr:hover {
    background: #fbfdff;
}

.tx-empty {
    color: #64748b;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
}

.tx-form {
    border: 1px solid #eef2f7;
    padding: 12px;
    border-radius: 6px;
    background: #ffffff;
}

.tx-form .form-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tx-form input,
.tx-form select {
    padding: 8px;
    border: 1px solid #dde6f0;
    border-radius: 6px;
}

.tx-form button {
    padding: 8px 12px;
    border-radius: 6px;
}

/* Responsive tweaks for BTC widget and transactions */
@media (max-width: 820px) {
    .btc-widget { gap: 10px; }
    .btc-widget #btcAmount { max-width: 180px; }
    .tx-table { min-width: 640px; }
    .tx-table thead th, .tx-table tbody td { padding: 8px 10px; font-size: 0.9rem; }
}

@media (max-width: 600px) {
    .btc-widget {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .btc-widget .btc-left,
    .btc-widget .btc-right { width: 100%; }
    .btc-widget #btcAmount { width: 100%; max-width: 100%; }
    .btc-widget #btcResult { text-align: left; margin-top: 6px; }
    .btc-widget button#btcRefresh { width: auto; }

    /* allow the tx table to scroll horizontally on small phones */
    .tx-table { min-width: 520px; }
    .tx-empty { padding: 10px; }
}

/* Card-based transaction list for small screens */
.tx-cards { display: none; }

@media (max-width: 600px) {
    .tx-table { display: none; }
    .tx-cards { display: block; }
    .tx-card {
        background: white;
        border: 1px solid #eef2f7;
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 10px;
        box-shadow: 0 2px 6px rgba(15,23,42,0.04);
    }
    .tx-card .tx-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
    .tx-card .tx-row:last-child { border-bottom: none; }
    .tx-card .tx-label { color:#475569; font-weight:600; margin-right:8px; }
    .tx-card .tx-value { color:#0f172a; text-align:right; }
}

/* Floating Contact Button */
.floating-contact-btn {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 2000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 0.75rem 1.5rem; /* match about.css */
  font-size: 1rem;
  border-radius: 50px; /* match about.css */
  text-decoration: none;
  transition: transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* match about.css */
  line-height: 1;
}

.floating-contact-btn.btn-primary {
  background-color: var(--accent-yellow);
  color: var(--primary-blue);
}

.floating-contact-btn.btn-primary:hover {
  background-color: #FFD000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Responsive Design */
/* Small tablets and large phones */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    header .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    main {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .case-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .case-header h2,
    .case-header h3 {
        font-size: 1.5rem;
    }

    .case-content {
        padding: 1.5rem;
    }

    .case-info {
        padding: 1rem;
    }

    .case-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem 0;
    }

    .case-info-item strong {
        min-width: auto;
        color: #667eea;
        font-weight: 600;
    }

    .case-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .case-actions .btn {
        width: 100%;
        text-align: center;
    }

    .status-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .lookup-section h1 {
        font-size: 2rem;
    }

    .lookup-section h2 {
        font-size: 1.5rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    main {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .case-header {
        padding: 1rem;
    }

    .case-content {
        padding: 1rem;
    }

    .case-info {
        padding: 0.75rem;
    }

    .case-info-item {
        padding: 0.75rem 0;
    }

    .lookup-section h1 {
        font-size: 1.75rem;
    }

    .lookup-section h2 {
        font-size: 1.25rem;
    }

    .lookup-section p {
        font-size: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
        margin: 1rem;
    }
}

/* Mobile topbar hamburger menu (phone only) */
/* hidden on larger screens */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1300;
}

.hamburger .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    margin: 4px 0;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    z-index: 1250;
}

.mobile-menu a {
    display: block;
    padding: 1rem 1.25rem;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mobile-menu a:last-child { border-bottom: none; }

/* show hamburger and hide main-nav on small phones */
@media (max-width: 768px) {
    .hamburger { display: inline-block; }
    .topbar .main-nav { display: none; }
    /* when menu is open, prevent body scrolling */
    body.menu-open { overflow: hidden; }
}

/* when active, show the mobile menu */
.mobile-menu.open { display: block; }

/* Large tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 2rem;
    }

    .case-header {
        padding: 2rem 1.5rem;
    }

    .case-content {
        padding: 1.5rem;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .case-header {
        padding: 2.5rem;
    }

    .case-content {
        padding: 2.5rem;
    }

    .lookup-section {
        max-width: 700px;
    }
}

/* Login and Change Password Styles */
.login-section,
.change-password-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 2rem 0;
}

.login-form-container,
.change-password-form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form-container h2,
.change-password-form-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.first-login-message {
    background: #e8f5e8;
    color: #2d5a2d;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid #b8d8b8;
}

.login-form .form-group,
.change-password-form .form-group {
    margin-bottom: 1rem;
}

.login-form label,
.change-password-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.login-form input,
.change-password-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus,
.change-password-form input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.login-form button,
.change-password-form button {
    width: 100%;
    padding: 0.75rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.login-form button:hover,
.change-password-form button:hover {
    background: #2980b9;
}

.login-form button:disabled,
.change-password-form button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Strong override scoped to index page: ensure index uses the provided background image even if other stylesheets set a gradient */
body.index-page {
    background-image: url('../assets/backgroundnew-index.jpg') !important;
    background-color: transparent !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}