/* ==========================================================================
   DesktopCenter - Comprehensive Theme & RTL Styling
   Palette: Atlassian Blue (#0052CC), Accents (#FF8B00, #FF5630),
            Background (#F4F5F7), Surface (#FFFFFF), Text (#172B4D)
   ========================================================================== */

:root {
    --dc-primary: #0052CC;
    --dc-primary-hover: #0747A6;
    --dc-primary-light: #DEEBFF;
    --dc-secondary: #FF8B00;
    --dc-accent-red: #FF5630;
    --dc-accent-orange: #FF8B00;
    --dc-accent-green: #36B37E;
    --dc-navy: #091E42;
    --dc-navy-subtle: #172B4D;
    --dc-navy-light: #253858;
    --dc-text-primary: #172B4D;
    --dc-text-secondary: #5E6C84;
    --dc-bg-page: #F4F5F7;
    --dc-bg-surface: #FFFFFF;
    --dc-border: #DFE1E6;
    --dc-border-subtle: #EBECF0;
}

html, body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    direction: rtl;
    text-align: right;
    background-color: var(--dc-bg-page);
    color: var(--dc-text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* MudBlazor Global RTL & Font Overrides */
.mud-typography,
.mud-button-root,
.mud-input,
.mud-input-control,
.mud-nav-link,
.mud-chip,
.mud-tooltip,
.mud-dialog,
.mud-snackbar {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Layout & Spacing */
.dc-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dc-main-content {
    flex: 1 0 auto;
    padding-top: 72px; /* Space for fixed AppBar */
    min-height: calc(100vh - 72px);
}

/* AppBar & Header */
.dc-appbar {
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    background-color: #FFFFFF !important;
    color: var(--dc-text-primary) !important;
    border-bottom: 1px solid var(--dc-border);
    box-shadow: 0 1px 3px rgba(9, 30, 66, 0.08) !important;
    transition: all 0.2s ease-in-out;
}

.dc-brand-link {
    text-decoration: none !important;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.dc-brand-icon {
    border-radius: 8px;
    flex-shrink: 0;
}

.dc-brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: normal;
    line-height: 1.2;
    white-space: nowrap;
}

.dc-brand-title {
    color: var(--dc-navy);
}

.dc-brand-accent {
    color: var(--dc-primary);
}

.dc-brand-subtitle {
    font-size: 0.72rem;
    color: var(--dc-text-secondary);
    font-weight: 500;
    line-height: 1;
    margin-top: 2px;
    white-space: nowrap;
}

/* Navigation Links */
.dc-short-label {
    display: none;
}

.dc-full-label {
    display: inline;
}

.dc-nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 1;
}

@media (min-width: 1400px) {
    .dc-nav-links {
        gap: 1rem;
    }
}

@media (max-width: 1400px) {
    .dc-short-label {
        display: inline !important;
    }
    .dc-full-label {
        display: none !important;
    }
    .dc-brand-subtitle {
        display: none !important;
    }
    .dc-nav-extra {
        display: none !important;
    }
    .dc-nav-links {
        gap: 0.35rem !important;
    }
    .dc-nav-link {
        font-size: 0.82rem !important;
        padding: 0.2rem 0.35rem !important;
    }
}

.dc-nav-link {
    color: var(--dc-text-primary) !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.dc-nav-link:hover {
    color: var(--dc-primary) !important;
    background-color: var(--dc-primary-light);
}

.dc-flagship-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.dc-flagship-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.dc-badge-pill {
    background: linear-gradient(135deg, #FF8B00, #FF5630);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Header Buttons */
.dc-btn {
    font-weight: 600 !important;
    border-radius: 4px !important;
    text-transform: none !important;
    white-space: nowrap !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.dc-btn-trial {
    background-color: var(--dc-primary) !important;
    color: #FFFFFF !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 14px !important;
}

.dc-btn-trial:hover {
    background-color: var(--dc-primary-hover) !important;
}

.dc-btn-login {
    border-color: var(--dc-border) !important;
    color: var(--dc-navy-subtle) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

.dc-btn-login:hover {
    background-color: var(--dc-primary-light) !important;
    border-color: var(--dc-primary) !important;
    color: var(--dc-primary) !important;
}

.dc-btn-logout {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

.dc-btn-signup {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

.dc-btn-dashboard {
    background-color: var(--dc-primary) !important;
    color: #FFFFFF !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

.dc-btn-dashboard:hover {
    background-color: var(--dc-primary-hover) !important;
}

.dc-org-chip {
    border-color: var(--dc-border) !important;
    color: var(--dc-navy-subtle) !important;
    height: 28px !important;
    flex-shrink: 0 !important;
}

/* Drawer Navigation */
.dc-mobile-drawer {
    width: 280px !important;
    max-width: 85vw !important;
}

.dc-drawer-content {
    background-color: #FFFFFF;
}

.dc-drawer-subtitle {
    font-size: 0.75rem;
    color: var(--dc-text-secondary);
}

.dc-navmenu-list .mud-nav-link {
    font-size: 0.95rem;
    border-radius: 6px;
    margin-bottom: 2px;
}

.dc-chip-special {
    font-size: 0.7rem !important;
    height: 20px !important;
    background: linear-gradient(135deg, #FF8B00, #FF5630) !important;
    color: #FFFFFF !important;
}

/* Corporate Persian Footer */
.dc-footer {
    background-color: var(--dc-navy);
    color: #DEEBFF;
    margin-top: auto;
    border-top: 3px solid var(--dc-primary);
}

.dc-footer-top {
    padding: 3.5rem 1rem 2.5rem;
}

.dc-footer-heading {
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.dc-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 2px;
    background-color: var(--dc-secondary);
    border-radius: 2px;
}

.dc-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dc-footer-link {
    color: #B3D4FF !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease, transform 0.15s ease;
}

.dc-footer-link:hover {
    color: #FFFFFF !important;
    transform: translateX(-4px);
}

.dc-footer-summary {
    color: #B3D4FF;
    font-size: 0.875rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.dc-footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #DEEBFF;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.dc-footer-contact-icon {
    color: var(--dc-secondary);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.dc-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 1rem;
    color: #8993A4;
    font-size: 0.8125rem;
}

.dc-footer-bottom-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.dc-footer-bottom-link {
    color: #8993A4 !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.dc-footer-bottom-link:hover {
    color: #FFFFFF !important;
}

/* Blazor Error UI Permanent Suppression */
#blazor-error-ui {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    display: none !important;
}

/* Global Responsive Media Defaults */
img, svg, video, canvas, audio, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

/* Alignment & Spacing Utilities */
.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

.text-start {
    text-align: start !important;
}

.text-end {
    text-align: end !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Feature Card Preview Screenshots */
.dc-feature-preview-img {
    width: 100% !important;
    height: 260px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* Blog Reader Article Hero Cover */
.dc-blog-cover-box {
    position: relative;
    width: 100%;
    background-color: #091E42;
}

.dc-blog-reader-cover {
    width: 100% !important;
    height: 420px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

@media (max-width: 960px) {
    .dc-blog-reader-cover {
        height: 300px !important;
    }
}

@media (max-width: 600px) {
    .dc-blog-reader-cover {
        height: 220px !important;
    }
}

/* Closed Drawer Safety: Completely eliminate closed drawer bleeding */
.mud-drawer.mud-drawer--closed {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* RTL Directional Icon Mirroring */
.dc-btn-login .mud-button-icon-start {
    transform: scaleX(-1);
}

.dc-btn-send .mud-button-icon-start,
.dc-send-btn .mud-button-icon-start,
.dc-icon-rtl-send {
    transform: scaleX(-1);
}

/* Persian Typography Protection */
* {
    letter-spacing: normal !important;
}

.mud-typography,
.mud-button-root,
.mud-button-label,
.mud-typography-button,
.mud-typography-overline,
.mud-chip,
.mud-chip-text,
.mud-input,
.mud-input-control,
.mud-nav-link,
.mud-tab {
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Services Lifecycle Steps 5-Column Grid */
@media (min-width: 960px) {
    .dc-lifecycle-grid {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1.5rem !important;
    }
    .dc-lifecycle-grid > * {
        max-width: 100% !important;
        flex-basis: auto !important;
        width: 100% !important;
    }
}

/* Modern Dark/Blue Brand Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #091E42;
}

::-webkit-scrollbar-thumb {
    background: #0052CC;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0747A6;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #0052CC #091E42;
}

/* Form Validation Rules */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Headings Focus Outline Reset */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus {
    outline: none !important;
}

/* ==========================================================================
   LTR Input Direction & Alignment in RTL Context
   Prevents email addresses (e.g. 1@sharklasers.com), passwords, phone numbers,
   Server IDs, and technical codes from reversing or starting from the right.
   ========================================================================== */
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
.dc-ltr-input input,
.dc-ltr-input .mud-input-slot,
.dc-ltr-input input.mud-input-slot,
input.dc-ltr-input,
textarea.dc-ltr-input {
    direction: ltr !important;
    text-align: left !important;
}

.dc-center-input input,
.dc-center-input .mud-input-slot {
    direction: ltr !important;
    text-align: center !important;
}

/* ==========================================================================
   Ticket License Select Truncation & Grid Constraints
   Prevents long license numbers / server IDs from expanding MudSelect beyond screen
   ========================================================================== */
.dc-ticket-select-grid {
    min-width: 0 !important;
    width: 100% !important;
}

.dc-ticket-select-grid > .mud-grid-item {
    min-width: 0 !important;
}

.dc-select-truncated {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.dc-select-truncated .mud-input-slot,
.dc-select-truncated input,
.dc-select-truncated .mud-select-input {
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.dc-ticket-option-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   Dashboard Active Tab Highlighting & Clarity
   Distinct visual feedback for currently active tab
   ========================================================================== */
.mud-tabs-tabbar-primary,
.dc-dashboard-tabs .mud-tabs-tabbar {
    background: linear-gradient(135deg, #0052CC 0%, #0747A6 100%) !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 6px 8px 0 8px !important;
}

.mud-tabs-tabbar-primary .mud-tab,
.dc-dashboard-tabs .mud-tab {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    border-radius: 8px 8px 0 0 !important;
    margin: 0 4px !important;
    padding: 12px 18px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0.78 !important;
    position: relative !important;
}

.mud-tabs-tabbar-primary .mud-tab:hover,
.dc-dashboard-tabs .mud-tab:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.12) !important;
    opacity: 1 !important;
}

.mud-tabs-tabbar-primary .mud-tab.mud-tab-active,
.dc-dashboard-tabs .mud-tab.mud-tab-active {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.22) !important;
    font-weight: 800 !important;
    opacity: 1 !important;
    box-shadow: inset 0 -4px 0 0 #FFAB00, 0 -2px 8px rgba(0, 0, 0, 0.12) !important;
}

.mud-tabs-tabbar-primary .mud-tab.mud-tab-active svg,
.dc-dashboard-tabs .mud-tab.mud-tab-active svg {
    color: #FFAB00 !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) !important;
    transform: scale(1.15) !important;
    transition: transform 0.2s ease !important;
}

.mud-tabs-tabbar-primary .mud-tab-slider,
.dc-dashboard-tabs .mud-tab-slider {
    background-color: #FFAB00 !important;
    height: 4px !important;
    border-radius: 2px 2px 0 0 !important;
    box-shadow: 0 0 8px rgba(255, 171, 0, 0.7) !important;
}

/* ==========================================================================
   MudBlazor Popover & Dropdown Z-Index Fix
   Ensures MudSelect and MudMenu dropdowns always display above MudOverlay & dialog cards
   ========================================================================== */
:root {
    --mud-zindex-popover: 2500 !important;
}

.mud-popover-provider {
    position: relative;
    z-index: 2500 !important;
}

.mud-popover,
.mud-popover.mud-popover-open,
.mud-popover-open {
    z-index: 2500 !important;
}





