html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #0078D4;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #F3F2F1;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Navigation dropdown menu styling - Fixed positioning */
.navbar-nav .dropdown-menu {
    min-width: 280px !important;
    max-width: none !important;
    padding: 0.5rem 0;
    width: auto !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 1000 !important;
    transform: none !important;
}

.navbar-nav .dropdown-item {
    padding: 0.5rem 1rem;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: block !important;
    width: auto !important;
}

.navbar-nav .dropdown-item i {
    width: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.navbar-nav .dropdown {
    position: relative !important;
}

.navbar-nav .dropdown-toggle::after {
    margin-left: auto !important;
}

.navbar {
    position: relative !important;
    z-index: 1030 !important;
}

@media (max-width: 576px) {
    .navbar-nav .dropdown-menu {
        min-width: 250px !important;
        right: 0 !important;
        left: auto !important;
    }
}

/* Security form styling - prevent autofill for sensitive fields */
input[type="password"][autocomplete="new-password"],
input[type="password"][autocomplete="off"] {
    background-color: transparent !important;
    background-image: none !important;
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
}

input[autocomplete="new-password"]::-webkit-contacts-auto-fill-button,
input[autocomplete="off"]::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    height: 0;
    width: 0;
    margin: 0;
}

input[data-lpignore="true"] {
    background-color: transparent !important;
    background-image: none !important;
}

/* ===== IMPROVED PROFESSIONAL STYLING ===== */

/* Shared User Management Styling */
.user-config-container {
    background-color: #ffffff;
    padding: 0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-config-title {
    background: linear-gradient(135deg, #0078D4 0%, #005A9E 100%);
    color: white;
    padding: 16px 24px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-config-title .title-main {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 4px;
}

.user-config-title .title-subtitle {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
}

.user-config-title i.fs-4 {
    font-size: 28px;
    opacity: 0.95;
}

.form-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #E1DFDD;
}

.section-title {
    font-weight: 600;
    color: #323130;
    margin-bottom: 16px;
    font-size: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0078D4;
}

.policy-table {
    background-color: white;
    border: 1px solid #E1DFDD;
}

.policy-table th {
    background: linear-gradient(180deg, #F3F2F1 0%, #E1DFDD 100%);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 2px solid #D2D0CE;
    font-size: 14px;
    color: #323130;
}

.policy-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #F3F2F1;
    font-size: 14px;
    vertical-align: middle;
}

.policy-row:hover {
    background-color: #E6F2FA;
    transition: background-color 0.2s ease;
}

.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 10px;
}

.form-control-sm {
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #D2D0CE;
    border-radius: 4px;
}

.form-control-sm:focus {
    border-color: #0078D4;
    box-shadow: 0 0 0 0.2rem rgba(0, 120, 212, 0.15);
}

.checkbox-cell {
    text-align: center;
    width: 80px;
}

.parameter-cell {
    width: 180px;
}

.param-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #F3F2F1;
    border-radius: 4px;
    color: #323130;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #D2D0CE;
    cursor: pointer;
    transition: all 0.2s ease;
}

.param-link:hover {
    background-color: #E1DFDD;
    border-color: #0078D4;
    color: #005A9E;
}

.param-link i {
    margin-right: 6px;
}

.param-editor {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 1000;
}

.param-editor-header {
    background: linear-gradient(135deg, #0078D4 0%, #005A9E 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-editor-body {
    padding: 20px;
}

.param-editor-footer {
    padding: 12px 20px;
    border-top: 1px solid #E1DFDD;
    text-align: right;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
}

.levels-cell {
    display: flex;
    gap: 15px;
}

.level-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.level-group label {
    font-size: 13px;
    margin-bottom: 0;
}

/* Standard page container styling */
.page-container {
    background-color: #ffffff;
    padding: 0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-title {
    background: linear-gradient(135deg, #0078D4 0%, #005A9E 100%);
    color: white;
    padding: 16px 24px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 20px;
}

/* Table styling consistency */
.styled-table {
    background-color: white;
    border: 1px solid #E1DFDD;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.styled-table th {
    background: linear-gradient(180deg, #F3F2F1 0%, #E1DFDD 100%);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 2px solid #D2D0CE;
    font-size: 14px;
    color: #323130;
}

.styled-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #F3F2F1;
    font-size: 14px;
    vertical-align: middle;
}

.styled-table tbody tr:hover {
    background-color: #E6F2FA;
    transition: background-color 0.2s ease;
}

.styled-table tbody tr:last-child td {
    border-bottom: none;
}

/* Card styling for forms */
.form-card {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 1px solid #E1DFDD;
}

.form-card-header {
    background: linear-gradient(135deg, #0078D4 0%, #005A9E 100%);
    color: white;
    padding: 12px 20px;
    margin: -24px -24px 20px -24px;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 18px;
}

/* Search and filter section */
.search-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #E1DFDD;
}

/* Status badges - Updated for professional look */
.status-badge-enabled {
    background-color: #107C10;
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge-disabled {
    background-color: #E81123;
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge-inactive {
    background-color: #FFB900;
    color: #323130;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge-warning {
    background-color: #D83B01;
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge-info {
    background-color: #00B7C3;
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 2px;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F3F2F1 100%);
    border: 1px solid #E1DFDD;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #605E5C;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Info Row Display */
.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #F3F2F1;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #605E5C;
    min-width: 140px;
    flex-shrink: 0;
}

.info-value {
    color: #323130;
    flex: 1;
}

.action-btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap; /* Prevent text wrapping */
    min-width: fit-content;
    min-height: 36px; /* Consistent height for all buttons */
}

/* Remove external link icon from action buttons */
.action-btn::after {
    content: none !important;
    display: none !important;
}

/* Remove any external link indicators from links in tables and action groups */
.styled-table a::after,
.action-btn-group a::after,
a.action-btn::after {
    content: none !important;
    display: none !important;
}

/* Ensure no external link icons appear on any page navigation links */
a[asp-page]::after {
    content: none !important;
    display: none !important;
}

.action-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px; /* Consistent height for small buttons */
}

.action-btn i {
    font-size: 14px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.action-btn-sm i {
    font-size: 12px;
}

/* Icon-only buttons should be square */
.action-btn:not(:has(*:not(i))) {
    padding: 8px;
    min-width: 36px;
}

.action-btn-sm:not(:has(*:not(i))) {
    padding: 6px;
    min-width: 32px;
}

/* Action Button Color Variants */
.action-btn-primary {
    background-color: #0078D4;
    border-color: #0078D4;
    color: white;
}

.action-btn-primary:hover {
    background-color: #005A9E;
    border-color: #005A9E;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 120, 212, 0.3);
    transform: translateY(-1px);
}

.action-btn-primary:active {
    background-color: #004578;
    border-color: #004578;
    transform: translateY(0);
}

.action-btn-secondary {
    background-color: #605E5C;
    border-color: #605E5C;
    color: white;
}

.action-btn-secondary:hover {
    background-color: #484644;
    border-color: #484644;
    color: white;
    box-shadow: 0 2px 6px rgba(96, 94, 92, 0.3);
    transform: translateY(-1px);
}

.action-btn-secondary:active {
    background-color: #323130;
    border-color: #323130;
    transform: translateY(0);
}

.action-btn-success {
    background-color: #107C10;
    border-color: #107C10;
    color: white;
}

.action-btn-success:hover {
    background-color: #0B5A08;
    border-color: #0B5A08;
    color: white;
    box-shadow: 0 2px 6px rgba(16, 124, 16, 0.3);
    transform: translateY(-1px);
}

.action-btn-success:active {
    background-color: #094509;
    border-color: #094509;
    transform: translateY(0);
}

.action-btn-warning {
    background-color: #FFB900;
    border-color: #FFB900;
    color: #323130;
}

.action-btn-warning:hover {
    background-color: #D39300;
    border-color: #D39300;
    color: #323130;
    box-shadow: 0 2px 6px rgba(255, 185, 0, 0.3);
    transform: translateY(-1px);
}

.action-btn-warning:active {
    background-color: #B87E00;
    border-color: #B87E00;
    transform: translateY(0);
}

.action-btn-danger {
    background-color: #E81123;
    border-color: #E81123;
    color: white;
}

.action-btn-danger:hover {
    background-color: #C50F1F;
    border-color: #C50F1F;
    color: white;
    box-shadow: 0 2px 6px rgba(232, 17, 35, 0.3);
    transform: translateY(-1px);
}

.action-btn-danger:active {
    background-color: #A80000;
    border-color: #A80000;
    transform: translateY(0);
}

.action-btn-info {
    background-color: #00B7C3;
    border-color: #00B7C3;
    color: white;
}

.action-btn-info:hover {
    background-color: #038387;
    border-color: #038387;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 183, 195, 0.3);
    transform: translateY(-1px);
}

.action-btn-info:active {
    background-color: #005B70;
    border-color: #005B70;
    transform: translateY(0);
}

/* Action Button Group */
.action-btn-group {
    display: inline-flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

/* No Data Message Styling */
.no-data-message {
    text-align: center;
    padding: 60px 20px;
    color: #605E5C;
}

.no-data-message i {
    font-size: 64px;
    color: #D2D0CE;
    margin-bottom: 20px;
}

.no-data-message h5 {
    color: #323130;
    font-weight: 600;
    margin-bottom: 12px;
}

.no-data-message p {
    color: #605E5C;
    font-size: 14px;
}

.no-data-message a {
    color: #0078D4;
    text-decoration: none;
}

.no-data-message a:hover {
    color: #005A9E;
    text-decoration: underline;
}