/* Panel Base Styles - Modern Sidebar with Gold Theme 2025 - Mobile First */

* {
    box-sizing: border-box;
}

body {
    font-size: .875rem;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.feather {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
}

/* ========================================
   NAVBAR - MOBILE FIRST DESIGN
   ======================================== */
.navbar {
    padding: 0;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1050; /* Above sidebar (1040) */
}

.navbar-brand {
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: white !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 70px);
    flex-shrink: 1;
}

.navbar-toggler {
    padding: 0.5rem 0.75rem;
    margin: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
        padding: 1rem;
        max-width: 100%;
    }
}

/* ========================================
   SIDEBAR - MOBILE FIRST DESIGN
   ======================================== */

/* Mobile: Collapsible overlay sidebar */
.modern-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: white;
    border-right: 1px solid #e2e8f0;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.modern-sidebar.show {
    transform: translateX(0);
}

/* Tablet and Desktop: Fixed sidebar */
@media (min-width: 768px) {
    .modern-sidebar {
        display: block !important; /* Override Bootstrap collapse */
        visibility: visible !important;
        top: 56px !important;
        right: auto;
        bottom: 0;
        width: 16.666667%; /* col-md-2 equivalent */
        padding-top: 0;
        transform: translateX(0) !important;
        transition: none;
        height: calc(100vh - 56px);
        overflow-y: auto;
        overflow-x: hidden;
    }
}

@media (min-width: 992px) {
    .modern-sidebar {
        width: 16.666667%; /* col-lg-2 equivalent */
    }
}

.sidebar-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-section:first-child {
    padding-top: 0.5rem;
}

.sidebar-section:last-of-type {
    border-bottom: none;
}

.sidebar-sticky {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.5rem 0 1rem 0;
}

@media (min-width: 768px) {
    .sidebar-sticky {
        position: relative;
        height: auto;
        min-height: calc(100vh - 56px);
        overflow-y: visible;
        overflow-x: hidden;
        padding-top: 0.5rem;
    }
}

/* ========================================
   NAVIGATION LINKS
   ======================================== */
.modern-nav {
    padding: 0.5rem 0;
    margin: 0;
}

.modern-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    color: #475569;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.modern-nav-link:hover {
    color: #1e293b;
    background: #f8fafc;
    border-left-color: #e2e8f0;
}

.modern-nav-link.active {
    color: #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, transparent 100%);
    border-left-color: #f59e0b;
    font-weight: 600;
}

.nav-icon {
    width: 24px;
    margin-right: 1rem;
    font-size: 1.125rem;
    color: #94a3b8;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.modern-nav-link:hover .nav-icon {
    color: #64748b;
}

.modern-nav-link.active .nav-icon {
    color: #f59e0b;
}

@media (min-width: 768px) {
    .modern-nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }

    .nav-icon {
        width: 20px;
        margin-right: 0.875rem;
        font-size: 1rem;
    }
}

/* Secondary Navigation */
.modern-nav-secondary {
    padding: 0 0 0.5rem 0;
}

.modern-nav-link-secondary {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    font-weight: 400;
    font-size: 0.9375rem;
    color: #64748b;
    transition: all 0.2s ease;
}

.modern-nav-link-secondary:hover {
    color: #475569;
    background: #f8fafc;
}

.nav-icon-small {
    width: 20px;
    margin-right: 0.875rem;
    font-size: 1rem;
    color: #cbd5e0;
    flex-shrink: 0;
}

.modern-nav-link-secondary:hover .nav-icon-small {
    color: #94a3b8;
}

@media (min-width: 768px) {
    .modern-nav-link-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .nav-icon-small {
        width: 16px;
        margin-right: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Sidebar Heading */
.modern-sidebar-heading {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

@media (min-width: 768px) {
    .modern-sidebar-heading {
        padding: 0.75rem 1.25rem 0.5rem;
        font-size: 0.6875rem;
    }
}

/* ========================================
   SIDEBAR FOOTER & LOGOUT BUTTON
   ======================================== */
.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: white;
}

.modern-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.modern-logout-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    color: white;
}

.modern-logout-btn:active {
    transform: translateY(0);
}

.modern-logout-btn i {
    margin-right: 0.625rem;
    font-size: 1.125rem;
}

@media (min-width: 768px) {
    .sidebar-footer {
        padding: 1rem 1.25rem;
    }

    .modern-logout-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }

    .modern-logout-btn i {
        font-size: 1rem;
    }
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
main {
    background: transparent;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    main {
        margin-left: 16.666667%; /* Match sidebar width */
        padding: 0 1.5rem;
    }
}

@media (min-width: 992px) {
    main {
        margin-left: 16.666667%; /* Match sidebar width */
    }
}

/* ========================================
   FORMS & CONTROLS
   ======================================== */
.form-control-dark {
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

/* If page-header contains a nav (breadcrumbs), use normal styling */
.page-header nav {
    font-size: 1rem;
    font-weight: normal;
}

/* Mobile & Tablet Responsive Enhancements */

/* Better touch targets for mobile */
@media (max-width: 991.98px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .table {
        font-size: 0.85rem;
    }
}

/* Tables - Make them scrollable on mobile */
@media (max-width: 767.98px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Modal improvements for mobile */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }
}

/* Card improvements for mobile */
@media (max-width: 767.98px) {
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Form improvements */
@media (max-width: 575.98px) {
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .input-group-text {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

/* Remove borders from danger buttons */
.btn-danger {
    border: none !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Mobile responsive navbar and layout */
@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 80px);
    }

    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    main.col-md-9 {
        padding-left: 1.1rem !important;
        padding-right: 1.1rem !important;
    }

    /* Fix sidebar padding on mobile */
    .sidebar .position-sticky {
        padding-left: 0;
        padding-right: 0;
    }

    .sidebar .nav-link {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Fix logout button padding */
    .sidebar .mt-3 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 0.75rem;
    }
}

/* Breadcrumb responsive */
.breadcrumb {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 0;
}

.breadcrumb-item {
    font-size: 1rem;
}

@media (max-width: 575.98px) {
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.5rem 0;
        flex-wrap: wrap;
    }

    .breadcrumb-item {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.85rem;
    }

    .breadcrumb-item span,
    .breadcrumb-item a {
        display: inline-block;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }

    .breadcrumb-item.active span {
        max-width: 200px;
    }
}

@media (max-width: 767.98px) {
    .breadcrumb {
        font-size: 0.9rem;
    }

    .breadcrumb-item span,
    .breadcrumb-item a {
        display: inline-block;
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }
}

/* General spacing improvements for mobile */
@media (max-width: 767.98px) {
    h1, .h1 {
        font-size: 1.75rem;
    }

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

    h3, .h3 {
        font-size: 1.25rem;
    }

    .page-header {
        font-size: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .page-header {
        font-size: 1.1rem;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Better spacing for main content on tablet */
@media (min-width: 768px) and (max-width: 991.98px) {
    main {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

.white_text{
    color: #fff !important;
}

.circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    color: #fff;
    line-height: 100px;
    text-align: center;
    cursor: pointer;
}
.square_mini{
    width: 100px;
    height: 50px;
    border-radius: 4%;
    color: #fff;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
}
.square {
    width: 110px;
    height: 110px;
    border-radius: 4%;
    color: #fff;
    line-height: 110px;
    text-align: center;
    cursor: pointer;
}

.square_long {
    display: inline-block;
    width: 200px;
    height: 110px;
    border-radius: 4%;
    color: #fff;
    line-height: 110px;
    text-align: center;
    cursor: pointer;
    margin-top: 5px;
}
.square_longer {
    width: 300px;
    height: 60px;
    line-height: 60px;
    text-align: left;
    padding-left: 10px;
}

.circle:hover{ box-shadow: 0 0 10px #333333;}

.color_one{ background-color: #ff6f39; }
.color_two{background-color: #9651fd;}
.color_three{ background-color: #61b44b; }
.color_four{ background-color: #006780; }
.color_red{background-color: #ff1f1f;}
.fit_me_cl{background-color: #c1993f; border-color: #c1993f;}
.fit_me_cl:hover{background-color: #eabf64; border-color: #eabf64;}
.black{background-color: #313131;}

.breadcrumb-item a{color: #0069ff;}

#logout{
    background-color: #c1993f;
    color: white;
    border-radius: 1px;
    padding: 5px;
    position: absolute;
    bottom: 0;
    width: 100%;
}
.nav-item a:hover{color: #c1993f;}

.sidebar .nav-link.active {
    color: #c1993f;
}

.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: #c1993f;
    --bs-btn-border-color: #c1993f;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #eabf64;
    --bs-btn-hover-border-color: #eabf64;
    --bs-btn-focus-shadow-rgb: 60, 153, 110;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #c1993f;
    --bs-btn-active-border-color: #c1993f;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #c1993f;
    --bs-btn-disabled-border-color: #c1993f;
}

/* Ensure sidebar is always below navbar */
@media (max-width: 760px) {
    .sidebar {
        top: 56px;
    }
}
#footer-text {font-size: 11px;}