/* Root Variables */
:root {
    --primary-color: #08041c;
    --secondary-color: #2b2947;
    --tercery-color: #413d81;
    --glass-boxes: #201e34;
    --text-color-light: #d3d3d3;
    --text-muted: #9e9e9e;
    --text-color-dark: #08041c;
    --text-color-white: #ffffff;
    --text-color-alert: #ea2929;
    --light-bg: #2c1c5a;
    --input-bg: rgba(255, 255, 255, 1);
    --button-gradient-left: #ff8f00;
    --button-gradient-right: #ee4848;
    --button-gradient-hover-left: #ff7800;
    --button-gradient-hover-right: #ea2929; 
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 80px 0 0 0; /* Reduced from 120px to 80px for all screen sizes */
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

/* Further reduce top padding on mobile */
@media (max-width: 991.98px) {
    body {
        padding-top: 60px; /* Reduced from 80px to 60px for mobile */
    }
}

.price-free, .price-basic, .price-standard, .price-premium   {
    font-size: 3rem;
}

.was-price-basic, .was-price-standard, .was-price-premium {
    font-weight: 300;
}

.nav-item.dropdown {
    margin-top: -5px;
}

.app-card {
    position: relative;
    overflow: hidden;
}

p.card-text {
    color: #d6912f;
    font-size: 0.9rem;
}

.level-ribbon {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #dc3545;
    color: var(--text-color-white);
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: 500;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
    text-transform: capitalize;
}

.level-ribbon::after {
    content: '';
    position: absolute;
    left: 5px;
    bottom: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid #a52834; /* Darker shade of the ribbon color */
    border-right: 10px solid transparent;
}

.app-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.main.container {
    margin-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.account-info strong {
    color: var(--button-gradient-left);
}

.form-control {
    background-color: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color-dark);
}

.bg-dark .form-control {
    background-color: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color-dark);
}


.form-control:focus {
    background-color: var(--input-bg);
    border-color: var(--button-gradient-left);
    box-shadow: 0 0 0 0.2rem rgba(255, 143, 0, 0.25);
    color: var(--text-color-dark);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--input-bg);
    opacity: 1;
}

.glass-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /*    margin-bottom: 20px;*/
}

.glass-card-header {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card-body {
    padding: 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color-light);
    font-weight: 700;
}

input[type='text'],
input[type='email'],
input[type='password'],
select,
textarea {
    width: 100%;
    padding: 12px !important;
    margin-bottom: 20px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-color-dark);
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='number']:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background-image: linear-gradient(to right, var(--button-gradient-left), var(--button-gradient-right));
    border: none;
    color: var(--text-color-white);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.btn-primary:hover {
    background-image: linear-gradient(to right, var(--button-gradient-hover-left), var(--button-gradient-hover-right));
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-color-light) !important;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: bold;
}

td {
    background-color: rgba(255, 255, 255, 0.02);
}

.table-responsive {
    overflow-x: auto;
}

.card-title small {
    font-size: 1rem;
}

.navbar {
    background-color: var(--tercery-color);
    padding: 15px 0;
}

.navbar-brand,
.nav-link {
    color: var(--text-color-light) !important;
}

/* Removed hover style to use the underline effect from mobile_menu.css */

#impersonation-bar {
    background-color: var(--button-gradient-left);
    color: black;
    text-align: center;
    padding: 10px;
    font-weight: 300;
    margin-top: 30px;
}

#impersonation-bar a {
    color: var(--text-color-white);
    text-decoration: underline;
}

.error {
    color: #ff6b6b;
    margin-bottom: 10px;
}

.editable {
    background-color: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 5px;
    min-width: 50px;
    display: inline-block;
}

.editable:focus {
    outline: 2px solid var(--button-gradient-left);
    background-color: var(--input-bg);
}

.action-link {
    color: #e3e3e3;
    text-decoration: none;
    margin-right: 10px;
}

.action-link:hover {
    color: #e3e3e3;
    text-decoration: underline;
}

.delete-link {
    color: var(--text-color-alert);
}
.delete-link:hover {
    color: var(--text-color-alert);
    text-decoration: underline;
}

.save-link {
    display: none;
    color: #4caf50;
}

.editable {
    background-color: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 5px;
    color: var(--text-color-dark);
    width: 100%;
}

.create_user.level-select {
    border-radius: 8px;
    padding: 10px;
}

.date-input,
.level-select,
.status-select {
    background-color: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    line-height: 1.5;
    padding: 8px;
    color: var(--text-color-dark);
    width: 100%;
}

.date-input-wrapper {
    display: flex;
    flex-direction: column;
}

.date-input-container {
    position: relative;
    display: inline-block;
}

.date-input {
    padding-right: 30px; /* Make room for the icon */
}

.calendar-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* This makes the icon non-clickable */
    color: #6c757d; /* Bootstrap's secondary color */
}

/* Style for disabled inputs */
.date-input:disabled + .calendar-icon {
    opacity: 0.5;
}

/* Make the calendar icon clickable */
.date-input-container {
    cursor: pointer;
}

.date-input-container input[type='date']::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

@media (max-width: 991px) {
    .navbar > .container-fluid > .row {
        flex-direction: column;
    }

    .navbar > .container-fluid > .row > div {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .navbar-brand img {
        height: 30px;
    }

    /* Remove problematic positioning */
    .navbar-toggler {
        margin-left: auto;
    }

    .navbar-collapse {
        width: 100%;
    }

    .navbar-nav {
        text-align: center;
    }

    /* Fix incorrect display property */
    .d-flex {
        display: flex !important;
    }

    .navbar {
        padding: 5px 0;
    }
}

@media (min-width: 992px) {
    .navbar > .container-fluid > .row {
        align-items: center;
    }

    .navbar-collapse {
        flex-grow: 0;
    }

    .navbar-nav {
        margin-left: auto;
    }
}

/* Dark background section styling */
.dark-bg-section {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Override form control styling for dark background sections */
.dark-bg-section .form-control,
.dark-bg-section .form-select,
.dark-bg-section input[type='text'],
.dark-bg-section input[type='email'],
.dark-bg-section input[type='password'],
.dark-bg-section input[type='number'],
.dark-bg-section input[type='date'],
.dark-bg-section select,
.dark-bg-section textarea {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color-light);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Override placeholder color for dark background sections */
.dark-bg-section .form-control::placeholder,
.dark-bg-section .form-select::placeholder,
.dark-bg-section input::placeholder,
.dark-bg-section textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Override focus styles for dark background sections */
.dark-bg-section .form-control:focus,
.dark-bg-section .form-select:focus,
.dark-bg-section input:focus,
.dark-bg-section textarea:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-color-light);
    border-color: var(--button-gradient-left);
}

/* Higher specificity override for dark background sections to ensure text is light */
body .dark-bg-section .form-control,
body .dark-bg-section .form-select,
body .dark-bg-section input[type='text'],
body .dark-bg-section input[type='email'],
body .dark-bg-section input[type='password'],
body .dark-bg-section input[type='number'],
body .dark-bg-section input[type='date'],
body .dark-bg-section select,
body .dark-bg-section textarea {
    color: var(--text-color-light) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Orange labels - only for form labels and table headers */
.form-label,
.modal th,
.filter-form label {
    color: #ff8f00;
}

/* Keep section titles in the default light color */
.admin-card-title,
.modal h6,
.modal .modal-title,
.filter-title {
    color: var(--text-color-light);
}

/* Keep the text after the label in the default color */
.form-control,
.form-select,
.form-check-label,
.modal td {
    color: var(--text-color-light);
}

.glass-card-body .form-select, .table-striped .form-select {
    color: var(--text-color-dark);
}

/* Date picker styles */
.date-picker-container {
    cursor: pointer;
}

.date-picker-icon {
    cursor: pointer;
    background-color: var(--accent-color);
}

/* Date picker input styling */
.date-picker {
    background-color: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px;
    color: var(--text-color-dark);
    width: 100%;
    cursor: pointer;
}

.input-group .date-picker {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Custom legend styles */
.custom-legend {
    padding: 15px;
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-align: center;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: white;
    justify-content: center;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
}

.legend-label {
    font-weight: bold;
    text-transform: uppercase;
}

.legend-value {
    margin-left: 10px;
    color: rgba(255, 255, 255, 0.7);
    color: white;
    border: none;
}

.date-picker-icon:hover {
    background-color: rgba(74, 144, 226, 0.8);
}

/* Make the date input more visible */
input[type="date"] {
    cursor: pointer;
    position: relative;
}

/* Hide the default calendar icon in browsers */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    display: none;
}

/* Hide the default calendar icon in Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
    opacity: 0;
}

/* Pre tag styling for code blocks */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.translation-tree .text-info {
    color: var(--text-color-light) !important;
}

.translation-tree .text-muted {
    color: var(--text-muted) !important;
}

/* Time display styles for system settings */
#serverTime, #utcTime {
    font-family: monospace;
    font-size: 1.1em;
    transition: color 0.3s ease;
    color: var(--text-color-dark);
}

#serverTime.text-success {
    color: #28a745 !important;
    font-weight: bold;
}

.time-display-card {
    border-left: 4px solid #007bff;
    background-color: rgba(0, 123, 255, 0.05);
    color: var(--text-color-dark);
}

.bg-dark-light .text-muted {
    color: var(--text-color-light) !important;
}

.alert-info h1, .alert-info h2, .alert-info h3, .alert-info h4, .alert-info h5, .alert-info h6 {
    color: var(--bs-alert-color);
    font-weight: 700;
}

footer {
    background-color: var(--glass-boxes);
    color: var(--text-color-light);
}

.navbar-brand img {
    height: 50px;
}