﻿/* ======================================================
   PARKS EVENTS RENTAL – CLEAN ENTERPRISE UI
   ====================================================== */


/* =========================
   BASE
   ========================= */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin:0;
    
}

body {
    font-family: Segoe UI,Roboto,Arial;
    background: #eef1f4;
    color: #1f2937;
   }


/* =========================
   LINKS
   ========================= */

a {
    color: #6d0f1a;
    text-decoration: none;
}

    a:hover {
        text-decoration: none;
        color: #8a1624;
    }


/* =========================
   HEADER
   ========================= */
/* HEADER */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #6d0f1a;
    color: #ffffff;
    padding: 10px 20px;
    min-height: 60px;
    flex-wrap: wrap;
}


/* LEFT AREA */

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* SYSTEM TITLE */

.system-title {
    font-size: 16px;
    font-weight: 600;
}


/* USER SECTION */

.header-user {
    display: inline-flex;
    align-items: inherit;
    gap: 12px;
}


/* USER AVATAR */

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f2f0e9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: Black;
    font-size: 14px;
}


/* WELCOME TEXT */

.welcome-text {
    font-size: 12px;
    font-weight: 500;
}


/* LOGOUT BUTTON */

.btn-logout {
    width: auto;
    background: #ffffff;
    color: #1f2937;
    border: none;
    padding: 6px 5px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .btn-logout:hover {
        background: #f3f4f6;
    }


/* =========================
   LAYOUT
   ========================= */

.container-fluid {
    padding: 0;
    margin: 0;
    width: 100%;
}

.main-area {
    width:100%;
    padding: 20px;
    min-height: calc(100vh - 60px);
    overflow-x:hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
}


/* =========================
   SIDEBAR
   ========================= */

.sidebar {
    background: #ffffff;
    border-right: 1px solid #d1d5db;
    padding: 15px 10px;
    height: 100%;
}

#sidebarWrapper {
    height: 100vh;
    overflow: auto;
    position: sticky;
    top: 0;
}


/* Sidebar links */

.sidebar-link,
.nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
    color: #374151;
}

    .sidebar-link:hover {
        background: #f3f4f6;
    }

    .sidebar-link.active {
        background: #f7e9eb;
        color: #6d0f1a;
    }


/* =========================
   MOBILE SIDEBAR
   ========================= */

@media (max-width:768px) {

    #sidebarWrapper {
        position: fixed;
        top: 56px;
        left: 0;
        width: 260px;
        height: 100%;
        background: #ffffff;
        transform: translateX(-100%);
        transition: transform .3s ease;
        z-index: 2000;
    }

        #sidebarWrapper.show-sidebar {
            transform: translateX(0);
        }

    .main-area {
        padding: 15px 15px 15px 15px;
    }
}


/* =========================
   CARDS
   ========================= */

.card,
.page-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}


/* =========================
   BUTTONS
   ========================= */

.btn {
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #1f2937;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

    .btn:hover {
        background: #e5e7eb;
    }


/* PRIMARY */

.btn-primary {
    background-color: #6d0f1a;
    border-color: #6d0f1a;
    color: #1f2937;
}

    .btn-primary:hover {
        background-color: #541018;
        border-color: #541018;
        color: #ffffff;
    }

.btn-secondary {
    background-color: #e5e7eb;
    border: 1px solid #e5e7eb;
    color: #111827;
}

    .btn-secondary:hover {
        background-color: #d1d5db;
    }


/* GOLD ACTION */

.btn-gold {
    background: #c9a227;
    border-color: #c9a227;
    color: #1f2937;
}

    .btn-gold:hover {
        background: #b5911f;
    }


/* LIGHT */

.btn-light {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    color: #111827;
}

    .btn-light:hover {
        background-color: #e5e7eb;
    }


/* SUCCESS */

.btn-success {
    background-color: #2b6ecc; /*#15803d ;*/
    border-color: #15803d;
    color: #1f2937;
}

.btn-success:hover {
    background-color: #166534;
}


/* DANGER */

.btn-danger {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #1f2937;
}

    .btn-danger:hover {
        background-color: #b91c1c;
    }

.btn-outline-primary {
    color: #6d0f1a;
    border-color: #6d0f1a;
    background-color: transparent;
}

    .btn-outline-primary:hover {
        background-color: #6d0f1a;
        color: #ffffff;
    }

.btn-outline-danger {
    color: #dc2626;
    border-color: #dc2626;
}

    .btn-outline-danger:hover {
        background-color: #dc2626;
        color: #ffffff;
    }


.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}


/* LOGOUT */

.btn-logout {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #1f2937;
}

.btnReturn {
    color: #6d0f1a;
    border-color: #6d0f1a;
    background-color: transparent;
}

.btnReturn:hover {
    background-color: #6d0f1a;
    color: #ffffff;
}


/* =========================
   FORMS
   ========================= */
input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fafafa;
}

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: #6d0f1a;
        box-shadow: 0 0 0 2px rgba(109,15,26,.15);
        background: #ffffff;
    }

.form-label {
    font-weight: 600;
    margin-bottom: 5px;
}


/* =========================
   ALERTS
   ========================= */

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    color: #7f1d1d;
}


/* =========================
   TABLES
   ========================= */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .table th,
    .table td {
        padding: 10px;
        border-bottom: 1px solid #e5e7eb;
        white-space: nowrap;
    }


    /* header */

    .table thead th {
        background: #f3f4f6;
        font-weight: 700;
    }


    /* zebra */

    .table tbody tr:nth-child(odd) {
        background: #fafafa;
    }


/* =========================
   RESPONSIVE TABLES
   ========================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

@media (max-width:768px) {

    .table {
        font-size: 0.8rem;
    }

        .table th,
        .table td {
            padding: 8px;
        }
}


/* =========================
   BADGES
   ========================= */

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e5e7eb;
}


/* =========================
   ORDER PAGE LAYOUT
   ========================= */

.order-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 15px;
    padding:20px;
}

@media (max-width:900px) {

    .order-layout {
        grid-template-columns: 1fr;
    }
}


/* =========================
   BRAND PANEL
   ========================= */

.brand-panel {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 15px;
}

.brand-panel__top {
    background: #6d0f1a;
    color: #ffffff;
    padding: 15px;
    border-radius: 10px;
}

.brand-panel__logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .brand-panel__logo img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid #c9a227;
    }

.brand-panel__body {
    margin-top: 10px;
}


/* =========================
   FORM GRID
   ========================= */

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width:768px) {

    .field-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================
   AUTH PAGES
   ========================= */

.auth-page .header,
.auth-page #sidebarWrapper {
    display: none;
}

.auth-page .main-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #eef1f4;
}

.login-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.login-title {
    text-align: center;
    font-size: 1.7rem;
    font-weight: 700;
    color: #6d0f1a;
    margin-bottom: 20px;
}

.login-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #6d0f1a;
    color: #ffffff;
    font-weight: 600;
}

    .login-button:hover {
        background: #8a1624;
    }


/* =========================
   FOOTER
   ========================= */

.footer {
    padding: 12px 20px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
}


/* =========================
   PRINT
   ========================= */

@media print {

    .sidebar,
    .header,
    .footer {
        display: none;
    }

    .main-area {
        padding: 5px;
        background: #ffffff;
    }
}

/* LOGIN PAGE LAYOUT */

/* LOGIN PAGE */

.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #eef1f4;
    padding: 10px;
}


/* LOGO */

.login-logo {
    margin-bottom: 15px;
    text-align: center;
}

.brand_logo {
    width: 80px;
    height: 80px;
    border-radius: 5%;
    background: white;
    padding: 6px;
    border: 3px solid #c9a227;
}


/* LOGIN CARD */

.login-card {
    width:150% ;
    max-width: 500px; /* wider */

    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}


/* TITLE */

.login-title {
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    color: #6d0f1a;
    margin-bottom: 5px;
}

.login-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 28px;
}


/* FORM GROUP */

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        font-weight: 600;
        display: block;
        margin-bottom: 6px;
    }


/* INPUT */

.form-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 15px;
}

    .form-input:focus {
        outline: none;
        border-color: #6d0f1a;
        box-shadow: 0 0 0 2px rgba(109,15,26,.15);
        background: white;
    }


/* ERROR */

.error-message {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}


/* REMEMBER */

.form-options {
    display:inline-flex;
    align-items:  center;
    gap: 2px;
    margin-bottom: 22px;
    font-size: 14px;
}


/* LOGIN BUTTON */

.login-button {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: #6d0f1a;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

    .login-button:hover {
        background: #8a1624;
    }


/* MOBILE */

@media (max-width:480px) {

    .login-card {
        padding: 30px 22px;
    }

    .login-title {
        font-size: 26px;
    }

    .brand_logo {
        width: 70px;
        height: 70px;
    }
}

/* CONTACT PAGE TOOLBAR */

.contacts-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}


/* SEARCH GROUP */

.search-group {
    display: flex;
    gap: 10px;
    align-items: center;
}


/* SEARCH BOX */

.search-box {
    width: 260px;
    max-width: 100%;
}


/* EXPORT BUTTON GROUP */

.export-group {
    display: flex;
    gap: 10px;
}


/* GRID ACTION BUTTONS */

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}


/* TABLE FIX */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}


/* MOBILE FIX */

@media (max-width:768px) {

    .contacts-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-group {
        width: 100%;
    }

    .search-box {
        flex: 1;
    }

    .export-group {
        width: 100%;
        justify-content: flex-start;
    }
}

/* GRID CONTAINER */

.grid-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
}

/* STANDARD GRID TABLE */

.grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

    /* HEADER */

    .grid-table thead th {
        background: #f4f6f8;
        font-weight: 600;
        border-bottom: 2px solid #e3e6ea;
        white-space: nowrap;
    }

    /* ROWS */

    .grid-table tbody tr:nth-child(odd) {
        background: #fafafa;
    }

    .grid-table tbody tr:hover {
        background: #f1f5f9;
    }

    /* CELL PADDING */

    .grid-table td,
    .grid-table th {
        padding: 12px 14px;
        vertical-align: middle;
    }

/* ACTION BUTTONS */

.grid-actions {
    text-align: center;
    white-space: nowrap;
}

.grid-btn-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

    /* SMALL BUTTON STYLE */

    .grid-btn-group .btn {
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 6px;
    }

/* EDIT MODE INPUTS */

.grid-table input[type=text],
.grid-table input[type=number] {
    width: 100%;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #dcdfe4;
}

/* MOBILE GRID FIX */

@media (max-width:768px) {

    .grid-table {
        font-size: 13px;
    }

    .grid-btn-group {
        flex-direction: column;
        gap: 6px;
    }
}
.grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

/*Invoices 2*/
/* GRID SYSTEM */

.grid-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
}


/* STANDARD GRID TABLE */

.grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}


    /* HEADER STYLE */

    .grid-table thead th {
        background: #f4f6f8;
        font-weight: 600;
        border-bottom: 2px solid #e3e6ea;
        white-space: nowrap;
    }


    /* ROW STYLE */

    .grid-table tbody tr:nth-child(odd) {
        background: #fafafa;
    }

    .grid-table tbody tr:hover {
        background: #f1f5f9;
    }


    /* CELL SPACING */

    .grid-table td,
    .grid-table th {
        padding: 12px 14px;
        vertical-align: middle;
    }


/* ACTION BUTTONS */

.grid-actions {
    text-align: center;
    white-space: nowrap;
}

.grid-btn-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap:wrap;
}


/* COMPACT GRID (payments etc) */

.grid-compact td,
.grid-compact th {
    padding: 8px 10px;
    font-size: 13px;
}

.grid-btn-group .btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    
}


/* MOBILE GRID FIX */

@media (max-width:768px) {

    .grid-table {
        font-size: 13px;
    }

    .grid-btn-group {
        flex-direction: column;
        gap: 6px;
    }

    .btn {
        width: auto;
    }

}

/* PAGE TITLE BAR */

.payments-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}


/* TOTAL COLLECTED BADGE */

.payments-total-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    position:static !important;
    float: none !important;
}


/* MOBILE ADJUSTMENT */

@media (max-width:768px) {

    .payments-titlebar {
        flex-direction: column;
        align-items: flex-start;
    }

    .payments-total-badge {
        align-self: flex-end;
    }
}

.payments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

/* badge */

.payments-total-badge {
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* mobile */

@media (max-width:768px) {

    .payments-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .payments-total-badge {
        align-self: flex-end;
    }
}
/* Invoice status badges */

.status-badge {
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
}

/* Paid */

.status-paid {
    background: #15803d;
    color: #ffffff;
}

/* Unpaid */

.status-unpaid {
    background: #dc2626;
    color: #ffffff;
}
.badge-voided {
    background: #6b7280;
    color: white;
}

/* =========================
   PATCH: Dashboard tracking layout polish
========================= */
.tracking-actions .tracking-btn {
    min-height: 58px;
    font-weight: 600;
    border-radius: 14px;
}

    .tracking-actions .tracking-btn:disabled,
    .tracking-actions input[type="submit"]:disabled {
        opacity: .45;
        cursor: not-allowed;
        box-shadow: none;
        filter: grayscale(12%);
    }

.tracking-progress {
    border-radius: 12px;
    overflow: hidden;
}

    .tracking-progress .progress-bar {
        font-weight: 600;
    }

.tracking-btn {
    border-width: 2px;
    border-style: solid;
    font-weight: 600;
    border-radius: 14px;
}

.btn-primary {
    border-color: #0d6efd !important;
}

.btn-success {
    border-color: #198754 !important;
}

.btn-warning {
    border-color: #ffc107 !important;
}

.btn-danger {
    border-color: #dc3545 !important;
}

/* ======================================================
   PATCH: GLOBAL RESPONSIVE / MOBILE USABILITY IMPROVEMENTS
   Goal:
   - Keep page logic unchanged
   - Let wide content scroll instead of being clipped
   - Improve shared shell behavior on phones/tablets
   - Make GridView/table-heavy pages feel more natural
   ====================================================== */

/* ---------------------------------
   PATCH: Core layout safety
   --------------------------------- */

/* Allow content to use full width without clipping horizontal overflow.
   The wrappers (.table-responsive / .grid-container) should control scroll,
   not the page shell itself. */
.main-area {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible; /* was hidden */
}

/* Prevent flex/grid children from forcing overflow unexpectedly */
.row,
.col,
[class*="col-"] {
    min-width: 0;
}

/* Give cards/panels a safer width on smaller screens */
.card,
.page-card,
.brand-panel {
    max-width: 100%;
}

/* ---------------------------------
   PATCH: Shared table / GridView behavior
   --------------------------------- */

/* Standard wrapper for any ASP.NET GridView or wide table.
   Add this class around page-specific grids where needed. */
.table-responsive,
.grid-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
    border-radius: 10px;
}

/* Make grid content size to content when needed,
   so the wrapper scrolls instead of crushing columns */
.table,
.grid-table {
    width: 100%;
    min-width: 720px; /* keeps columns readable on small screens */
}

/* GridView tables often render without your custom class.
   This catches common ASP.NET table output inside wrappers. */
.table-responsive table,
.grid-container table {
    min-width: 720px;
}

/* Cells should stay readable and not collapse awkwardly */
.table th,
.table td,
.grid-table th,
.grid-table td {
    white-space: nowrap;
    vertical-align: middle;
}

/* Action columns should not wrap into messy stacks unless we choose to */
.grid-actions,
.action-buttons,
.grid-btn-group {
    white-space: nowrap;
}

/* ---------------------------------
   PATCH: Mobile-specific content feel
   --------------------------------- */
@media (max-width: 768px) {

    /* More breathing room and less edge crowding */
    .main-area {
        padding: 12px;
    }

    /* Header stacks cleanly and stays usable */
    .header {
        padding: 10px 12px;
        gap: 10px;
    }

    .header-left,
    .header-user {
        width: 100%;
        justify-content:left;
        flex-wrap: wrap;
    }

    .system-title {
        font-size: 14px;
        line-height: 1.3;
    }

    .welcome-text {
        font-size: 11px;
        line-height: 1.2;
    }

    /* Let logout size naturally instead of 40% width on phones */
    .btn-logout {
        width: auto;
        min-width: 88px;
    }

    /* Cards/panels become a little tighter but still comfortable */
    .card,
    .page-card,
    .brand-panel {
        padding: 12px;
        border-radius: 10px;
    }

    /* Make forms and button groups wrap cleanly */
    .d-flex,
    .grid-btn-group,
    .action-buttons {
        flex-wrap: wrap;
    }

    .btn,
    .btn-sm {
        max-width: 100%;
    }

    /* Tables/gridviews keep horizontal scrolling instead of busting layout */
    .table-responsive,
    .grid-container {
        margin-bottom: 10px;
    }

        .table,
        .grid-table,
        .table-responsive table,
        .grid-container table {
            min-width: 640px;
            font-size: 13px;
        }

            .table th,
            .table td,
            .grid-table th,
            .grid-table td {
                padding: 8px 10px;
            }
}

/* ---------------------------------
   PATCH: Sidebar mobile experience
   --------------------------------- */

/* Add smoother app-like mobile drawer behavior */
@media (max-width: 768px) {
    #sidebarWrapper {
        top: 0;
        left: 0;
        width: 280px;
        max-width: 86vw;
        height: 100vh;
        padding-top: 76px; /* clears fixed-looking header area */
        box-shadow: 0 12px 28px rgba(0,0,0,.16);
        z-index: 2000;
    }

    /* Optional page dimmer when sidebar is open */
    body.sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, 0.35);
        z-index: 1990;
    }

    /* Keep content from feeling cramped beside floating components */
    .payments-header,
    .payments-titlebar,
    .contacts-toolbar {
        gap: 10px;
    }

    /* Action button groups on mobile should wrap nicely, not overflow */
    .grid-btn-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

/* ---------------------------------
   PATCH: Desktop polish
   --------------------------------- */
@media (min-width: 769px) {

    /* Keep the content shell comfortable on larger screens */
    .main-area {
        padding: 20px 24px;
    }

    /* Sidebar remains usable for long admin menus */
    #sidebarWrapper {
        overscroll-behavior: contain;
    }
}