/* ==========================================
   CSS Variables
   ========================================== */
:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --header-height: 56px;
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e2e8f0;
    --header-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --hover-bg: #f1f5f9;
    --active-bg: #dbeafe;
}

/* ==========================================
   Base Styles
   ========================================== */
body, html {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

/* ==========================================
   App Container Layout
   ========================================== */
#app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================
   Sidebar Styles
   ========================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1500;
    transition: width 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Sidebar Logo */
.sidebar-logo {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--sidebar-border);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo img {
    max-height: 45px;
    height: auto;
    width: auto;
    transition: all 0.3s ease;
}

.sidebar-logo .logo-full {
    max-width: 140px;
}

.sidebar-logo .logo-small {
    max-width: 40px;
    display: none !important;
}

.sidebar.collapsed .sidebar-logo .logo-full {
    display: none !important;
}

.sidebar.collapsed .sidebar-logo .logo-small {
    display: block !important;
}

/* User Profile Section */
.sidebar-user-profile {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--sidebar-border);
}

.user-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .sidebar-user-profile {
    justify-content: center;
    padding: 12px;
}

/* Navigation Section */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.sidebar-nav .nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin: 4px 8px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav .nav-link:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar-nav .nav-link.active {
    background: var(--active-bg);
    color: var(--primary-dark);
}

.sidebar-nav .nav-link .nav-icon {
    width: 24px;
    min-width: 24px;
    font-size: 18px;
    color: var(--text-secondary);
    margin-right: 12px;
    text-align: center;
    transition: color 0.2s ease;
}

.sidebar-nav .nav-link:hover .nav-icon,
.sidebar-nav .nav-link.active .nav-icon {
    color: var(--primary-color);
}

.sidebar-nav .nav-link .nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease;
}

/* Collapsed sidebar navigation */
.sidebar.collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 12px 8px;
}

.sidebar.collapsed .sidebar-nav .nav-link .nav-icon {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-nav .nav-link .nav-text {
    display: none;
}

/* ==========================================
   Main Wrapper
   ========================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, width 0.3s ease;
    background: #f8fafc;
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* ==========================================
   Top Header
   ========================================== */
.top-header {
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1400;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 12px;
    margin-right: 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sidebar-toggle:hover {
    background: var(--hover-bg);
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Apply Changes Button */
.btn-apply-changes {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.btn-apply-changes:hover {
    background: var(--primary-dark);
}

.btn-apply-changes i {
    font-size: 14px;
}

/* ==========================================
   Main Content Area
   ========================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content {
    flex-grow: 1;
    padding: 20px;
    line-height: 1.5;
}

.content h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.content-block {
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 20px;
}

/* ==========================================
   Footer
   ========================================== */
.content-footer {
    display: block;
    color: var(--text-secondary);
    border-top: 1px solid var(--sidebar-border);
    padding: 16px 20px;
    background: var(--header-bg);
    font-size: 13px;
}

.content-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.content-footer a:hover {
    text-decoration: underline;
}

/* ==========================================
   Sidebar Overlay (Mobile)
   ========================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1499;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ==========================================
   Responsive Styles
   ========================================== */
@media screen and (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.collapsed ~ .main-wrapper {
        margin-left: 0;
        width: 100%;
    }
}

@media screen and (min-width: 600px) {
    .content-block {
        margin-left: 40px;
        margin-right: 40px;
    }
}

@media screen and (min-width: 1280px) {
    .content {
        padding: 24px 40px;
    }
}

/* ==========================================
   DevExtreme Card Overrides
   ========================================== */
.dx-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background-color: #fff;
    margin: 4px;
}

.dx-card.wide-card {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-right: 0;
    border-left: 0;
}

/* ==========================================
   Scrollbar Styling
   ========================================== */
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================
   Utility Classes
   ========================================== */
.layout-body-hidden {
    visibility: hidden;
}

.responsive-paddings {
    padding: 20px;
}

@media screen and (min-width: 1280px) {
    .responsive-paddings {
        padding: 40px;
    }
}

/* ==========================================
   Login Page Styles
   ========================================== */
.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* Left Side - Branding */
.login-branding {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    color: #ffffff;
}

.branding-content {
    max-width: 400px;
    text-align: center;
}

.branding-logo {
    max-width: 180px;
    max-height: 80px;
    margin-bottom: 24px;
}

.branding-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #ffffff;
}

.branding-subtitle {
    font-size: 16px;
    color: #94a3b8;
    margin: 0 0 40px 0;
    line-height: 1.6;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #e2e8f0;
}

.feature-item i {
    font-size: 20px;
    color: #60a5fa;
    width: 24px;
    text-align: center;
}

/* Right Side - Login Form */
.login-form-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f8fafc;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.login-header p {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Form Styles */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.login-form .form-label i {
    font-size: 14px;
    color: #64748b;
}

.login-form .form-control {
    height: 50px;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.login-form .form-control::placeholder {
    color: #94a3b8;
}

.login-form .form-control.is-invalid {
    border-color: #ef4444;
}

.login-form .form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.login-form .invalid-feedback {
    display: none;
    font-size: 13px;
    color: #ef4444;
    margin-top: 6px;
}

.login-form .form-control.is-invalid ~ .invalid-feedback,
.login-form .password-input-wrapper:has(.is-invalid) ~ .invalid-feedback {
    display: block;
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #3b82f6;
}

/* Login Button */
.btn-login {
    width: 100%;
    height: 52px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-login .btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Alert Messages */
.login-form-wrapper .alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-form-wrapper .alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.login-form-wrapper .alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Footer */
.login-footer {
    margin-top: 32px;
    text-align: center;
}

.footer-links {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.footer-links a {
    color: #3b82f6;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links .separator {
    margin: 0 8px;
    color: #cbd5e1;
}

.login-footer .uptime {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Responsive - Mobile */
@media screen and (max-width: 991.98px) {
    .login-container {
        flex-direction: column;
    }

    .login-branding {
        padding: 40px 24px;
        min-height: auto;
    }

    .branding-content {
        max-width: 100%;
    }

    .branding-title {
        font-size: 28px;
    }

    .branding-features {
        display: none;
    }

    .login-form-container {
        padding: 32px 24px;
    }
}

@media screen and (max-width: 575.98px) {
    .login-branding {
        padding: 32px 20px;
    }

    .branding-logo {
        max-width: 120px;
    }

    .branding-title {
        font-size: 24px;
    }

    .branding-subtitle {
        font-size: 14px;
        margin-bottom: 0;
    }

    .login-form-container {
        padding: 24px 20px;
    }

    .login-header h2 {
        font-size: 24px;
    }
}

/* Login Success Overlay */
.login-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-content {
    text-align: center;
    color: #ffffff;
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.success-icon i {
    font-size: 36px;
    color: #ffffff;
}

.success-content h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.success-content p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 24px 0;
}

.success-loader {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.success-loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    animation: loading 1s ease forwards;
}

@keyframes loading {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* ==========================================
   Dashboard Styles
   ========================================== */
.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header .page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.dashboard-header .page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.dashboard-header .last-updated {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--sidebar-border);
}

.dashboard-header .last-updated i {
    color: #10b981;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media screen and (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* KPI Cards - Enhanced */
.kpi-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.kpi-card-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    opacity: 0.1;
    background: radial-gradient(circle at top right, currentColor 0%, transparent 70%);
    pointer-events: none;
}

.kpi-card-content {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.kpi-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.kpi-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.kpi-icon i {
    font-size: 26px;
    color: #ffffff;
}

.kpi-icon-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 20px;
    opacity: 0.3;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.15;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

.kpi-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.kpi-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.kpi-footer {
    padding: 12px 24px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.04));
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.kpi-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.kpi-link i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.kpi-link:hover i {
    transform: translateX(4px);
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.kpi-trend i {
    font-size: 14px;
}

.kpi-live-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ef4444;
    text-transform: uppercase;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* KPI Color Variants - Blue */
.kpi-blue .kpi-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 8px 16px -4px rgba(59, 130, 246, 0.4);
}

.kpi-blue .kpi-icon-ring {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.kpi-blue .kpi-card-bg {
    color: #3b82f6;
}

.kpi-blue .kpi-value {
    color: #1e40af;
}

.kpi-blue .kpi-link {
    color: #3b82f6;
}

.kpi-blue .kpi-link:hover {
    color: #1d4ed8;
}

/* KPI Color Variants - Green */
.kpi-green .kpi-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 16px -4px rgba(16, 185, 129, 0.4);
}

.kpi-green .kpi-icon-ring {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.kpi-green .kpi-card-bg {
    color: #10b981;
}

.kpi-green .kpi-value {
    color: #047857;
}

.kpi-green .kpi-link {
    color: #10b981;
}

.kpi-green .kpi-link:hover {
    color: #059669;
}

/* KPI Color Variants - Orange */
.kpi-orange .kpi-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 8px 16px -4px rgba(245, 158, 11, 0.4);
}

.kpi-orange .kpi-icon-ring {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.kpi-orange .kpi-card-bg {
    color: #f59e0b;
}

.kpi-orange .kpi-value {
    color: #b45309;
}

.kpi-orange .kpi-link {
    color: #f59e0b;
}

.kpi-orange .kpi-link:hover {
    color: #d97706;
}

/* KPI Color Variants - Red */
.kpi-red .kpi-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 8px 16px -4px rgba(239, 68, 68, 0.4);
}

.kpi-red .kpi-icon-ring {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.kpi-red .kpi-card-bg {
    color: #ef4444;
}

.kpi-red .kpi-value {
    color: #b91c1c;
}

.kpi-red .kpi-trend {
    color: #10b981;
}

/* Purple KPI variant */
.kpi-purple .kpi-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 8px 16px -4px rgba(139, 92, 246, 0.4);
}

.kpi-purple .kpi-icon-ring {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.kpi-purple .kpi-card-bg {
    color: #8b5cf6;
}

.kpi-purple .kpi-value {
    color: #6d28d9;
}

.kpi-purple .kpi-trend {
    color: #7c3aed;
}

/* KPI Responsive */
@media screen and (max-width: 768px) {
    .kpi-card-content {
        padding: 20px;
    }

    .kpi-icon {
        width: 52px;
        height: 52px;
    }

    .kpi-icon i {
        font-size: 22px;
    }

    .kpi-value {
        font-size: 26px;
    }

    .kpi-footer {
        padding: 10px 20px;
    }
}

/* Dashboard Row */
.dashboard-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-col-4 {
    flex: 0 0 calc(33.333% - 14px);
    max-width: calc(33.333% - 14px);
}

.dashboard-col-6 {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
}

.dashboard-col-8 {
    flex: 0 0 calc(66.666% - 7px);
    max-width: calc(66.666% - 7px);
}

@media screen and (max-width: 991.98px) {
    .dashboard-row {
        flex-direction: column;
    }

    .dashboard-col-4,
    .dashboard-col-6,
    .dashboard-col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Dashboard Cards */
.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--sidebar-border);
    margin-bottom: 20px;
    overflow: hidden;
}

.dashboard-card.alert-card {
    border-left: 4px solid #f59e0b;
}

.dashboard-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sidebar-border);
    background: #fafbfc;
}

.dashboard-card .card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.dashboard-card .card-title i {
    font-size: 16px;
    color: var(--primary-color);
}

.dashboard-card .card-body {
    padding: 20px;
}

.dashboard-card .chart-container {
    min-height: 350px;
}

/* Section Header */
.section-header {
    margin: 32px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--sidebar-border);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

/* Text color utilities */
.text-warning {
    color: #f59e0b !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-success {
    color: #10b981 !important;
}

/* DevExtreme Grid Enhancements */
.dashboard-card .dx-datagrid {
    border: none;
}

.dashboard-card .dx-datagrid-headers {
    border-bottom: 2px solid var(--sidebar-border);
}

.dashboard-card .dx-datagrid-rowsview {
    border: none;
}

.dashboard-card .dx-toolbar {
    padding: 0;
    margin-bottom: 12px;
}

/* ==========================================
   Page Styles (List Pages)
   ========================================== */
.page-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header .page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header .page-title i {
    color: var(--primary-color);
    font-size: 24px;
}

.page-header .page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0 0 0;
}

.page-header .header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-action.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
}

.btn-action.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.btn-action.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--sidebar-border);
}

.btn-action.btn-secondary:hover {
    background: var(--hover-bg);
    text-decoration: none;
}

.btn-action.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.btn-action.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    text-decoration: none;
}

.btn-action i {
    font-size: 14px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.status-badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge i {
    font-size: 10px;
}

/* Grid Link */
.grid-link {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.grid-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Grid Action Buttons */
.grid-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 0 2px;
}

.grid-action-btn:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
    text-decoration: none;
}

.grid-action-btn.grid-action-danger:hover {
    background: #fee2e2;
    color: #ef4444;
}

.grid-action-btn i {
    font-size: 14px;
}

/* Form Page Styles */
.form-page-header {
    margin-bottom: 24px;
}

.form-page-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-page-header .breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-page-header .breadcrumb a:hover {
    text-decoration: underline;
}

.form-page-header .breadcrumb .separator {
    color: var(--text-muted);
}

/* Form Card */
.form-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--sidebar-border);
    margin-bottom: 20px;
    overflow: hidden;
}

.form-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--sidebar-border);
    background: #fafbfc;
}

.form-card .card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.form-card .card-title i {
    color: var(--primary-color);
}

.form-card .card-body {
    padding: 24px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--sidebar-border);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
}

/* Button Group Dropdown */
.btn-group-dropdown {
    position: relative;
    display: inline-block;
}

.btn-group-dropdown .dropdown-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.btn-group-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.btn-group-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid var(--sidebar-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    padding: 6px 0;
}

.btn-group-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-group-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.btn-group-dropdown .dropdown-item:hover {
    background: var(--hover-bg);
    text-decoration: none;
}

.btn-group-dropdown .dropdown-item i {
    color: var(--text-secondary);
    width: 16px;
    text-align: center;
}

/* Rule Type Badges */
.rule-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
}

.rule-type-badge.rule-type-did {
    background: #dbeafe;
    color: #1d4ed8;
}

.rule-type-badge.rule-type-prefix {
    background: #fef3c7;
    color: #92400e;
}

.rule-type-badge i {
    font-size: 10px;
}

/* Success Button */
.btn-action.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.btn-action.btn-success:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Icon Button */
.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--hover-bg);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Rules Summary Grid */
.rules-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--sidebar-border);
    position: relative;
    transition: all 0.2s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.summary-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-icon i {
    font-size: 22px;
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-action {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    opacity: 0;
}

.summary-card:hover .summary-action {
    opacity: 1;
}

.summary-action:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.summary-action i {
    font-size: 12px;
}

/* Summary Card Variants */
.summary-card-total .summary-icon {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.summary-card-total .summary-icon i {
    color: #64748b;
}

.summary-card-did .summary-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.summary-card-did .summary-icon i {
    color: #3b82f6;
}

.summary-card-did .summary-value {
    color: #1d4ed8;
}

.summary-card-prefix .summary-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.summary-card-prefix .summary-icon i {
    color: #f59e0b;
}

.summary-card-prefix .summary-value {
    color: #92400e;
}

.summary-card-resources .summary-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.summary-card-resources .summary-icon i {
    color: #22c55e;
}

.summary-card-resources .summary-value {
    color: #166534;
}

/* Resources Summary Grid */
.resources-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* Summary Card Variants - Active */
.summary-card-active .summary-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.summary-card-active .summary-icon i {
    color: #22c55e;
}

.summary-card-active .summary-value {
    color: #166534;
}

/* Summary Card Variants - Inactive */
.summary-card-inactive .summary-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.summary-card-inactive .summary-icon i {
    color: #ef4444;
}

.summary-card-inactive .summary-value {
    color: #991b1b;
}

/* Summary Card Variants - Capacity */
.summary-card-capacity .summary-icon {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.summary-card-capacity .summary-icon i {
    color: #6366f1;
}

.summary-card-capacity .summary-value {
    color: #4338ca;
}

/* CDRs Summary Grid */
.cdrs-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* Summary Card Variants - Inbound */
.summary-card-inbound .summary-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.summary-card-inbound .summary-icon i {
    color: #22c55e;
}

.summary-card-inbound .summary-value {
    color: #166534;
}

/* Summary Card Variants - Outbound */
.summary-card-outbound .summary-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.summary-card-outbound .summary-icon i {
    color: #3b82f6;
}

.summary-card-outbound .summary-value {
    color: #1d4ed8;
}

/* Summary Card Variants - Duration */
.summary-card-duration .summary-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.summary-card-duration .summary-icon i {
    color: #f59e0b;
}

.summary-card-duration .summary-value {
    color: #92400e;
}

/* Responsive Summary Grid */
@media (max-width: 1200px) {
    .rules-summary-grid,
    .resources-summary-grid,
    .cdrs-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rules-summary-grid,
    .resources-summary-grid,
    .cdrs-summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-card {
        padding: 16px;
    }

    .summary-value {
        font-size: 24px;
    }

    .summary-action {
        opacity: 1;
    }
}

/* Card Header Stats */
.card-header-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-header-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.card-header-stats .stat-item i {
    color: var(--text-muted);
}

/* ==========================================
   CDR Page Styles
   ========================================== */

/* Filters Card */
.filters-card .card-header {
    cursor: pointer;
    user-select: none;
}

.filters-card .card-header:hover {
    background: var(--hover-bg);
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 20px;
}

.filter-status.active {
    background: #dbeafe;
    color: #1d4ed8;
}

.filter-status i {
    font-size: 11px;
}

.card-collapse-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.card-collapse-btn:hover {
    background: var(--hover-bg);
}

.card-collapse-btn i {
    transition: transform 0.3s ease;
}

.card-collapse-btn.collapsed i {
    transform: rotate(180deg);
}

/* Filters Body */
.filters-body {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.filters-body.collapsed {
    max-height: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-actions {
    padding-top: 8px;
    border-top: 1px solid var(--sidebar-border);
}

/* Direction Badges */
.direction-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.direction-badge.direction-inbound {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.direction-badge.direction-inbound i {
    color: #22c55e;
}

.direction-badge.direction-outbound {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.direction-badge.direction-outbound i {
    color: #3b82f6;
}

/* Duration Badge */
.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: #f8fafc;
    border-radius: 4px;
}

.duration-badge i {
    font-size: 10px;
    color: var(--text-muted);
}

/* Call Status Badges */
.call-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-status-badge.status-success {
    background: #dcfce7;
    color: #166534;
}

.call-status-badge.status-success i {
    color: #22c55e;
}

.call-status-badge.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.call-status-badge.status-warning i {
    color: #f59e0b;
}

.call-status-badge.status-info {
    background: #e0e7ff;
    color: #3730a3;
}

.call-status-badge.status-info i {
    color: #6366f1;
}

.call-status-badge.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.call-status-badge.status-error i {
    color: #ef4444;
}

/* CDR Grid Enhancements */
#gridCallsDx .dx-datagrid-headers {
    background: #f8fafc;
}

#gridCallsDx .dx-datagrid-content .dx-datagrid-table .dx-row > td {
    vertical-align: middle;
}

/* Filter Form Styling */
#FiltersFormDx .dx-field-item-label-text {
    font-weight: 500;
    color: var(--text-primary);
}

#FiltersFormDx .dx-checkbox-text {
    color: var(--text-secondary);
}

/* Responsive CDR Page */
@media (max-width: 768px) {
    .direction-badge {
        padding: 3px 8px;
        font-size: 10px;
    }

    .call-status-badge {
        max-width: 100px;
        font-size: 9px;
    }

    .duration-badge {
        font-size: 11px;
    }

    .filter-status {
        display: none;
    }
}

/* ==========================================
   DID Transfer Page Styles
   ========================================== */

/* Transfer Panels Grid */
.transfer-panels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .transfer-panels {
        grid-template-columns: 1fr;
    }
}

.transfer-panel {
    display: flex;
    flex-direction: column;
}

.transfer-panel .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Step Badge */
.step-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Description */
.form-description {
    margin-bottom: 16px;
}

.form-description p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

/* Form Actions */
.form-actions {
    margin-top: auto;
    padding-top: 16px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Results Count */
.results-count {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.results-count i {
    color: var(--primary-color);
}

/* Transfer Instructions */
.transfer-instructions {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #bae6fd;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.instruction-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.instruction-item span:last-child {
    font-size: 13px;
    color: #1e40af;
}

@media (max-width: 992px) {
    .transfer-instructions {
        flex-direction: column;
        gap: 12px;
    }
}

/* Selection Badge */
.selection-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.selection-badge.selected {
    color: #22c55e;
}

.selection-badge.selected i {
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}
