@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --fluent-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --fluent-bg: var(--dx-color-surface, #ffffff);
    --fluent-bg-secondary: var(--dx-color-surface-secondary, #f8f9fa);
    --fluent-border: var(--dx-color-border, #e0e0e0);
    --fluent-text: var(--dx-color-text, #242424);
    --fluent-text-secondary: var(--dx-color-text-secondary, #616161);
    --fluent-primary: var(--dx-color-primary, #0078d4);
    --fluent-primary-hover: var(--dx-color-primary-emphasis, #005a9e);

    --fluent-radius: 6px;
    --fluent-radius-lg: 12px;
    --fluent-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);

    --skeleton-bg: #eeeeee;
    --skeleton-shimmer: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);

    --bs-body-bg: var(--fluent-bg);
    --bs-secondary-bg: var(--fluent-bg-secondary);
    --bs-tertiary-bg: var(--fluent-bg-secondary);
    --bs-border-color: var(--fluent-border);
    --bs-body-color: var(--fluent-text);
    --bs-heading-color: var(--fluent-text);
}

[data-theme="dark"] {
    --fluent-bg: #111111;
    --fluent-bg-secondary: #1f1f1f;
    --fluent-border: #333333;
    --fluent-text: #ffffff;
    --fluent-text-secondary: #adadad;
    --fluent-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 2px rgba(255, 255, 255, 0.1);
    --skeleton-bg: #2a2a2a;
    --skeleton-shimmer: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
}

html,
body {
    font-family: var(--fluent-font);
    background-color: var(--fluent-bg);
    color: var(--fluent-text);
    margin: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.d-flex {
    display: flex !important;
}

.d-grid {
    display: grid !important;
}

.d-none {
    display: none !important;
}

.d-inline-block {
    display: inline-block !important;
}

.flex-column {
    flex-direction: column !important;
}

.flex-nowrap {
    flex-wrap: nowrap !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

.gap-1 {
    gap: 0.25rem !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 1rem !important;
}

.p-1 {
    padding: 0.25rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.px-1 {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.px-2 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.py-1 {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.ps-2 {
    padding-left: 0.5rem !important;
}

.ms-auto {
    margin-left: auto !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.w-100 {
    width: 100% !important;
}

.border {
    border: 1px solid var(--fluent-border) !important;
}

.border-bottom {
    border-bottom: 1px solid var(--fluent-border) !important;
}

.border-start {
    border-left: 1px solid var(--fluent-border) !important;
}

.shadow-sm {
    box-shadow: var(--fluent-shadow) !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: bold !important;
}

.small {
    font-size: 0.8125rem !important;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rounded-circle {
    border-radius: 50% !important;
}

.bg-secondary {
    background-color: var(--fluent-bg-secondary) !important;
}

.text-white {
    color: #ffffff !important;
}

.text-danger {
    color: #d13438 !important;
}

/* Custom Components */
.navbar {
    background-color: var(--fluent-bg);
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.card {
    background-color: var(--fluent-bg);
    border: 1px solid var(--fluent-border);
    border-radius: var(--fluent-radius-lg);
    box-shadow: var(--fluent-shadow);
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1 1 auto;
    padding: 1rem;
}

.p-0 {
    padding: 0 !important;
}

.welcome-card {
    background-color: var(--fluent-bg-secondary);
    border-radius: var(--fluent-radius-lg);
    border: 1px solid var(--fluent-border);
    transition: all 0.2s ease;
}

.dxbl-btn {
    border-radius: var(--fluent-radius);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #107c10;
}

.invalid {
    outline: 1px solid #d13438;
}

.validation-message {
    color: #d13438;
    font-size: 0.75rem;
}

#blazor-error-ui {
    background: var(--fluent-bg-secondary);
    color: var(--fluent-text);
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.user-menu-container {
    background: var(--fluent-bg);
    color: var(--fluent-text);
}

.username {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

:root {
    --dx-accent-coolblue: #0078d4;
    --dx-accent-desert: #a66100;
    --dx-accent-mint: #00cc6a;
    --dx-accent-moss: #00ad56;
    --dx-accent-orchid: #ef6950;
    --dx-accent-purple: #b4009e;
    --dx-accent-rose: #e81123;
    --dx-accent-rust: #8e1922;
    --dx-accent-steel: #69797e;
    --dx-accent-storm: #00bcf2;
}

.theme-accent-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 12px 0;
    justify-items: center;
}

.accent-color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.accent-color-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.accent-color-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--fluent-bg), 0 0 0 4px var(--fluent-primary);
    border-width: 3px;
}

.dxbl-toolbar-item {
    transition: opacity 0.2s, filter 0.2s;
}

.dxbl-toolbar-item.dxbl-disabled {
    opacity: 0.45 !important;
    filter: grayscale(0.8);
    cursor: not-allowed !important;
}

.dxbl-toolbar-item.dxbl-disabled * {
    pointer-events: none !important;
}


.skeleton-line,
.skeleton-circle,
.skeleton-item {
    background-color: var(--skeleton-bg) !important;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.skeleton-circle {
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
}

.skeleton-line::before,
.skeleton-circle::before,
.skeleton-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--skeleton-shimmer);
    transform: translateX(-100%);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.simple-flexible-width-input {
    flex-grow: 1;
}

/* ── Sımple brand wordmark (real text in the bundled SimpleFont) ───────────────────
   Drives the <BrandLogo> component (navbar + login lockup) that replaced the old
   vector-outline logo SVGs. The face is bundled locally (no CDN); the client wwwroot
   /fonts asset is served at the host root, hence the absolute url below. */
@font-face {
    font-family: "SimpleFont";
    src: url("/fonts/SimpleFont-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

.erp-brand {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    font-family: "SimpleFont", var(--fluent-font);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

/* "erp" sub-brand tucked under the bottom-right of the wordmark */
.erp-brand__suffix {
    position: absolute;
    right: 0.05em;     /* measured in suffix-em → hugs the right edge under the word */
    bottom: -0.32em;   /* dropped below the baseline, beneath the writing */
    font-size: 0.65em;
    letter-spacing: 0.02em;
    opacity: 0.95;
}

/* plain: single colour inherited from context → always contrasts its background
   (fixes the accent-on-accent menu bar where the old SVG was invisible). */
.erp-brand--plain {
    color: currentColor;
}

/* gradient: indigo→violet brand gradient clipped onto the glyphs (login on light card) */
.erp-brand--gradient .erp-brand__word,
.erp-brand--gradient .erp-brand__suffix {
    background-image: linear-gradient(95deg, #6366f1 0%, #a855f7 55%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* size modifiers */
.erp-brand--navbar {
    font-size: 1.6rem;
}

/* login lockup — sized to fill the ~300px logo slot like the old SVG did */
.erp-brand--login {
    font-size: 7rem;
}

.sm-group-padding {
    border-radius: 5px;
    box-shadow: 3px 3px rgba(0, 0, 0, 0.1);
}