/* Dark Theme - Based on screenshot with dark background and orange accents */
:root {
    --primary-color: #ff6600;
    --secondary-color: #2a2a2a;
    --success-color: #2dce89;
    --info-color: #11cdef;
    --warning-color: #fb6340;
    --danger-color: #f5365c;
    --dark-color: #0f0f0f;
    --light-color: #2a2a2a;
}

/* Dark theme specific overrides */
body,
.dashboard-body {
    background-color: #1a1a1a;
    color: #cccccc;
}

/* Sidebar gradient for dark theme */
.sidebar {
    background: linear-gradient(135deg, #1a1a1a 100%, #2d2d2d 100%);
}

/* Top navbar dark theme */
.top-navbar {
    background: #1a1a1a;
    border-bottom-color: #333333;
}

.top-navbar h4 {
    color: #ffffff;
}

/* Dashboard cards dark theme */
.dashboard-card {
    background: #2a2a2a !important;
    border-color: #333333;
    color: #cccccc;
}

.dashboard-card .card-header {
    background: #333333 !important;
    background-image: none !important;
    border-bottom-color: #444444 !important;
}

.dashboard-card .card-body {
    background: #2a2a2a;
    color: #cccccc;
}

.card-title,
.widget-title,
.dashboard-card h1,
.dashboard-card h2,
.dashboard-card h3,
.dashboard-card h4,
.dashboard-card h5,
.dashboard-card h6 {
    color: #ffffff !important;
}

.card-subtitle,
.dashboard-card p,
.dashboard-card .text-muted {
    color: #cccccc !important;
}

.dashboard-card small {
    color: #cccccc !important;
}

/* Stats cards dark theme */
.stats-number {
    color: #ffffff;
}

.stats-label {
    color: #cccccc;
}

/* Form controls dark theme */
.form-control,
.form-select,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
input[type="number"] {
    background-color: #2a2a2a;
    border-color: #333333;
    color: #ffffff;
}

.form-control:focus,
.form-select:focus,
select:focus,
input:focus {
    background-color: #2a2a2a;
    border-color: #ff6600;
    color: #ffffff;
}

.form-label,
label {
    color: #ffffff !important;
}

/* Form labels in license create page - override inline styles */
#license-form .form-label,
#license-form label {
    color: #ffffff !important;
}

/* Table dark theme */
.table-card {
    background: #2a2a2a;
}

.table-card .table {
    color: #cccccc;
}

.table-card .table th {
    background-color: #333333;
    color: #ffffff;
    border-color: #444444;
}

.table-card .table td {
    border-color: #333333;
    color: #cccccc;
}

/* Buttons dark theme - primary buttons use orange accent */
.btn-primary {
    background-color: #ff6600;
    border-color: #ff6600;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #ff8833;
    border-color: #ff8833;
}

.btn-outline-primary {
    color: #ff6600;
    border-color: #ff6600;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #ff6600;
    border-color: #ff6600;
    color: #ffffff;
}

.btn-outline-secondary {
    color: #cccccc;
    border-color: #666666;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #666666;
    border-color: #666666;
    color: #ffffff;
}

/* All buttons inside dashboard cards dark theme */
.dashboard-card .btn {
    color: inherit;
}

.dashboard-card .btn-outline-primary {
    color: #ff6600;
    border-color: #ff6600;
    background-color: transparent;
}

.dashboard-card .btn-outline-primary:hover {
    background-color: #ff6600;
    color: #ffffff;
}

.dashboard-card .btn-outline-secondary {
    color: #cccccc;
    border-color: #666666;
    background-color: transparent;
}

.dashboard-card .btn-outline-secondary:hover {
    background-color: #666666;
    color: #ffffff;
}

.dashboard-card .btn-outline-danger {
    color: #f5365c;
    border-color: #f5365c;
    background-color: transparent;
}

.dashboard-card .btn-outline-danger:hover {
    background-color: #f5365c;
    color: #ffffff;
}

.dashboard-card .btn-outline-warning {
    color: #fb6340;
    border-color: #fb6340;
    background-color: transparent;
}

.dashboard-card .btn-outline-warning:hover {
    background-color: #fb6340;
    color: #ffffff;
}

.dashboard-card .btn-outline-success {
    color: #2dce89;
    border-color: #2dce89;
    background-color: transparent;
}

.dashboard-card .btn-outline-success:hover {
    background-color: #2dce89;
    color: #ffffff;
}

.dashboard-card .btn-outline-info {
    color: #11cdef;
    border-color: #11cdef;
    background-color: transparent;
}

.dashboard-card .btn-outline-info:hover {
    background-color: #11cdef;
    color: #ffffff;
}

/* Regular buttons in dashboard cards */
.dashboard-card .btn-secondary {
    background-color: #666666;
    border-color: #666666;
    color: #ffffff;
}

.dashboard-card .btn-secondary:hover {
    background-color: #777777;
    border-color: #777777;
}

/* Links dark theme */
a {
    color: #ff6600;
}

a:hover {
    color: #ff8833;
}

/* Alerts dark theme */
.alert-success {
    background-color: rgba(45, 206, 137, 0.2);
    border-color: #2dce89;
    color: #2dce89;
}

.alert-info {
    background-color: rgba(17, 205, 239, 0.2);
    border-color: #11cdef;
    color: #11cdef;
}

.alert-warning {
    background-color: rgba(251, 99, 64, 0.2);
    border-color: #fb6340;
    color: #fb6340;
}

.alert-danger {
    background-color: rgba(245, 54, 92, 0.2);
    border-color: #f5365c;
    color: #f5365c;
}

/* Text colors dark theme */
.text-primary {
    color: #ff6600 !important;
}

.text-muted {
    color: #999999 !important;
}

/* Profile section dark theme */
.profile-name {
    color: #ffffff;
}

.profile-email {
    color: #cccccc;
}

.profile-meta-item {
    background-color: #333333;
    color: #cccccc;
}

/* Dropdown dark theme */
.dropdown-menu {
    background-color: #2a2a2a;
    border-color: #333333;
}

.dropdown-item {
    color: #cccccc;
}

.dropdown-item:hover {
    background-color: #333333;
    color: #ffffff;
}

.dropdown-header {
    background-color: #333333;
    color: #ffffff;
}

/* Stats icon dark theme */
.stats-icon.primary {
    background-color: #ff6600;
}

/* Page content dark theme */
.page-content {
    background-color: #1a1a1a;
}

/* Call to action card dark theme */
.dashboard-card.call-to-action-card {
    background: #333333 !important;
    border-color: #444444 !important;
}

.dashboard-card.call-to-action-card .card-body {
    background: #333333 !important;
    color: #cccccc !important;
}

.call-to-action-text {
    color: #cccccc !important;
}

/* Rental details dark theme */
.rental-details-header {
    background: #333333 !important;
    border-color: #444444 !important;
}

.rental-details-header h5 {
    color: #ffffff !important;
}

.rental-details-content {
    background: #2a2a2a !important;
    border-color: #333333 !important;
}

.rental-details-content .rental-card {
    background: #333333 !important;
    border-color: #444444 !important;
}

.rental-details-content .rental-card-header {
    background: #2a2a2a !important;
    border-color: #444444 !important;
}

.rental-details-content .rental-info-label {
    color: #ffffff !important;
}

.rental-details-content .rental-info-value {
    color: #cccccc !important;
}

/* List group items dark theme */
.list-group-item {
    background-color: #2a2a2a;
    border-color: #333333;
    color: #cccccc;
}

.list-group-item:hover {
    background-color: #333333;
}

/* Contact info dark theme */
.contact-info .fw-bold {
    color: #ff6600 !important;
}

.contact-info .address p,
.contact-info .contact-details p {
    color: #cccccc !important;
}

.contact-info .opening-hours {
    background-color: #333333 !important;
    border-left-color: #ff6600 !important;
}

/* Profile actions dark theme */
.profile-actions {
    background-color: #333333 !important;
}

.profile-actions h6 {
    color: #ffffff !important;
}

/* Badge dark theme */
.badge {
    background-color: #333333;
    color: #ffffff;
}

.badge.bg-primary {
    background-color: #ff6600 !important;
}

.badge.bg-success {
    background-color: #2dce89 !important;
}

.badge.bg-danger {
    background-color: #f5365c !important;
}

.badge.bg-secondary {
    background-color: #666666 !important;
}

/* Additional elements dark theme */
.dashboard-card .bi,
.dashboard-card i {
    color: inherit;
}

.dashboard-card .text-primary {
    color: #ff6600 !important;
}

.dashboard-card .text-success {
    color: #2dce89 !important;
}

.dashboard-card .text-warning {
    color: #fb6340 !important;
}

.dashboard-card .text-danger {
    color: #f5365c !important;
}

.dashboard-card .text-info {
    color: #11cdef !important;
}

.dashboard-card hr {
    border-color: #444444;
}

.dashboard-card .border-bottom,
.dashboard-card .border-top,
.dashboard-card .border {
    border-color: #444444 !important;
}

/* Notification cards if they exist */
.notification-success {
    background-color: rgba(45, 206, 137, 0.2) !important;
    color: #2dce89 !important;
}

.notification-info {
    background-color: rgba(17, 205, 239, 0.2) !important;
    color: #11cdef !important;
}

.notification-warning {
    background-color: rgba(251, 99, 64, 0.2) !important;
    color: #fb6340 !important;
}

.notification-danger {
    background-color: rgba(245, 54, 92, 0.2) !important;
    color: #f5365c !important;
}

/* Workflow steps dark theme */
.workflow-step {
    background-color: #2a2a2a;
    border-color: #444444;
}

.workflow-step.active {
    border-color: #ff6600;
    background-color: #333333;
}

/* Item cards dark theme */
.item-card {
    background-color: #2a2a2a;
    border-color: #444444;
}

.item-card:hover {
    border-color: #ff6600;
}

.item-card.selected {
    background-color: #333333;
    border-color: #ff6600;
}

/* Calendar dark theme */
.calendar-cell {
    background-color: #2a2a2a;
    border-color: #444444;
    color: #cccccc;
}

.calendar-cell.header {
    background-color: #333333;
    color: #ffffff;
}

.calendar-cell.available {
    background-color: rgba(45, 206, 137, 0.2);
    border-color: #2dce89;
}

.calendar-cell.occupied {
    background-color: rgba(245, 54, 92, 0.2);
    border-color: #f5365c;
}

/* Modal dark theme */
.modal-content {
    background-color: #2a2a2a;
    color: #cccccc;
}

.modal-header {
    border-bottom-color: #444444;
    background-color: #333333 !important;
}

.modal-header .modal-title {
    color: #ffffff;
}

.modal-footer {
    border-top-color: #444444;
    background-color: #333333 !important;
}

.modal-body {
    color: #cccccc;
}

/* Rental details modal - improve text contrast */
.rental-details-header {
    background-color: #333333 !important;
    border-color: #444444 !important;
}

.rental-details-header h5 {
    color: #ffffff !important;
}

.rental-details-header .user-info {
    color: #cccccc !important;
}

.rental-details-header .user-info strong {
    color: #ffffff !important;
}

/* Rental card in modal */
.rental-details-content .rental-card {
    background-color: #2a2a2a !important;
    border-color: #444444 !important;
}

.rental-details-content .rental-card-header {
    background-color: #333333 !important;
    border-bottom-color: #444444 !important;
}

.rental-details-content .rental-card-header h6 {
    color: #ffffff !important;
}

.rental-details-content .rental-card-header .text-muted {
    color: #b3b3b3 !important;
}

.rental-details-content .rental-card-body {
    background-color: #2a2a2a !important;
    color: #cccccc !important;
}

/* Rental info labels - improve contrast */
.rental-details-content .rental-info-label {
    color: #b3b3b3 !important;
}

.rental-details-content .rental-info-value {
    color: #ffffff !important;
}

/* Rental section titles */
.rental-details-content .rental-section-title {
    color: #ffffff !important;
}

.rental-details-content .rental-section-title i {
    color: #ff6600 !important;
}

/* Table headers in rental modal */
.rental-details-content .table th {
    background-color: #333333 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}

.rental-details-content .table td {
    color: #ffffff !important;
    border-color: #444444 !important;
    background-color: #2a2a2a !important;
}

.rental-details-content .table tbody tr {
    background-color: #2a2a2a !important;
}

.rental-details-content .table tbody tr:nth-child(even) {
    background-color: #2a2a2a !important;
}

.rental-details-content .table tbody tr:hover {
    background-color: #333333 !important;
}

.rental-details-content .table tbody tr:hover td {
    background-color: #333333 !important;
}

/* Strong text in table cells */
.rental-details-content .table td strong {
    color: #ffffff !important;
}

/* Table responsive wrapper */
.rental-details-content .table-responsive {
    background-color: transparent !important;
}

.rental-details-content .table-responsive .table {
    background-color: transparent !important;
}

/* Table sm variant in rental modal */
.rental-details-content .table-sm th,
.rental-details-content .table-sm td {
    background-color: inherit !important;
}

.rental-details-content .table-sm tbody tr {
    background-color: #2a2a2a !important;
}

.rental-details-content .table-sm tbody tr td {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
}

.rental-details-content .table-sm tbody tr:nth-child(even) {
    background-color: #2a2a2a !important;
}

.rental-details-content .table-sm tbody tr:nth-child(even) td {
    background-color: #2a2a2a !important;
}

.rental-details-content .table-sm tbody tr:hover {
    background-color: #333333 !important;
}

.rental-details-content .table-sm tbody tr:hover td {
    background-color: #333333 !important;
}

/* All table elements in rental modal - ensure dark background */
.rental-details-content table.table tbody tr td {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
}

.rental-details-content table.table tbody tr:nth-child(even) td {
    background-color: #2a2a2a !important;
}

.rental-details-content table.table tbody tr:hover td {
    background-color: #333333 !important;
}

/* Text muted in rental modal */
.rental-details-content .text-muted {
    color: #b3b3b3 !important;
}

.rental-details-content small.text-muted {
    color: #b3b3b3 !important;
}

/* Close button dark theme */
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Select dropdown dark theme */
select option {
    background-color: #2a2a2a;
    color: #ffffff;
}

/* Chart container dark theme */
.chart-container {
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 1rem;
}

.chart-container canvas {
    background-color: #1f1f1f;
}

/* License create page - improve text contrast */
#license-form .card-subtitle {
    color: #cccccc !important;
}

#license-form .form-text {
    color: #b3b3b3 !important;
}

/* Page header text in dark theme */
h4.text-muted,
.text-muted {
    color: #cccccc !important;
}

/* Form check labels in dark theme */
.form-check-label {
    color: #ffffff !important;
}

/* Signature wrapper in dark theme */
.signature-wrapper {
    background-color: #333333 !important;
}

.signature-canvas {
    /* Keep signature legible: black ink on white canvas */
    background-color: #ffffff !important;
}

/* Invalid feedback text in dark theme */
.invalid-feedback {
    color: #f5365c !important;
}

/* Placeholder text contrast in dark theme */
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #b3b3b3 !important;
    opacity: 1 !important;
}

.form-control::-webkit-input-placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #b3b3b3 !important;
    opacity: 1 !important;
}

.form-control::-moz-placeholder,
input::-moz-placeholder,
textarea::-moz-placeholder {
    color: #b3b3b3 !important;
    opacity: 1 !important;
}

.form-control:-ms-input-placeholder,
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #b3b3b3 !important;
    opacity: 1 !important;
}

/* Input group text in dark theme */
.input-group-text {
    background-color: #333333 !important;
    border-color: #444444 !important;
    color: #ffffff !important;
}

/* Workflow step text in dark theme */
.workflow-step {
    background-color: #2a2a2a !important;
    border-color: #444444 !important;
}

.workflow-step strong {
    color: #ffffff !important;
}

.workflow-step .text-muted {
    color: #b3b3b3 !important;
}

/* Form control small in dark theme */
.form-control-sm {
    background-color: #2a2a2a !important;
    border-color: #444444 !important;
    color: #ffffff !important;
}

.form-control-sm::placeholder {
    color: #b3b3b3 !important;
    opacity: 1 !important;
}

/* Date time input in dark theme */
input[type="datetime-local"] {
    background-color: #2a2a2a !important;
    border-color: #444444 !important;
    color: #ffffff !important;
}

input[type="datetime-local"]::placeholder {
    color: #b3b3b3 !important;
    opacity: 1 !important;
}

/* Calendar picker icon in dark theme - make it white/visible */
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(2);
    cursor: pointer;
    opacity: 0.9;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

