/*
   Work Permit UI - Luno-inspired visual layer
   One custom stylesheet for Admin + User MVC Areas.
   Built on top of the project's existing Bootstrap bundle.
*/

:root {
    --wp-bg: #f5f7fb;
    --wp-surface: #ffffff;
    --wp-surface-soft: #f8fafc;
    --wp-text: #202536;
    --wp-muted: #7b8498;
    --wp-border: #e7ebf2;
    --wp-border-strong: #dbe1eb;
    --wp-primary: #18a999;
    --wp-primary-dark: #118779;
    --wp-primary-soft: #e8f8f5;
    --wp-info: #3b82f6;
    --wp-success: #22a06b;
    --wp-danger: #dc4c64;
    --wp-warning: #d89521;
    --wp-dark: #252a35;
    --wp-sidebar-width: 258px;
    --wp-radius-sm: 9px;
    --wp-radius: 14px;
    --wp-radius-lg: 20px;
    --wp-shadow-sm: 0 2px 8px rgba(32, 37, 54, 0.04);
    --wp-shadow: 0 10px 30px rgba(32, 37, 54, 0.07);
    --wp-transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--wp-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--wp-bg);
    color: var(--wp-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: "Open Sans", sans-serif;
}

a {
    color: var(--wp-primary-dark);
    text-decoration: none;
}

    a:hover {
        color: var(--wp-primary);
    }

::selection {
    background: rgba(24, 169, 153, 0.18);
}

/* ---------------------------------------------------------
   Application shell
   --------------------------------------------------------- */
.app-shell {
    min-height: 100vh;
    display: flex;
    background: var(--wp-bg);
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--wp-sidebar-width);
    min-height: 100vh;
    padding: 18px 14px;
    background: var(--wp-surface);
    border-right: 1px solid var(--wp-border);
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: transform var(--wp-transition), box-shadow var(--wp-transition);
}

.sidebar-brand {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 10px 16px;
    color: var(--wp-dark);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--wp-border);
}

    .sidebar-brand:hover {
        color: var(--wp-dark);
    }

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #24c8b6, var(--wp-primary-dark));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 7px 18px rgba(24, 169, 153, 0.24);
}

.sidebar-user {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 18px 6px 20px;
    padding: 14px 14px 14px 46px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    background: linear-gradient(135deg, #fbfcfe, #f5faf9);
    box-shadow: var(--wp-shadow-sm);
}

    .sidebar-user::before {
        content: "";
        position: absolute;
        left: 13px;
        top: 50%;
        width: 24px;
        height: 24px;
        transform: translateY(-50%);
        border-radius: 50%;
        background: radial-gradient(circle at 50% 34%, var(--wp-primary) 0 4px, transparent 4.5px), radial-gradient(ellipse at 50% 93%, var(--wp-primary) 0 8px, transparent 8.5px), var(--wp-primary-soft);
    }

    .sidebar-user strong {
        max-width: 170px;
        overflow: hidden;
        color: var(--wp-text);
        font-size: 13px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar-user span {
        color: var(--wp-muted);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-label {
    margin: 6px 12px 7px;
    color: #a1a8b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 11px;
    color: #5b6477;
    font-size: 13px;
    font-weight: 650;
    transition: color var(--wp-transition), background var(--wp-transition), transform var(--wp-transition);
}

    .sidebar-link:hover {
        color: var(--wp-text);
        background: #f5f7fa;
        transform: translateX(2px);
    }

    .sidebar-link.active {
        color: var(--wp-primary-dark);
        background: var(--wp-primary-soft);
    }

        .sidebar-link.active::after {
            content: "";
            position: absolute;
            inset: 9px auto 9px -14px;
            width: 3px;
            border-radius: 0 4px 4px 0;
            background: var(--wp-primary);
        }

.menu-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border: 2px solid #aeb6c6;
    border-radius: 50%;
    transition: all var(--wp-transition);
}

.sidebar-link:hover .menu-dot {
    border-color: var(--wp-primary);
}

.sidebar-link.active .menu-dot {
    border-color: var(--wp-primary);
    background: var(--wp-primary);
    box-shadow: 0 0 0 4px rgba(24, 169, 153, 0.12);
}

.app-main {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--wp-sidebar-width);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 14px 24px 0;
    background: linear-gradient(180deg, rgba(245, 247, 251, 0.98) 0%, rgba(245, 247, 251, 0.92) 72%, rgba(245, 247, 251, 0) 100%);
    backdrop-filter: blur(10px);
}

.topbar-card {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    box-shadow: var(--wp-shadow-sm);
}

.topbar-title {
    color: var(--wp-text);
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.mobile-menu {
    width: 38px;
    height: 38px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--wp-border);
    border-radius: 10px;
    background: var(--wp-surface);
    color: var(--wp-text);
    font-size: 19px;
    line-height: 1;
}

.profile-menu > .btn {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--wp-border) !important;
    border-radius: 10px;
    background: #f8fafc !important;
    color: #414a5c !important;
    font-size: 13px;
    font-weight: 650;
    box-shadow: none !important;
}

    .profile-menu > .btn:hover,
    .profile-menu > .btn:focus {
        background: #f1f5f7 !important;
        border-color: var(--wp-border-strong) !important;
    }

.dropdown-menu {
    padding: 7px;
    border: 1px solid var(--wp-border);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(32, 37, 54, 0.12);
}

.dropdown-item {
    padding: 8px 10px;
    border-radius: 8px;
    color: #4f586c;
    font-size: 13px;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: var(--wp-primary-soft);
        color: var(--wp-primary-dark);
    }

.app-content {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 22px 24px 34px;
}

/* ---------------------------------------------------------
   Page heading / cards / dashboard
   --------------------------------------------------------- */
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 2px 0 18px;
}

    .page-heading h1 {
        margin: 0 0 4px;
        color: var(--wp-text);
        font-size: clamp(22px, 2vw, 28px);
        font-weight: 750;
        letter-spacing: -0.035em;
    }

    .page-heading p {
        margin: 0;
        color: var(--wp-muted);
        font-size: 13px;
    }

.card,
.wp-content-card,
.filter-card {
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius);
    background: var(--wp-surface);
    box-shadow: var(--wp-shadow-sm);
}

.card {
    overflow: hidden;
}

.card-body {
    padding: 20px;
}

.summary-card {
    position: relative;
    min-height: 128px;
    overflow: hidden;
    transition: transform var(--wp-transition), box-shadow var(--wp-transition), border-color var(--wp-transition);
}

    .summary-card::after {
        content: "";
        position: absolute;
        right: -24px;
        top: -34px;
        width: 112px;
        height: 112px;
        border-radius: 50%;
        background: rgba(24, 169, 153, 0.08);
    }

.row > div:nth-child(2) > .summary-card::after {
    background: rgba(59, 130, 246, 0.08);
}

.row > div:nth-child(3) > .summary-card::after {
    background: rgba(34, 160, 107, 0.08);
}

.row > div:nth-child(4) > .summary-card::after {
    background: rgba(220, 76, 100, 0.08);
}

.summary-card:hover {
    transform: translateY(-2px);
    border-color: var(--wp-border-strong);
    box-shadow: var(--wp-shadow);
}

.summary-card .card-body {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 126px;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.summary-label {
    max-width: 75%;
    color: var(--wp-muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.summary-number {
    color: var(--wp-text);
    font-size: 34px;
    font-weight: 760;
    line-height: 1;
    letter-spacing: -0.05em;
}

/* ---------------------------------------------------------
   Content panels
   --------------------------------------------------------- */
.wp-content-card {
    overflow: hidden;
}

.wp-content-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--wp-border);
    background: linear-gradient(180deg, #ffffff, #fbfcfe);
}

    .wp-content-header h2 {
        margin: 0 0 3px;
        color: var(--wp-text);
        font-size: 20px;
        font-weight: 750;
        letter-spacing: -0.025em;
    }

    .wp-content-header p {
        margin: 0;
        color: var(--wp-muted);
        font-size: 12.5px;
    }

.wp-content-body {
    padding: 20px;
}

.filter-card {
    padding: 16px !important;
    background: #fbfcfe;
    box-shadow: none !important;
}

/* ---------------------------------------------------------
   Forms / buttons
   --------------------------------------------------------- */
.form-label {
    margin-bottom: 6px;
    color: #4c5568;
    font-size: 12px;
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 40px;
    border-color: var(--wp-border-strong);
    border-radius: var(--wp-radius-sm);
    border: 1px solid #c5c8ce;
    background-color: #fff;
    color: var(--wp-text);
    font-size: 13px;
    box-shadow: none;
    transition: border-color var(--wp-transition), box-shadow var(--wp-transition), background var(--wp-transition);
}

    .form-control::placeholder {
        color: #adb4c2;
    }

    .form-control:hover,
    .form-select:hover {
        border-color: #cbd3df;
    }

    .form-control:focus,
    .form-select:focus {
        border-color: rgba(24, 169, 153, 0.65);
        box-shadow: 0 0 0 3px rgba(24, 169, 153, 0.1);
    }

    .form-control[readonly],
    .form-control:disabled,
    .form-select:disabled {
        background: #f5f7fa;
        color: #6e778a;
    }

    .form-control[type="file"] {
        padding-top: 7px;
        padding-bottom: 7px;
    }

        .form-control[type="file"]::file-selector-button {
            margin: -7px 12px -7px -12px;
            padding: 9px 13px;
            border: 0;
            border-right: 1px solid var(--wp-border-strong);
            background: #f6f8fa;
            color: #465064;
            font-weight: 650;
        }

.form-text {
    margin-top: 6px;
    color: #929aab;
    font-size: 11px;
}

.required {
    color: var(--wp-danger);
}

.btn {
    min-height: 38px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: none;
    transition: transform var(--wp-transition), box-shadow var(--wp-transition), background var(--wp-transition), border-color var(--wp-transition), color var(--wp-transition);
}

    .btn:hover {
        transform: translateY(-1px);
    }

    .btn:focus,
    .btn:focus-visible {
        box-shadow: 0 0 0 3px rgba(24, 169, 153, 0.12) !important;
    }

.btn-sm {
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11.5px;
}

.btn-primary,
.wp-primary {
    border-color: var(--wp-primary) !important;
    background: var(--wp-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(24, 169, 153, 0.16);
}

    .btn-primary:hover,
    .wp-primary:hover {
        border-color: var(--wp-primary-dark) !important;
        background: var(--wp-primary-dark) !important;
        box-shadow: 0 6px 16px rgba(24, 169, 153, 0.2);
    }

.wp-outline {
    border: 1px solid var(--wp-border-strong) !important;
    background: #fff !important;
    color: #4e586a !important;
}

    .wp-outline:hover {
        border-color: var(--wp-primary) !important;
        background: var(--wp-primary-soft) !important;
        color: var(--wp-primary-dark) !important;
    }

.btn-light {
    border-color: var(--wp-border) !important;
    background: #f5f7fa !important;
    color: #4d5669 !important;
}

    .btn-light:hover {
        border-color: var(--wp-border-strong) !important;
        background: #edf1f5 !important;
    }

.btn-outline-primary {
    border-color: rgba(24, 169, 153, 0.45);
    color: var(--wp-primary-dark);
}

    .btn-outline-primary:hover {
        border-color: var(--wp-primary);
        background: var(--wp-primary);
        color: #fff;
    }

.btn-outline-secondary,
.btn-outline-dark {
    border-color: var(--wp-border-strong);
    color: #566074;
}

    .btn-outline-secondary:hover,
    .btn-outline-dark:hover {
        border-color: #586174;
        background: #586174;
        color: #fff;
    }

.btn-outline-success {
    border-color: rgba(34, 160, 107, 0.45);
    color: var(--wp-success);
}

    .btn-outline-success:hover {
        border-color: var(--wp-success);
        background: var(--wp-success);
        color: #fff;
    }

.btn-outline-danger {
    border-color: rgba(220, 76, 100, 0.4);
    color: var(--wp-danger);
}

    .btn-outline-danger:hover {
        border-color: var(--wp-danger);
        background: var(--wp-danger);
        color: #fff;
    }

.page-size-select {
    width: auto !important;
    min-width: 104px;
}

.form-card-narrow {
    max-width: 650px;
}

/* ---------------------------------------------------------
   Tables / pagination
   --------------------------------------------------------- */
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: #cbd3df transparent;
}

    .table-responsive.border,
    .table-responsive.rounded-3 {
        border-color: var(--wp-border) !important;
        border-radius: 12px !important;
    }

.table {
    margin-bottom: 0;
    color: #414a5d;
    font-size: 12.5px;
}

    .table > :not(caption) > * > * {
        padding: 12px 12px;
        border-bottom-color: var(--wp-border);
        vertical-align: middle;
    }

    .table thead th {
        border-bottom-width: 1px;
        background: rgb(247, 249, 251);
        background: rgb(234 238 241);
        color: rgb(73 79 90);
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 0;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .table tbody tr:last-child td {
        border-bottom: 0;
    }

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: #fbfdfd;
    color: inherit;
}

.wp-report-table {
    min-width: 1000px;
}

    .wp-report-table td {
        max-width: 260px;
        font-weight: 500;
    }

.pagination {
    gap: 4px;
}

    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 4px 9px;
        border: 1px solid var(--wp-border) !important;
        border-radius: 8px !important;
        background: #fff;
        color: #586174;
        font-size: 11.5px;
        box-shadow: none !important;
    }

        .pagination .page-link:hover {
            background: var(--wp-primary-soft);
            color: var(--wp-primary-dark);
        }

    .pagination .page-item.active .page-link {
        border-color: var(--wp-primary) !important;
        background: var(--wp-primary);
        color: #fff;
    }

    .pagination .page-item.disabled .page-link {
        background: #f8fafc;
        color: #b3bac7;
    }

/* ---------------------------------------------------------
   Status / alerts / lists / detail view
   --------------------------------------------------------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

    .status-badge::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
    }

.status-active,
.status-completed {
    background: #eaf8f1;
    color: #18865a;
}

.status-inactive,
.status-rejected {
    background: #fff0f2;
    color: #c93e55;
}

.status-ongoing {
    background: #eef5ff;
    color: #3374c9;
}

.alert {
    border: 0;
    border-radius: 11px;
    font-size: 12.5px;
}

.alert-danger {
    background: #fff0f2;
    color: #a93448;
}

.alert-success {
    background: #eaf8f1;
    color: #16794f;
}

.alert-warning {
    background: #fff7e8;
    color: #986314;
}

.alert-info {
    background: #eef5ff;
    color: #3269ad;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--wp-border);
    border-radius: 11px;
    background: #fbfcfe;
}

.detail-label {
    margin-bottom: 5px;
    color: #8d96a8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.detail-value {
    color: #3d4659;
    font-size: 13px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.list-group {
    border-radius: 11px;
    overflow: hidden;
}

.list-group-item {
    padding: 12px 14px;
    border-color: var(--wp-border);
    color: #495266;
    font-size: 12.5px;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    color: var(--wp-muted);
    font-size: 11px;
}

/* ---------------------------------------------------------
   Modal
   --------------------------------------------------------- */
.modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(32, 37, 54, 0.18);
    overflow: hidden;
}

.modal-header,
.modal-footer {
    padding: 16px 18px;
    border-color: var(--wp-border);
    background: #fbfcfe;
}

.modal-body {
    padding: 18px;
}

.modal-title {
    color: var(--wp-text);
    font-size: 15px;
    font-weight: 750;
}

/* ---------------------------------------------------------
   Authentication / standalone pages
   --------------------------------------------------------- */
.auth-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    overflow: hidden;
    background: radial-gradient(circle at 16% 16%, rgba(24, 169, 153, 0.16), transparent 30%), radial-gradient(circle at 88% 84%, rgba(59, 130, 246, 0.12), transparent 30%), #f5f7fb;
}

    .auth-page::before,
    .auth-page::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
    }

    .auth-page::before {
        width: 230px;
        height: 230px;
        left: -110px;
        bottom: -110px;
        border: 34px solid rgba(24, 169, 153, 0.08);
    }

    .auth-page::after {
        width: 150px;
        height: 150px;
        right: -55px;
        top: -50px;
        border: 24px solid rgba(59, 130, 246, 0.06);
    }

.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    padding: 28px;
    border: 1px solid rgba(231, 235, 242, 0.95);
    border-radius: var(--wp-radius-lg);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 70px rgba(32, 37, 54, 0.12);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--wp-border);
}

    .auth-brand h1 {
        margin: 0;
        color: var(--wp-text);
        font-size: 19px;
        font-weight: 780;
        letter-spacing: -0.025em;
    }

.auth-card > h2 {
    margin: 0 0 6px;
    color: var(--wp-text);
    font-size: 23px;
    font-weight: 760;
    letter-spacing: -0.035em;
}

.auth-subtitle {
    margin: 0 0 20px;
    color: var(--wp-muted);
    font-size: 12.5px;
}

.access-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    background: var(--wp-bg);
}

.access-card {
    width: min(100%, 520px);
    padding: 28px;
    border: 1px solid var(--wp-border);
    border-radius: var(--wp-radius-lg);
    background: #fff;
    box-shadow: var(--wp-shadow);
    text-align: center;
}

    .access-card .alert {
        margin-bottom: 18px;
    }

/* ---------------------------------------------------------
   Print pages - same single stylesheet
   --------------------------------------------------------- */
.permit-sheet {
    max-width: 190mm;
    margin: 15px auto;
    padding: 12mm;
    border: 1px solid #d5dae3;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--wp-shadow-sm);
}

.permit-title {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2f3542;
    text-align: center;
}

.permit-table {
    width: 100%;
    border-collapse: collapse;
}

    .permit-table td {
        padding: 9px;
        border: 1px solid #cfd5df;
        vertical-align: top;
    }

        .permit-table td:first-child {
            width: 30%;
            background: #f7f9fb;
            font-weight: 700;
        }

.print-report-page {
    padding: 20px;
    background: #fff;
}

.report-print {
    width: 100%;
}

    .report-print th,
    .report-print td {
        padding: 6px !important;
        border: 1px solid #c8ced8 !important;
        font-size: 10px;
    }

    .report-print th {
        background: #eef1f5 !important;
        color: #222936 !important;
    }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-102%);
        box-shadow: 16px 0 36px rgba(32, 37, 54, 0.14);
    }

        .app-sidebar.show,
        .app-sidebar.open,
        body.sidebar-open .app-sidebar,
        .app-shell.sidebar-open .app-sidebar {
            transform: translateX(0);
        }

    .app-main {
        margin-left: 0;
    }

    .mobile-menu {
        display: inline-flex;
    }

    .app-topbar {
        padding: 12px 16px 0;
    }

    .app-content {
        padding: 18px 16px 28px;
    }

    .wp-content-header {
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .page-heading,
    .wp-content-header {
        flex-direction: column;
        align-items: stretch;
    }

        .page-heading > .btn,
        .wp-content-header > .btn {
            align-self: flex-start;
        }

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

    .card-body,
    .wp-content-body {
        padding: 16px;
    }

    .auth-card {
        padding: 23px 20px;
    }
}

@media (max-width: 575.98px) {
    .app-topbar {
        padding-inline: 10px;
    }

    .app-content {
        padding-inline: 10px;
    }

    .topbar-card {
        padding-inline: 12px;
    }

    .topbar-title {
        max-width: 52vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .profile-menu > .btn {
        max-width: 116px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wp-content-header,
    .wp-content-body {
        padding: 15px;
    }

    .btn {
        min-height: 36px;
    }
}

@media print {
    body,
    html {
        background: #fff !important;
    }

    .no-print,
    .app-sidebar,
    .app-topbar {
        display: none !important;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .app-content {
        max-width: none;
        padding: 0;
    }

    .card,
    .wp-content-card,
    .permit-sheet {
        border: 0;
        box-shadow: none;
    }

    .permit-sheet {
        max-width: none;
        margin: 0;
        padding: 0;
        border-radius: 0;
    }

    .print-report-page {
        padding: 0;
    }

    .report-print {
        font-size: 9pt;
    }
}
