/* CMS admin — compact layout utilities (whole-project standard) */

.cms-module-nav-wrap {
	overflow: visible;
	margin-top: -0.35rem;
	margin-bottom: 0.35rem;
	padding-bottom: 0.1rem;
}

body.admin-layout-compact #content .container-fluid > .cms-module-nav-wrap:first-child {
	margin-top: -0.5rem;
}

.cms-module-nav-scroll {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	min-width: 0;
	scrollbar-width: thin;
	scrollbar-color: #c5c9d6 transparent;
	padding-bottom: 0.2rem;
}

.cms-module-nav-scroll::-webkit-scrollbar {
	height: 4px;
}

.cms-module-nav-scroll::-webkit-scrollbar-track {
	background: transparent;
}

.cms-module-nav-scroll::-webkit-scrollbar-thumb {
	background-color: #c5c9d6;
	border-radius: 4px;
}

.cms-module-nav-scroll::-webkit-scrollbar-thumb:hover {
	background-color: #a8adc0;
}

.cms-module-nav-inner {
	flex-wrap: nowrap;
	min-width: min-content;
	gap: 0.25rem;
}

.cms-module-nav {
	flex-wrap: nowrap;
	min-width: 0;
	gap: 0.25rem;
	padding-top: 0.25rem;
	padding-bottom: 0.4rem;
}

.cms-module-nav .btn {
	white-space: nowrap;
	flex-shrink: 0;
	padding: 0.2rem 0.45rem;
	font-size: 0.75rem;
	line-height: 1.3;
}

.cms-module-nav-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.125rem 0.5rem 0.125rem 0;
	margin-right: 0.1rem;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	flex-shrink: 0;
	user-select: none;
}

.cms-module-nav-brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	border-radius: 0;
	background: transparent;
	color: var(--cms-module-accent, #858796);
	font-size: 0.8125rem;
	line-height: 1;
	flex-shrink: 0;
}

.cms-module-nav-brand-text {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	color: #3a3b45;
	line-height: 1.2;
	white-space: nowrap;
}

.cms-module-nav-links {
	flex-wrap: nowrap;
	min-width: min-content;
	gap: 0.25rem;
}

.cms-module-nav-switcher {
	position: relative;
	flex-shrink: 0;
	margin-left: 0.35rem;
}

.cms-module-nav-switcher .select2-container {
	min-width: 9.5rem !important;
	max-width: 11rem;
	z-index: 1;
}

.cms-module-nav-switcher-dropdown {
	z-index: 1070 !important;
}

.cms-module-nav-switcher .select2-container--default .select2-selection--single {
	height: calc( 1.25em + 0.35rem + 2px );
	min-height: 0;
	border-color: #d1d3e2;
	font-size: 0.75rem;
	line-height: 1.25;
}

.cms-module-nav-switcher .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: calc( 1.25em + 0.35rem );
	padding-left: 0.45rem;
	padding-right: 1.35rem;
	color: #3a3b45;
}

.cms-module-nav-switcher .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: calc( 1.25em + 0.35rem );
}

.cms-module-nav-switcher-dropdown .select2-search__field {
	font-size: 0.8125rem;
}

.cms-module-nav-switcher-dropdown .select2-results__option {
	font-size: 0.8125rem;
	padding: 0.35rem 0.65rem;
}

.cms-page-toolbar {
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	margin-bottom: 0.5rem;
}

.cms-filters-compact .form-control,
.cms-filters-compact .btn {
	font-size: 0.875rem;
}

.cms-listing-scroll {
	max-height: min(70vh, 720px);
	overflow: auto;
}

.cms-listing-table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #f8f9fc;
	box-shadow: inset 0 -1px 0 #e3e6f0;
	white-space: nowrap;
	vertical-align: middle;
}

.cms-listing-table.table-sm td,
.cms-listing-table.table-sm th {
	padding: 0.4rem 0.5rem;
}

.cms-listing-sort-link {
	text-decoration: none;
	font-weight: 700;
}

.cms-listing-sort-link:hover,
.cms-listing-sort-link.is-active {
	text-decoration: none;
	color: #4e73df !important;
}

.cms-listing-money-due {
	color: #c82333;
	font-weight: 700;
}

.cms-listing-money-muted {
	color: #858796;
}

.cms-filter-chip {
	font-weight: 500;
	text-decoration: none;
	color: #5a5c69;
}

.cms-filter-chip:hover {
	background: #eaecf4;
	text-decoration: none;
	color: #3a3b45;
}

.cms-card-compact > .card-header {
	padding: 0.35rem 0.75rem;
}

.cms-card-compact > .card-body {
	padding: 0.5rem 0.75rem;
}

.cms-flash-toast {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 9999;
	width: min(600px, calc(100vw - 2.5rem));
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cms-floating-widget {
	position: fixed;
	z-index: 1045;
}

@media (max-width: 576px) {
	.cms-flash-toast {
		top: 0.75rem;
		right: 0.75rem;
		width: calc(100vw - 1.5rem);
	}
}

/* Modern Laravel CMS Custom Styles */

/* Enhanced Content Container */
.content-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    
    a.row-title {
        color: #3b82f6;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s ease-in-out;
        
        &:hover {
            color: #2563eb;
            text-decoration: underline;
        }
    }
    
    color: #374151;
    
    .table {
        color: #374151;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        overflow: hidden;
        box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        
        thead tr {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            border-bottom: 2px solid #e5e7eb;
        }
        
        thead th {
            font-weight: 600;
            color: #475569;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-size: 0.75rem;
            padding: 1rem;
        }
    }
    
    .table td, .table th {
        border-top: 1px solid #e5e7eb;
        padding: 0.75rem 1rem;
        vertical-align: middle;
        
        .badge {
            background-color: #3b82f6;
            color: white;
            font-weight: 500;
            padding: 0.25rem 0.5rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
    }
    
    .table tbody tr {
        transition: background-color 0.15s ease-in-out;
        
        &:hover {
            background-color: #f8fafc;
        }
    }
}

/* Modern Dashboard Cards */
.dashboard-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    
    &:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    }
    
    .card-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 0.5rem;
    }
    
    .card-description {
        color: #6b7280;
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

.dashboard-card--no-access {
    opacity: 0.72;
    cursor: not-allowed;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-style: dashed;
    border-color: #d1d5db;

    &:hover {
        transform: none;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    }

    .dashboard-card-no-access-hint {
        font-style: italic;
    }
}

.dashboard-card-link {
    color: inherit;

    &:hover,
    &:focus {
        color: inherit;
        text-decoration: none;
    }

    .dashboard-card {
        cursor: pointer;
    }
}

/* Enhanced Form Styling */
.form-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
    
    .form-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #e5e7eb;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
        
        label {
            display: block;
            font-weight: 500;
            color: #374151;
            margin-bottom: 0.5rem;
            font-size: 0.875rem;
        }
        
        .form-control {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid #d1d5db;
            border-radius: 0.5rem;
            font-size: 0.875rem;
            transition: all 0.2s ease-in-out;
            background-color: #ffffff;
            
            &:focus {
                outline: none;
                border-color: #3b82f6;
                box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
            }
            
            &::placeholder {
                color: #9ca3af;
            }
        }
        
        .form-text {
            font-size: 0.75rem;
            color: #6b7280;
            margin-top: 0.25rem;
        }
    }
}

/* Modern Button Enhancements */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    
    &.btn-primary {
        background-color: #3b82f6;
        color: white;
        
        &:hover {
            background-color: #2563eb;
            transform: translateY(-1px);
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        }
    }
    
    &.btn-secondary {
        background-color: #f1f5f9;
        color: #475569;
        border: 1px solid #e2e8f0;
        
        &:hover {
            background-color: #e2e8f0;
            color: #334155;
        }
    }
    
    &.btn-danger {
        background-color: #ef4444;
        color: white;
        
        &:hover {
            background-color: #dc2626;
            transform: translateY(-1px);
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        }
    }
}

/* Enhanced Alert Styling */
.alert-modern {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    
    &.alert-success {
        background-color: #ecfdf5;
        color: #047857;
        border-left: 4px solid #10b981;
    }
    
    &.alert-danger {
        background-color: #fef2f2;
        color: #b91c1c;
        border-left: 4px solid #ef4444;
    }
    
    &.alert-warning {
        background-color: #fffbeb;
        color: #b45309;
        border-left: 4px solid #f59e0b;
    }
    
    &.alert-info {
        background-color: #ecfeff;
        color: #0e7490;
        border-left: 4px solid #06b6d4;
    }
}

/* Modern Sidebar Enhancements */
.sidebar-modern {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    .nav-item {
        margin-bottom: 0.25rem;
        
        .nav-link {
            color: rgba(255, 255, 255, 0.8);
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            margin: 0 0.5rem;
            font-weight: 500;
            transition: all 0.2s ease-in-out;
            
            &:hover {
                color: white;
                background-color: rgba(255, 255, 255, 0.1);
                transform: translateX(4px);
            }
            
            &.active {
                color: white;
                background-color: rgba(255, 255, 255, 0.2);
                font-weight: 600;
            }
        }
    }
    
    .sidebar-heading {
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        padding: 1rem 1.5rem 0.5rem;
        margin-top: 1rem;
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .content-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .dashboard-card {
        padding: 1rem;
    }
}

/* Animation Enhancements */
.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Focus States for Accessibility */
.focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

/* Content Status Indicators */
.status-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    cursor: help;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

.status-active {
    color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-inactive {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    text-decoration: line-through;
}

.status-no-index {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 600;
}

.status-warning {
    color: #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Icon-only status indicators */
.status-indicator:not(:has(span)) {
    padding: 0.25rem;
    min-width: 1.5rem;
    justify-content: center;
}

/* Hover effects for status container */
.status-container:hover .status-indicator {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-name-no-index {
    color: #ef4444 !important;
    font-weight: 600;
}

/* Content page name links */
.content-page-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.content-page-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.content-page-link.page-name-no-index:hover {
    color: #dc2626;
}

/* Page name with status indicators */
.page-name-with-status {
    cursor: help;
    display: inline-block;
}

.text-strikethrough {
    text-decoration: line-through;
}

.status-tick {
    color: #10b981;
    font-weight: bold;
    margin-left: 0.25rem;
    font-size: 0.9em;
}

/* Enhanced content page link styling */
.content-page-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

.content-page-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.content-page-link.text-danger{
    color: #dc2626;
}

.content-page-link.text-strikethrough {
    text-decoration: line-through underline;
}

/* Print Styles */
@media print {
    .sidebar-modern,
    .btn-modern,
    .alert-modern {
        display: none !important;
    }
    
    .content-container {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

.ticket-content p {
    font-size:16px;
    color: #000000;
}

span#staleTicketMessage {
    color: #856404;
    margin-bottom: 0;
}

.stale-tickets-float {
	right: 1rem;
	bottom: 5.5rem;
}

.stale-tickets-float-btn {
    position: relative;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stale-tickets-float-btn:hover,
.stale-tickets-float-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    outline: none;
    color: #fff;
}

.stale-tickets-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 4px;
    border-radius: 999px;
    background: #e74a3b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.stale-tickets-float-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(320px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid #f6c23e;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.stale-tickets-float-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: #fff3cd;
    border-bottom: 1px solid #ffeeba;
    font-weight: 600;
    font-size: 0.875rem;
    color: #856404;
}

.stale-tickets-float-panel-body {
    padding: 0.85rem;
}

.stale-tickets-float-panel-close {
    padding: 0;
    margin: -0.25rem -0.25rem -0.25rem 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    color: #856404;
    opacity: 0.7;
}

.stale-tickets-float-panel-close:hover {
    opacity: 1;
}

@media (max-width: 576px) {
    .stale-tickets-float {
        right: 0.75rem;
        bottom: 5rem;
    }
}

/* Date/time inputs: single-click opens picker; double-click allows manual entry */
input[type="date"]:not([readonly]):not(:disabled),
input[type="datetime-local"]:not([readonly]):not(:disabled) {
	position: relative;
	cursor: pointer;
}

input[type="date"].date-input-manual,
input[type="datetime-local"].date-input-manual {
	cursor: text;
}

input[type="date"]:not([readonly]):not(:disabled):not(.date-input-manual)::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:not([readonly]):not(:disabled):not(.date-input-manual)::-webkit-calendar-picker-indicator {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	cursor: pointer;
	opacity: 0;
	background: transparent;
}