/*
 * Design A2 - Compact Modern Theme
 * Based on original CRM Design Refresh with compact spacing
 * Uses 'a' prefix for all custom classes
 */

/* ========================================
   MODERN FORM INPUTS
   ======================================== */

/* Enhanced input fields with subtle shadows and better borders */
.a-input,
.a-form .form-control {
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    width: 320px;
}

/* Ensure date inputs have same height as text inputs */
input[type="date"].a-input,
input[type="datetime-local"].a-input,
input[type="time"].a-input {
    height: auto;
    line-height: normal;
    padding: 8px 12px;
}

.a-input-full {
    width: 100%;
}

.a-input-sm {
    width: 240px;
}

.a-input-md {
    width: 360px;
}

.a-input-lg {
    width: 520px;
}

.a-input:focus,
.a-form .form-control:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.a-input:hover:not(:focus),
.a-form .form-control:hover:not(:focus) {
    border-color: #9ca3af;
}

/* Input groups with icons */
.a-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.a-input-group .a-input-icon {
    position: absolute;
    left: 12px;
    color: #6b7280;
    pointer-events: none;
}

.a-input-group .a-input {
    padding-left: 38px;
}

/* Styled file input button */
input[type="file"].a-input {
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

input[type="file"].a-input::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    border-right: 1px solid #d1d5db;
}

input[type="file"].a-input::-webkit-file-upload-button {
    padding: 8px 16px;
    margin-right: 12px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    border-right: 1px solid #d1d5db;
}

input[type="file"].a-input::file-selector-button:hover,
input[type="file"].a-input::-webkit-file-upload-button:hover {
    background: #e5e7eb;
}


/* Select dropdowns */
.a-select,
.a-form select.form-control {
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.a-select:focus,
.a-form select.form-control:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.a-page-container{
    padding: 10px;
}

.a-multiswitch {
    display: inline-flex;
    background-color: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    gap: 0;
}

.a-multiswitch-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    gap: 0px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border: 0;
    background: transparent;
    color: #374151;
    line-height: 1;
}

.a-multiswitch-item:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.03);
}

.a-multiswitch-item.active {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: #2563eb;
}

.a-multiswitch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    border-radius: 50%;
}

.a-multiswitch-sm .a-multiswitch-item {
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 9px;
}

.a-multiswitch-sm .a-multiswitch-icon {
    width: 20px;
}

/* ========================================
   MODERN BUTTONS
   ======================================== */
/* Primary button - modern gradient */
.btn-a-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    cursor: pointer;
    height: 42px;
}

.btn-a-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    color: #fff;
}

.btn-a-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

.btn-a-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success button */
.btn-a-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    height: 42px;
}

.btn-a-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    color: #fff;
}

/* Danger button */
.btn-a-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1.5px solid transparent;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
    height: 42px;
}

.btn-a-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    color: #fff;
}

/* Warning button */
.btn-a-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
    height: 42px;
}

.btn-a-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* Info button */
.btn-a-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
    cursor: pointer;
    height: 42px;
}

.btn-a-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);
    color: #fff;
}

.btn-a-info:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(6, 182, 212, 0.2);
}

/* Secondary/Outline button */
.btn-a-secondary {
    background: #fff;
    border: 1.5px solid #d1d5db;
    color: #374151;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    height: 42px;
}

.btn-a-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Small button variant */
.btn-a-sm {
    padding: 6px 10px;
    font-size: 13px;
    height: 32px;
}

/* Large button variant */
.btn-a-lg {
    padding: 12px 24px;
    font-size: 15px;
    height: auto;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1.2;
}

/* Full-width block button — works for both <button> and <a> */
.btn-a-block {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

/* Icon button */
.btn-a-icon {
    width: 38px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Fixed width icon button for small buttons in tables */
.btn-a-icon-sm {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


.a-panel-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    /*padding: 20px;*/
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.a-tabs-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;    
    padding: 0px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

/* ========================================
   MODERN CARDS
   ======================================== */

.a-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.a-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.a-card-header {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.a-card-body {
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

.a-card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

/* Compact card variant */
.a-card-compact {
    padding: 12px 16px;
}

/* Highlighted card */
.a-card-highlight {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.03), #fff);
}

/* ========================================
   MODERN TABLE/GRID
   ======================================== */

.a-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.a-grid-actions {
    display: flex;
    gap: 10px;
}

.a-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.a-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.a-table thead {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    border-bottom: 2px solid #e5e7eb;
}

.a-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

.a-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
    line-height: 1.2;
}

.a-table tbody tr:hover {
    background: #f9fafb;
}

.a-table tbody tr:last-child {
    border-bottom: none;
}

.a-table tbody td {
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    vertical-align: middle;
}

/* Striped variant */
.a-table-striped tbody tr:nth-child(even) {
    background: #fafafa;
}

.a-table-striped tbody tr:nth-child(even):hover {
    background: #f3f4f6;
}

/* Compact variant */
.a-table-compact tbody td,
.a-table-compact thead th {
    padding: 10px 12px;
}

/* ========================================
   A-GRID HELPERS
   ======================================== */

.a-grid-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.a-grid-search-wrap .a-input {
    padding-right: 30px;
}

.a-grid-search-clear {
    position: absolute;
    right: 8px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: none;
    padding: 0;
}

.a-grid-search-wrap.has-value .a-grid-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.a-grid-sort {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
}

.a-grid-sort .sort-icon {
    font-size: 12px;
    color: #9ca3af;
}

.a-grid-sort.active .sort-icon {
    color: #2563eb;
}

.a-grid-confirm-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: #374151;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.a-grid-confirm-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #374151;
}

/* ========================================
   LANGUAGE INDICATOR
   ======================================== */

.lang-indicator {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

.lang-indicator.lang-en { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.lang-indicator.lang-es { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.lang-indicator.lang-de { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.lang-indicator.lang-fr { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.lang-indicator.lang-it { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.lang-indicator.lang-pt { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.lang-indicator.lang-zh { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #333; }
.lang-indicator.lang-ja { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); color: #333; }
.lang-indicator.lang-other { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); color: #333; }

/* ========================================
   LABELS & BADGES
   ======================================== */

.a-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
    display: block;
}

.a-label-required::after {
    content: " *";
    color: #ef4444;
}

.a-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    line-height: 1;
}

.a-badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.a-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.a-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.a-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.a-badge-info {
    background: #e0f2fe;
    color: #075985;
}

.a-badge-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

/* ========================================
   ENHANCED SLIDER CHECKBOX (AVSliderCheck)
   ======================================== */

.slider-checkbox-a {
    position: relative;
}

.slider-checkbox-a input {
    margin: 0px;
    margin-top: 1px;
    cursor: pointer;
    opacity: 0;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
    filter: alpha(opacity=0);
    -moz-opacity: 0;
    -khtml-opacity: 0;
    opacity: 0;
    position: absolute;
    z-index: 1;
    top: 0px;
    left: 0px;
    width: 40px;
    height: 22px;
}

.slider-checkbox-a input:checked + .label:before {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.slider-checkbox-a input:checked + .label:after {
    left: 20px;
}

.slider-checkbox-a .label {
    position: relative;
    padding-left: 48px;
    padding-top: 2px;
    color: #374151;
}

.slider-checkbox-a .label:before,
.slider-checkbox-a .label:after {
    position: absolute;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
    transition: background-color 0.3s, left 0.3s;
}

.slider-checkbox-a .label:before {
    content: " ";
    color: #fff;
    box-sizing: border-box;
    font-size: 12px;
    line-height: 20px;
    background-color: #ccc;
    left: 0px;
    top: 0px;
    height: 22px;
    width: 40px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.slider-checkbox-a .label:after {
    content: "";
    background: #fff;
    left: 2px;
    top: 2px;
    height: 18px;
    width: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.a-h1,
.a-heading-1 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.2;
}

.a-h2,
.a-heading-2 {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.3;
}

.a-heading-3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.4;
}

.a-heading-4 {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Dark theme (smart-style-1) heading overrides */
body.smart-style-1 .a-h1,
body.smart-style-1 .a-heading-1,
body.smart-style-1 .a-h2,
body.smart-style-1 .a-heading-2 {
    color: #e5e7eb;
}

body.smart-style-1 .a-heading-3 {
    color: #d1d5db;
}

body.smart-style-1 .a-heading-4 {
    color: #9ca3af;
}

.a-text-muted {
    color: #6b7280;
}

.a-text-small {
    font-size: 13px;
}

.a-text-bold {
    font-weight: 600;
}

/* ========================================
   SPACING UTILITIES
   ======================================== */

.a-mb-1 { margin-bottom: 4px; }
.a-mb-2 { margin-bottom: 8px; }
.a-mb-3 { margin-bottom: 12px; }
.a-mb-4 { margin-bottom: 16px; }
.a-mb-5 { margin-bottom: 24px; }

.a-mt-1 { margin-top: 4px; }
.a-mt-2 { margin-top: 8px; }
.a-mt-3 { margin-top: 12px; }
.a-mt-4 { margin-top: 16px; }
.a-mt-5 { margin-top: 24px; }

.a-p-1 { padding: 4px; }
.a-p-2 { padding: 8px; }
.a-p-3 { padding: 12px; }
.a-p-4 { padding: 16px; }
.a-p-5 { padding: 24px; }

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */

.a-alert {
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.a-alert-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.a-alert-success {
    background: #f0fdf4;
    border-color: #10b981;
    color: #065f46;
}

.a-alert-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.a-alert-danger {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.a-alert-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.a-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    pointer-events: none;
}

.a-toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 420px;
    color: #fff;
    padding: 14px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.a-toast-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.a-toast-message {
    font-weight: 400;
    line-height: 1.35;
}

.a-toast-success { background: #10b981; }
.a-toast-error { background: #ef4444; }
.a-toast-warning { background: #f59e0b; }

.a-toast-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.a-confirm-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a-confirm-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    min-width: 340px;
    max-width: 480px;
    width: 90%;
}

.a-confirm-header {
    padding: 18px 22px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.a-confirm-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.a-confirm-body {
    padding: 16px 22px;
}

.a-confirm-body p {
    margin: 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.a-confirm-footer {
    padding: 12px 22px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.a-header-status-wrap {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.a-header-status {
    display: flex;
    align-items: center;
    gap: 10px;
    /*min-width: 280px;*/
    max-width: 520px;
}

.crm-status-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 3px 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    min-width: 280px;
    max-width: 520px;
}

.crm-status-left {
    display: flex;
    align-items: center;
}

.crm-status-count {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.crm-status-body {
    flex: 1;
    min-width: 0;
}

.crm-status-title-text {
    display: block;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-status-note {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-status-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.crm-status-actions .btn-a-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   FORM GROUPS
   ======================================== */
 

.a-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;/*20px;*/
}

.a-form-row > * {
    flex: 1;
}

/* ========================================
   PAGINATION
   ======================================== */

.a-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.a-pagination .page-item {
    list-style: none;
}

.a-pagination .page-link {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.a-pagination .page-link:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.a-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: #fff;
}

.a-pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.a-divider {
    
    height: 20px !important;
    white-space: nowrap;
    width: 100%;
}
/* ========================================
   TABS - Modern variant
   ======================================== */
.a-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0;
}

.a-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    /*margin-bottom: -2px;*/
    text-transform: uppercase;
    border-radius: 6px 6px 0px 0px;
}

.a-tab:hover {
    color: #374151;
    background: #f9fafb;
}

.a-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.a-tab i,
.a-tab .fa,
.a-tab .fas,
.a-tab .far,
.a-tab .fab {
    display: inline !important;
    width: auto !important;
    text-align: inherit !important;
    --fa-width: auto;
}

.fa, .fa-brands, .fa-classic, .fa-regular, .fa-solid, .fab, .far, .fas {
    width: auto !important;
}

/* ========================================
   SEARCH BAR
   ======================================== */

.a-search-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.a-search-bar input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.a-search-bar input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.a-search-bar .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* ========================================
   LOADING STATES
   ======================================== */

.a-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: a-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes a-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.a-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: a-skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes a-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   DROPDOWN MENUS
   ======================================== */

.a-dropdown {
    position: relative;
    display: inline-block;
}

.a-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.a-dropdown-menu.show {
    display: block;
}

.a-dropdown-item {
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.a-dropdown-item:hover {
    background: #f9fafb;
    color: #111827;
}

.a-dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.a-dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

.a-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}





/*STAT-BOX*/


.list-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.stat-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px 16px;
    flex: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

/* ========================================
   SLIDE-OUT PANEL
   ======================================== */

.a-slide-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.a-slide-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.a-slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60%;
    min-width: 600px;
    max-width: 900px;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.a-slide-panel.active {
    transform: translateX(0);
}

.a-slide-panel-header {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.a-slide-panel-body {
    padding: 20px;
}

.a-slide-panel-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 20px;
    margin: 0 -20px -20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.a-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.task-detail-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.a-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.a-btn-group .alarm-preset.active {
    background: #3b82f6;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.25);
}

.a-form-row-3.task-alarm-row {
    grid-template-columns: 2fr 1fr 1fr;
}

/* ========================================
   DETAIL TABLE
   ======================================== */

.a-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.a-detail-table tr {
    border-bottom: 1px solid #f3f4f6;
}

.a-detail-table tr:last-child {
    border-bottom: none;
}

.a-detail-table td:first-child {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    width: 140px;
    background: #fafafa;
}

.a-detail-table td:last-child {
    color: #111827;
    font-size: 14px;
}

/* ========================================
   COMPACT FORM GROUPS
   ======================================== */

.a-form-group {
    margin-bottom: 16px;
}

.a-form-group-compact {
    margin-bottom: 10px;
}
.a-form-group-nomargin {
    margin-bottom: 0px;
}

.a-form-row {
    display: flex;
    gap: 16px;
}

.a-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.a-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.a-form-section {
    /*background: #f9fafb;*/
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 16px;
}

.a-form-section-noborder {    
    padding: 12px;
    margin-bottom: 16px;
}
.a-form-section-borderbottom {
    padding: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb !important;
}

.a-section-box-borderbottom {  
    border-bottom: 1px solid #e5e7eb !important;
}

.a-section-box-slidepanel {
    padding: 15px 0; /*top and bottom padding*/
    margin-bottom: 5px;
    border-bottom: 1px solid #e5e7eb !important;
}

.a-section-box {
    padding: 15px;
    margin-bottom: 5px;
    border-bottom: 1px solid #e5e7eb !important;
}

.a-section-header {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    text-transform: uppercase;
   
}

.a-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    /*text-transform: uppercase;*/
    
}

.a-section-title-upper {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    text-transform: uppercase;
}



.a-section-text {
    color: #4e575c;
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   TOGGLE SWITCH
   ======================================== */

.a-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.a-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.a-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

.a-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.a-toggle input:checked + .a-toggle-slider {
    background-color: #2563eb;
}

.a-toggle input:focus + .a-toggle-slider {
    box-shadow: 0 0 1px #2563eb;
}

.a-toggle input:checked + .a-toggle-slider:before {
    transform: translateX(20px);
}

.a-toggle input:disabled + .a-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toggle with label */
.a-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.a-toggle-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

/* Wide variant for complex forms */
.a-slide-panel-lg {
    width: 70%;
    max-width: 1100px;
}

@media (max-width: 1400px) {
    .a-slide-panel-lg {
        width: 80%;
        min-width: 700px;
    }
}

@media (max-width: 900px) {
    .a-slide-panel-lg {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
}

/* Responsive for slide panel */
@media (max-width: 1200px) {
    .a-slide-panel {
        width: 70%;
        min-width: 500px;
    }
}

@media (max-width: 768px) {
    .a-slide-panel {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    
    .a-form-row,
    .a-form-row-3 {
        grid-template-columns: 1fr;
    }
}
/* Switch Product header button */
#btn-open-switch-app {
    background: #1a73e8 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.3);
}
#btn-open-switch-app:hover {
    background: #1557b0 !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
}

/* Disabled slider checkbox */
.slider-checkbox-a.slider-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.slider-checkbox-a.slider-disabled input {
    cursor: not-allowed;
}

.slider-checkbox-a.slider-disabled .label {
    color: #9ca3af;
}

.slider-checkbox-a.slider-disabled .label:before {
    background: #e5e7eb !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.slider-checkbox-a.slider-disabled input:checked + .label:before {
    background: #9ca3af !important;
    box-shadow: none !important;
}

.slider-checkbox-a.slider-disabled .label:after {
    background: #d1d5db;
}

/* ========================================
   ADESIGN TOOLTIP COMPONENT
   ======================================== */
.a-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: #6b7280;
    margin-left: 8px;
    font-size: 14px;
}

.a-tooltip:hover {
    color: #3b82f6;
}

.a-tooltip .a-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    min-width: 200px;
    max-width: 320px;
    white-space: normal;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.a-tooltip .a-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.a-tooltip:hover .a-tooltip-content {
    visibility: visible;
    opacity: 1;
}

.a-tooltip .a-tooltip-title {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    color: #9ca3af;
}

/* Bottom placement variant */
.a-tooltip.a-tooltip-bottom .a-tooltip-content {
    bottom: auto;
    top: 125%;
}

.a-tooltip.a-tooltip-bottom .a-tooltip-content::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent #1f2937 transparent;
}

/* ========================================
   SLIDING PANEL (Standard + Wide variant)
   ======================================== */
.a-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.a-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.a-sliding-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 600px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.a-sliding-panel.active {
    transform: translateX(0);
}

.a-sliding-panel-wide {
    width: 850px;
}

@media (max-width: 900px) {
    .a-sliding-panel-wide {
        width: 100vw;
        max-width: 100vw;
    }
}

@media (max-width: 650px) {
    .a-sliding-panel {
        width: 100vw;
        max-width: 100vw;
    }
}

.a-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

.a-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.a-panel-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.a-panel-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.a-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ========================================
   INTERNET PLAN GRID STYLES
   ======================================== */
.a-table-internet-plans {
    table-layout: auto;
}

.a-table-internet-plans th {
    white-space: nowrap;
    padding: 12px 10px;
}

.a-table-internet-plans td {
    padding: 12px 10px;
    vertical-align: top;
}

.a-table-internet-plans .a-table-actions {
    text-align: right;
    white-space: nowrap;
}

.a-table-internet-plans .a-table-actions .btn-a {
    margin-left: 4px;
}

.a-plan-description {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    margin-top: 2px;
}

.a-plan-limits {
    font-size: 12px;
    line-height: 1.5;
}

.a-plan-limits .limit-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.a-plan-limits .limit-value {
    font-weight: 500;
    color: #374151;
}

.a-plan-limits .limit-period {
    color: #9ca3af;
    font-size: 11px;
}

.a-plan-limits .unlimited {
    color: #10b981;
    font-weight: 500;
}

.a-plan-price {
    font-weight: 600;
    color: #059669;
    font-size: 14px;
}

.a-plan-speed {
    font-size: 12px;
    color: #4b5563;
    font-weight: 500;
}

/* ========================================
   INTERNET PLAN PREVIEW WIDGET
   ======================================== */
.a-plan-preview {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    min-height: 80px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    max-width: 400px;
}

.a-plan-preview:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.a-plan-preview-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #e2e8f0;
    padding-right: 16px;
}

.a-plan-preview-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-left: 16px;
    min-width: 80px;
}

.a-plan-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.a-plan-preview-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.a-plan-preview-price {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
    line-height: 1;
}

.a-plan-preview-currency {
    font-size: 12px;
    color: #059669;
    font-weight: 500;
    margin-bottom: 2px;
}

.a-plan-preview-note {
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
    margin-top: 4px;
}

.a-plan-preview-free {
    font-family: 'Roboto Condensed', Roboto, Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   BOOTSTRAP SLIDER PRESERVATION
   ======================================== */
.slider-handle.min-slider-handle.round {
    background-color: #3b82f6;
    background-image: linear-gradient(to bottom, #60a5fa 0%, #3b82f6 100%);
}

.slider.slider-horizontal {
    width: 100% !important;
}

.slider-selection {
    background: #3b82f6;
}

.slider-track {
    background: #e5e7eb;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
 

/* ========================================
   GRID VALUE NUMBERS
   ======================================== */
.a-num {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.a-num-green {
    font-size: 14px;
    font-weight: 500;
    color: #10b981;
}

/* ========================================
   TOUCHSPIN - NATIVE NUMBER INPUT STYLE
   ======================================== */
.bootstrap-touchspin.input-group {
    display: inline-flex !important;
    align-items: stretch;
    width: auto;
}

.bootstrap-touchspin .form-control {
    border-right: none !important;
    border-radius: 5px 0 0 5px !important;
    flex: 1;
    width: auto !important;
    min-width: 0;
}

.bootstrap-touchspin .input-group-btn-vertical {
    display: flex;
    flex-direction: column;
    border: 1px solid #d1d5db;
    border-left: none;
    border-radius: 0 5px 5px 0;
    overflow: hidden;
    width: 18px;
    min-width: 18px;
    flex-shrink: 0;
}

.bootstrap-touchspin .input-group-btn-vertical .btn {
    background: #f9fafb;
    border: none;
    border-radius: 0 !important;
    padding: 0;
    width: 18px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.1s;
    box-shadow: none !important;
    line-height: 1;
}

.bootstrap-touchspin .input-group-btn-vertical .btn:first-child {
    border-bottom: 1px solid #d1d5db;
}

.bootstrap-touchspin .input-group-btn-vertical .btn:hover {
    background: #e5e7eb;
}

.bootstrap-touchspin .input-group-btn-vertical .btn i {
    font-size: 7px;
    color: #6b7280;
    line-height: 1;
}
 

/* ========================================
   A-NAV: Sidebar Navigation
   Prefix: a-nav-* | ADESIGN tokens
   ======================================== */

#leftmenu.a-nav,
#leftmenu.a-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#leftmenu.a-nav {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11.5px;
    font-weight: 400;
    padding: 8px 0;
}

#leftmenu.a-nav .a-nav-item {
    position: relative;
    margin: 0;
}

#leftmenu.a-nav .a-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 14px 8px 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

#leftmenu.a-nav .a-nav-link:focus {
    outline: none;
    box-shadow: none;
}

#leftmenu.a-nav .a-nav-link:hover {
    color: #374151;
    background-color: #f9fafb;
    border-left-color: #e5e7eb;
}

#leftmenu.a-nav .a-nav-item.is-active > .a-nav-link {
    color: #1e293b;
    background-color: #f1f5f9;
    border-left-color: #94a3b8;
    font-weight: 600;
}

#leftmenu.a-nav .a-nav-item.is-open > .a-nav-link {
    color: #374151;
    background-color: #f9fafb;
    border-left-color: #d1d5db;
}

#leftmenu.a-nav .a-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    min-width: 32px;
    font-size: 11px;
    color: #6b7280;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

#leftmenu.a-nav .a-nav-link:hover .a-nav-icon {
    color: #4b5563;
}

#leftmenu.a-nav .a-nav-item.is-active > .a-nav-link .a-nav-icon {
    color: #374151;
}

#leftmenu.a-nav .a-nav-item.is-open > .a-nav-link .a-nav-icon {
    color: #4b5563;
}

#leftmenu.a-nav .a-nav-label {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    font-size: 16px;
}

#leftmenu.a-nav .a-nav-arrow {
    margin-left: auto;
    font-size: 14px !important;
    color: #d1d5db;
    flex-shrink: 0;
    transform-origin: center center;
    transition: color 0.2s ease, transform 0.22s ease;
}

#leftmenu.a-nav .a-nav-item.is-open > .a-nav-link .a-nav-arrow {
    transform: rotate(90deg);
    color: #9ca3af;
}

#leftmenu.a-nav .a-nav-sub {
    padding: 0 0 6px 0;
}

#leftmenu.a-nav .has-sub > .a-nav-link {
    cursor: pointer;
}

#leftmenu.a-nav .a-nav-sub-link {
    display: block;
    padding: 6px 14px 6px 56px;
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-left: 3px solid transparent;
}

#leftmenu.a-nav .a-nav-sub-link:focus {
    outline: none;
    box-shadow: none;
}

#leftmenu.a-nav .a-nav-sub-link:hover {
    color: #374151;
    background-color: #f9fafb;
}

#leftmenu.a-nav .a-nav-sub-item.is-active > .a-nav-sub-link {
    color: #1e293b;
    font-weight: 500;
    background-color: #f1f5f9;
    border-left-color: #94a3b8;
}

/* ========================================
   A-NAV DARK: CloudStation dark sidebar variant
   ======================================== */

#leftmenu.a-nav.a-nav-dark {
    background: transparent;
}

#leftmenu.a-nav.a-nav-dark .a-nav-link {
    color: rgba(255,255,255,0.6);
    border-left-color: transparent;
}

#leftmenu.a-nav.a-nav-dark .a-nav-link:focus {
    outline: none;
    box-shadow: none;
}

#leftmenu.a-nav.a-nav-dark .a-nav-link:hover {
    color: rgba(255,255,255,0.9);
    background-color: rgba(255,255,255,0.07);
    border-left-color: rgba(255,255,255,0.2);
}

#leftmenu.a-nav.a-nav-dark .a-nav-item.is-active > .a-nav-link {
    color: #fff;
    background-color: rgba(255,255,255,0.12);
    border-left-color: rgba(255,255,255,0.6);
    font-weight: 600;
}

#leftmenu.a-nav.a-nav-dark .a-nav-item.is-open > .a-nav-link {
    color: rgba(255,255,255,0.85);
    background-color: rgba(255,255,255,0.05);
    border-left-color: rgba(255,255,255,0.15);
}

#leftmenu.a-nav.a-nav-dark .a-nav-icon {
    color: rgba(255,255,255,0.5);
}

#leftmenu.a-nav.a-nav-dark .a-nav-link:hover .a-nav-icon {
    color: rgba(255,255,255,0.8);
}

#leftmenu.a-nav.a-nav-dark .a-nav-item.is-active > .a-nav-link .a-nav-icon {
    color: rgba(255,255,255,0.95);
}

#leftmenu.a-nav.a-nav-dark .a-nav-item.is-open > .a-nav-link .a-nav-icon {
    color: rgba(255,255,255,0.7);
}

#leftmenu.a-nav.a-nav-dark .a-nav-arrow {
    color: rgba(255,255,255,0.3);
}

#leftmenu.a-nav.a-nav-dark .a-nav-item.is-open > .a-nav-link .a-nav-arrow {
    color: rgba(255,255,255,0.6);
}

#leftmenu.a-nav.a-nav-dark .a-nav-sub-link {
    color: rgba(255,255,255,0.5);
    border-left-color: transparent;
}

#leftmenu.a-nav.a-nav-dark .a-nav-sub-link:focus {
    outline: none;
    box-shadow: none;
}

#leftmenu.a-nav.a-nav-dark .a-nav-sub-link:hover {
    color: rgba(255,255,255,0.85);
    background-color: rgba(255,255,255,0.07);
}

#leftmenu.a-nav.a-nav-dark .a-nav-sub-item.is-active > .a-nav-sub-link {
    color: #fff;
    font-weight: 500;
    background-color: rgba(255,255,255,0.1);
    border-left-color: rgba(255,255,255,0.5);
}

/* ========================================
   A-STAT: Stat Tile Grid
   ======================================== */

.a-stat-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.a-stat-tile {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 13px 14px;
    text-decoration: none;
    color: inherit;
    min-height: 78px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.a-stat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.a-stat-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin: 0;
    line-height: 1.2;
}

.a-stat-tile .a-stat-value {
    display: block;
    color: #111827;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.05;
    margin-top: 9px;
}

.a-stat-tile .a-stat-suffix {
    font-size: 0.52em;
    font-weight: 500;
    color: #6b7280;
    vertical-align: baseline;
}

/* Responsive */
@media (max-width: 1500px) {
    .a-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .a-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .a-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.a-stat-sfx {
    font-size: 0.52em;
    font-weight: 500;
    color: #6b7280;
    vertical-align: baseline;
}

/* Hide old SmartAdmin collapse signs inside a-nav menus */
#leftmenu.a-nav .collapse-sign,
#leftmenu.a-nav b.collapse-sign {
    display: none !important;
}

/* ========================================
   CENTERED OVERLAY PAGES
   (SignIn, ForgotPassword, error pages, action confirmations, etc.)
   ======================================== */

/* Full-screen flex centering wrapper */
.a-centered-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 50px);
    width: 100%;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* White card floating in the center — default 460px, override with style="max-width:Xpx" */
.a-centered-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    padding: 36px 40px 32px;
    width: 100%;
    max-width: 460px;
    box-sizing: border-box;
}

/* Wider variant — 600px */
.a-centered-box-md {
    max-width: 600px;
}

/* Narrow variant — 360px */
.a-centered-box-sm {
    max-width: 360px;
}

/* Box heading */
.a-box-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 0 0 8px 0;
    padding: 0 0 16px 0;
    letter-spacing: -0.3px;
}

/* Optional subtitle below title */
.a-box-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 24px 0;
}

/* Icon-prefixed input row */
.a-box-field {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s;
    margin-bottom: 14px;
}
.a-box-field:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.a-box-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 15px;
    border-right: 1px solid #e5e7eb;
    background: #f9fafb;
    align-self: stretch;
}
.a-box-field input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 14px;
    color: #111827;
    background: transparent;
    box-shadow: none !important;
}
.a-box-field input::placeholder {
    color: #9ca3af;
}

/* Red border on field when jQuery Validate marks input as error */
.a-box-field:has(input.error) {
    border-color: #ef4444;
}

/* Validation error label — injected by jQuery Validate after .a-box-field */
.a-box-error-label {
    display: block;
    font-size: 12px;
    color: #ef4444;
    margin: -8px 0 10px 4px;
    font-style: italic;
}

/* "or" divider with horizontal lines */
.a-box-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 13px;
}
.a-box-divider::before,
.a-box-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Gray footer strip inside the box — e.g. Sign Up area */
.a-box-footer {
    border-top: 1px solid #e5e7eb;
    margin: 24px -40px -32px;
    padding: 20px 40px;
    border-radius: 0 0 12px 12px;
    background: #f9fafb;
    text-align: center;
}

/* Aliases kept for backward compatibility */
.a-auth-screen  { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 50px); width: 100%; padding: 24px 16px; box-sizing: border-box; }
.a-auth-box     { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.10); padding: 36px 40px 32px; width: 100%; max-width: 460px; box-sizing: border-box; }
.a-auth-title   { font-size: 22px; font-weight: 700; color: #111827; text-align: center; margin: 0 0 24px 0; letter-spacing: -0.3px; }
.a-auth-field   { display: flex; align-items: center; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; overflow: hidden; transition: border-color 0.2s; margin-bottom: 14px; }
.a-auth-field:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.a-auth-field-icon { display: flex; align-items: center; justify-content: center; width: 42px; flex-shrink: 0; color: #9ca3af; font-size: 15px; border-right: 1px solid #e5e7eb; background: #f9fafb; align-self: stretch; }
.a-auth-field input { flex: 1; border: none; outline: none; padding: 10px 12px; font-size: 14px; color: #111827; background: transparent; box-shadow: none !important; }
.a-auth-field input::placeholder { color: #9ca3af; }
.a-auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: #9ca3af; font-size: 13px; }
.a-auth-divider::before, .a-auth-divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }
.a-auth-footer  { border-top: 1px solid #e5e7eb; margin: 24px -40px -32px; padding: 20px 40px; border-radius: 0 0 12px 12px; background: #f9fafb; text-align: center; }

/* ========================================
   IMAGE PICKER (SmartForm Builder)
   ======================================== */

.a-img-picker-panel {
    position: fixed;
    top: 0;
    right: -720px;
    width: 720px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transition: right 0.28s ease;
}

.a-img-picker-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.a-img-picker-title {
    font-weight: 700;
    font-size: 15px;
    flex: 1;
}

.a-img-picker-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #6b7280;
    line-height: 1;
    padding: 2px 6px;
}

.a-img-picker-toolbar {
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.a-img-picker-search {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
}

.a-img-picker-toolbar .a-multiswitch-sm {
    flex-shrink: 0;
    white-space: nowrap;
}

.a-img-picker-toolbar .a-multiswitch-sm .a-multiswitch-item {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 10px;
    min-width: 90px;
    justify-content: center;
}

.a-img-picker-grid {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-content: start;
}

.a-img-picker-grid--categories {
    grid-template-columns: repeat(2, 1fr);
}

.a-img-picker-item {
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s;
    user-select: none;
    min-height: 130px;
}

.a-img-picker-item:hover {
    border-color: #bfdbfe;
}

.a-img-picker-item.is-selected {
    border-color: #2563eb;
}

.a-img-picker-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f3f4f6;
}

.a-img-picker-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.a-img-picker-label {
    padding: 3px 5px;
    font-size: 10px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #f8fafc;
}

.a-img-picker-category {
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
    user-select: none;
    min-height: 48px;
}

.a-img-picker-category:hover {
    background: #f9fafb;
}

.a-img-picker-cat-name {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.a-img-picker-cat-count {
    font-size: 12px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 999px;
}

.a-img-picker-back {
    background: none;
    border: none;
    cursor: pointer;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.a-img-picker-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: #f9fafb;
}

.a-img-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 99998;
    display: none;
}

/* ========================================
   MODAL OVERLAY
   ======================================== */
.a-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.a-modal-panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: a-modal-in 0.18s ease-out;
}
@keyframes a-modal-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1); }
}
.a-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.a-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.a-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.a-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}
.a-modal-body {
    padding: 20px;
}
.a-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 20px 16px;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
}

.tab-content-panel {
    margin-top: 20px;
}
}