﻿*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── SIDEBAR ── */
.sidebar {
    width: 340px;
    min-height: 100vh;
    background: #19616c;
    border-top-right-radius: 60px;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 28px 24px 32px;
    z-index: 100;
}

    .sidebar::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(23, 162, 184, 0.72);
        border-top-right-radius: 60px;
        z-index: 0;
    }

    .sidebar > * {
        position: relative;
        z-index: 1;
    }

.sidebar-img {
    height: 100%;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 5px;
    margin-top: 5px;
    flex-shrink: 0;
}

    .sidebar-img img {
        height: 100%;
        width: 90%;
        object-fit: cover;
        display: block;
        border-radius: 12px;
    }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

    .sidebar-brand img {
        width: 52px;
        height: 67px;
        object-fit: contain;
    }

.brand-text .brand-name {
    margin-top: 16px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.brand-text .brand-sub {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    /* display: flex; */
    align-items: center;
    gap: 10px;
}

    .sidebar-footer img {
        width: 80px;
        /* height: 0px; */
        object-fit: contain;
        flex-shrink: 0;
        /* filter: brightness(0) invert(1); */
        opacity: 0.85;
    }

    .sidebar-footer div {
        font-family: "Roboto", sans-serif;
        font-size: 12px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.85);
        line-height: 1.4;
        letter-spacing: 0.01em;
    }

.lodge-text {
    font-size: 14px;
    font-weight: 500;
    color: #17a2b8;
    padding: 6px 12px;
    white-space: nowrap;
}

.topbar-row1,
.topbar-row2 {
    display: contents;
}

/* ── TOPBAR ── */
.topbar {
    margin-left: 340px;
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
    padding: 0 40px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .topbar-links a {
        font-size: 14px;
        font-weight: 500;
        color: #17a2b8;
        text-decoration: none;
        padding: 6px 12px;
        border-radius: 6px;
        transition: background 0.15s;
    }

        .topbar-links a:hover {
            background: #e8f7fa;
        }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, box-shadow 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: #17a2b8;
    color: #fff;
}

    .btn-primary:hover {
        opacity: 0.88;
        box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
    }

.btn-check-status {
    background: transparent;
    border: 1.5px solid #17a2b8;
    color: #17a2b8;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

a.btn.btn-check-status:hover {
    background: #17a2b8 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
    opacity: 1;
}

/* language toggle group */
.lang-group {
    display: flex;
    align-items: center;
    border: 1px solid #17a2b8;
    border-radius: 8px;
    overflow: hidden;
}

    .lang-group a {
        padding: 7px 14px;
        font-family: "Roboto", sans-serif;
        font-size: 13px;
        font-weight: 500;
        color: #17a2b8;
        text-decoration: none;
        background: transparent;
        border-right: 1px solid #17a2b8;
        transition: background 0.15s, color 0.15s;
        white-space: nowrap;
        line-height: 1.4;
    }

        .lang-group a:last-child {
            border-right: none;
        }

        .lang-group a:hover {
            background: #e8f7fa;
        }

        .lang-group a.active {
            background: #17a2b8;
            color: #fff;
        }

@media (max-width: 480px) {
    .lang-group a {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ── MAIN ── */
.main {
    margin-left: 340px;
    padding: 36px 40px 60px;
    flex: 1;
}

.page-title {
    font-family: "Roboto", sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 28px;
}

/* ── FORM GRID ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 48px;
}

.form-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.field-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

    .field-group label {
        font-size: 13px;
        font-weight: 500;
        color: #333;
        margin-bottom: 6px;
    }

    .field-group input,
    .field-group select,
    .field-group textarea {
        width: 100%;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.25);
        background: transparent;
        font-family: "Inter", sans-serif;
        font-size: 14px;
        color: #1a1a2e;
        padding: 6px 2px;
        outline: none;
        transition: border-color 0.2s;
    }

        .field-group input:focus,
        .field-group select:focus,
        .field-group textarea:focus {
            border-bottom-color: #17a2b8;
        }

        .field-group input::placeholder,
        .field-group textarea::placeholder {
            color: #aaa;
        }

    .field-group select {
        cursor: pointer;
    }

    /* Complaint textarea */
    .field-group textarea {
        resize: vertical;
        min-height: 120px;
        border: 1px solid rgba(0, 0, 0, 0.25);
        background: rgba(217, 217, 217, 0.1);
        padding: 10px;
        border-radius: 2px;
    }

        .field-group textarea:focus {
            border-color: #17a2b8;
        }

/* Attachment */
.attachment-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .attachment-row input[type="file"] {
        display: none;
    }

.file-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f7fa;
    border: 1px solid #b2e4ed;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    color: #1a1a2e;
}

    .file-chip span.file-size {
        color: #888;
        margin-left: 2px;
    }

    .file-chip button {
        margin-left: auto;
        background: none;
        border: none;
        cursor: pointer;
        color: #999;
        font-size: 15px;
        line-height: 1;
        padding: 0 2px;
        transition: color 0.15s;
    }

        .file-chip button:hover {
            color: #e53935;
        }

/* Captcha section */
.captcha-section {
    margin-bottom: 24px;
}

    .captcha-section label {
        font-size: 13px;
        font-weight: 500;
        color: #333;
        display: block;
        margin-bottom: 8px;
    }

.captcha-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#captcha-canvas {
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    display: block;
    cursor: default;
    user-select: none;
}

.captcha-refresh {
    background: none;
    border: 1px solid #17a2b8;
    color: #17a2b8;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

    .captcha-refresh:hover {
        background: #e8f7fa;
    }

.captcha-row input {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    background: transparent;
    font-size: 14px;
    padding: 6px 2px;
    outline: none;
    width: 130px;
    font-family: "Inter", sans-serif;
}

    .captcha-row input:focus {
        border-bottom-color: #17a2b8;
    }

.captcha-error {
    font-size: 12px;
    color: #e53935;
    margin-top: 4px;
    display: none;
}

/* Declaration */
.declaration {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

    .declaration input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: #17a2b8;
        flex-shrink: 0;
        margin-top: 2px;
        cursor: pointer;
    }

    .declaration p {
        font-size: 13px;
        color: #444;
        line-height: 1.6;
    }

/* Submit row */
.submit-row {
    grid-column: 1 / -1;
}

.btn-submit-full {
    width: 100%;
    padding: 13px;
    background: #17a2b8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s, box-shadow 0.15s;
}

    .btn-submit-full:hover {
        opacity: 0.88;
        box-shadow: 0 4px 14px rgba(23, 162, 184, 0.35);
    }

/* ── HAMBURGER ── */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}

    .hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #17a2b8;
        border-radius: 2px;
        transition: all 0.25s;
    }

/* sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99;
}

    .sidebar-overlay.open {
        display: block;
    }

/* ── MOBILE-ONLY SECTIONS (hidden on desktop) ── */
.mob-banner,
.mob-brand-row,
.mob-lodge-row,
.mob-footer {
    display: none;
}

/* ── TABLET (≤1024px) ── */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }

    .topbar,
    .main {
        margin-left: 260px;
    }

    .topbar {
        padding: 0 24px;
    }

    .main {
        padding: 28px 24px 60px;
    }
}

/* ── MOBILE (≤768px) ── */
@media (max-width: 768px) {

    /* hide desktop sidebar, topbar, overlay */
    .sidebar,
    .sidebar-overlay,
    .topbar {
        display: none !important;
    }

    .main {
        margin-left: 0;
        padding: 16px 16px 40px;
    }

    /* banner */
    .mob-banner {
        display: block;
        width: 100%;
        background: #17a2b8;
        padding: 16px 16px 0;
    }

        .mob-banner img {
            width: 100%;
            height: auto;
            display: block;
            max-height: 160px;
            object-fit: cover;
        }

    /* brand + lang row */
    .mob-brand-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #17a2b8;
        padding: 14px 16px 18px;
        gap: 12px;
    }

    .mob-brand-name {
        font-family: "Roboto", sans-serif;
        font-size: 20px;
        font-weight: 700;
        color: #fff;
        line-height: 1.2;
    }

    .mob-brand-sub {
        font-size: 12px;
        font-weight: 600;
        color: rgba(255,255,255,0.85);
        margin-top: 2px;
    }

    .mob-brand-row .lang-group {
        border-color: rgba(255,255,255,0.6);
        flex-shrink: 0;
    }

        .mob-brand-row .lang-group a {
            color: #fff;
            border-right-color: rgba(255,255,255,0.4);
            padding: 6px 10px;
            font-size: 12px;
        }

            .mob-brand-row .lang-group a:hover {
                background: rgba(255,255,255,0.15);
            }

            .mob-brand-row .lang-group a.active {
                background: rgba(255,255,255,0.25);
                color: #fff;
            }

    /* lodge row */
    .mob-lodge-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: #fff;
        border-bottom: 1px solid #e8ecf0;
        gap: 10px;
    }

        .mob-lodge-row .lodge-text {
            font-size: 13px;
            padding: 0;
            white-space: normal;
        }

    /* form */
    .form-grid {
        display: flex;
        flex-direction: column;
    }

    .form-col {
        display: contents;
    }

    .declaration, .submit-row {
        grid-column: 1;
    }

    .page-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .attachment-row {
        flex-wrap: wrap;
    }

    /* mobile field order */
    #fg-police-station {
        order: 1;
    }

    #fg-category {
        order: 2;
    }

    #fg-complaint {
        order: 3;
    }

    #fg-location {
        order: 4;
    }

    #fg-datetime {
        order: 5;
    }

    #fg-attachment {
        order: 6;
    }

    #fg-nic {
        order: 7;
    }

    #fg-name {
        order: 8;
    }

    #fg-phone {
        order: 9;
    }

    #fg-email {
        order: 10;
    }

    #fg-address {
        order: 11;
    }

    #fg-captcha {
        order: 12;
    }

    .declaration {
        order: 13;
    }

    .submit-row {
        order: 14;
    }

    /* mobile footer */
    .mob-footer {
        display: block;
        margin-top: 40px;
    }

    .mob-footer-img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        display: block;
    }

    .mob-footer-powered {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #17a2b8;
        padding: 16px;
    }

        .mob-footer-powered img {
            width: 40px;
            height: 40px;
            object-fit: contain;
            opacity: 0.9;
        }

        .mob-footer-powered span {
            font-family: "Roboto", sans-serif;
            font-size: 13px;
            font-weight: 700;
            color: #fff;
        }
}

/* ── SMALL MOBILE (≤480px) ── */
@media (max-width: 480px) {

    .topbar-actions {
        gap: 6px;
    }

    .btn {
        padding: 7px 12px;
        font-size: 13px;
    }

    .attachment-row {
        flex-wrap: wrap;
    }

    .captcha-row {
        flex-wrap: wrap;
    }

    #captcha-canvas {
        width: 100%;
        max-width: 200px;
    }
}
.bootstrap-select .dropdown-toggle {
    background-color: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
    font-size: 1rem;
    line-height: 1.5 !important;
    height: calc(2.25rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.25rem;
    display: flex;
    justify-content: space-between; /* text left, arrow right */
    align-items: center; /* vertical centering */
    text-align: left;
}

    /* keep the caret visible */
    .bootstrap-select .dropdown-toggle::after {
        margin-left: auto;
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-left: 0.3em solid transparent;
    }

.squre-input-validate {
    width: 50px;
    height: 50px;
    margin: 8px;
    text-align: center;
    font-size: 20px;
}