@import '_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

/* ========================================
   KSEF POWIADOMIENIA - THEME COLORS
   Matching landing page palette
   ======================================== */

:root {
    /* Primary Red */
    --ksef-primary: #dc2626;
    --ksef-primary-dark: #b91c1c;
    --ksef-primary-light: #ef4444;
    
    /* Text Colors */
    --ksef-text-dark: #1f2937;
    --ksef-text-gray: #6b7280;
    --ksef-text-light: #9ca3af;
    
    /* Background Colors */
    --ksef-bg-white: #ffffff;
    --ksef-bg-light: #f8fafc;
    --ksef-bg-pink: #fef2f2;
    
    /* Borders */
    --ksef-border: #e2e8f0;
}

body {
    --body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
    color: var(--ksef-text-dark);
}

/* ========================================
   LAYOUT STYLES
   ======================================== */

.navmenu-icon {
    display: none;
}

.main {
    min-height: calc(100dvh - 86px);
    color: var(--ksef-text-dark);
    align-items: stretch !important;
}

.body-content {
    align-self: stretch;
    height: calc(100dvh - 86px) !important;
    display: flex;
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 50%, #fce4e4 100%);
}

.content {
    padding: 1.5rem 2rem;
    align-self: stretch !important;
    width: 100%;
}

.manage {
    width: 100dvw;
}

/* ========================================
   HEADER & FOOTER
   ======================================== */

fluent-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--ksef-border) !important;
    color: var(--ksef-text-dark) !important;
}

footer, fluent-footer {
    background: #ffffff !important;
    border-top: 1px solid var(--ksef-border);
    color: var(--ksef-text-gray);
    align-items: center;
    padding: 12px 24px;
}

footer a {
    color: var(--ksef-text-gray);
    text-decoration: none;
}

footer a:focus {
    outline: 1px dashed var(--ksef-primary);
    outline-offset: 3px;
}

footer a:hover {
    color: var(--ksef-primary);
    text-decoration: underline;
}

/* ========================================
   NAVIGATION
   ======================================== */

fluent-nav-menu {
    background-color: #ffffff !important;
    border-right: 1px solid var(--ksef-border) !important;
}

fluent-nav-link[aria-current="true"]::part(content),
fluent-nav-link.active::part(content) {
    background-color: var(--ksef-bg-pink) !important;
    border-left: 3px solid var(--ksef-primary) !important;
}

fluent-nav-link:hover::part(content) {
    background-color: var(--ksef-bg-light) !important;
}

/* ========================================
   BUTTONS & ACCENTS  
   ======================================== */

fluent-button[appearance="accent"] {
    --accent-fill-rest: #dc2626;
    --accent-fill-hover: #b91c1c;
    --accent-fill-active: #991b1b;
    border-radius: 24px;
}

/* CTA Button style (like landing page) */
.btn-cta {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    border-radius: 24px !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3) !important;
}

.btn-cta:hover {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4) !important;
    transform: translateY(-1px);
}

/* ========================================
   CARDS
   ======================================== */

fluent-card {
    background-color: #ffffff !important;
    border: 1px solid var(--ksef-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.05) !important;
}

fluent-card:hover {
    box-shadow: 0 10px 15px rgba(220, 38, 38, 0.1) !important;
}

/* ========================================
   DATA GRID
   ======================================== */

fluent-data-grid-row[row-type="header"] {
    background-color: var(--ksef-bg-light) !important;
    border-bottom: 2px solid var(--ksef-primary) !important;
    color: var(--ksef-text-dark) !important;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    border: 1px solid var(--ksef-border);
    border-left: 4px solid var(--ksef-primary);
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 8px;
    background-color: #ffffff;
}

.alert-danger {
    border-left-color: #dc2626;
    background-color: #fef2f2;
}

.alert-success {
    border-left-color: #16a34a;
    background-color: #f0fdf4;
}

.alert-warning {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

/* ========================================
   UTILITIES
   ======================================== */

.text-primary { color: var(--ksef-primary) !important; }
.text-dark { color: var(--ksef-text-dark) !important; }
.text-gray { color: var(--ksef-text-gray) !important; }
.bg-gradient-hero {
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 50%, #fce4e4 100%);
}

/* ========================================
   ERROR UI
   ======================================== */

#blazor-error-ui {
    background: #fef2f2;
    border-top: 2px solid #dc2626;
    bottom: 0;
    box-shadow: 0 -4px 12px rgba(220, 38, 38, 0.15);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: var(--ksef-text-dark);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    padding: 1rem 1rem 1rem 1rem;
    color: white;
    border-radius: 8px;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

@media (max-width: 600px) {
    .header-gutters {
        margin: 0.5rem 3rem 0.5rem 1.5rem !important;
    }

    [dir="rtl"] .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 3rem !important;
    }

    .main {
        flex-direction: column !important;
        row-gap: 0 !important;
    }

    nav.sitenav {
        width: 100%;
        height: 100%;
    }

    #main-menu {
        width: 100% !important;
    }

        #main-menu > div:first-child:is(.expander) {
            display: none;
        }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

        #navmenu-toggle ~ nav {
            display: none;
        }

        #navmenu-toggle:checked ~ nav {
            display: block;
        }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset;
    }
}

/* Table */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

    table td,
    table th {
        padding: var(--spacingVerticalS) var(--spacingHorizontalM);
        text-align: left;
        vertical-align: middle;
        border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
    }

/* ========================================
   LOGO STYLES
   ======================================== */

.logo-header {
    height: 36px;
    width: auto;
    transition: transform 0.2s ease;
}

.logo-header:hover {
    transform: scale(1.05);
}

.logo-auth {
    height: 64px;
    width: auto;
    margin-bottom: 1rem;
}

.logo-footer {
    height: 20px;
    width: auto;
    opacity: 0.7;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo-link:hover .logo-header {
    transform: scale(1.05);
}

/* ========================================
   LOGO STYLES - Rounded Square
   ======================================== */

.logo-header {
    height: 36px;
    width: 36px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-header:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.logo-footer {
    height: 24px;
    width: 24px;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.7;
}

.logo-auth {
    height: 72px;
    width: 72px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
    margin-bottom: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.brand-text {
    font-weight: 700;
    font-size: 18px;
}

.brand-text-dark {
    color: #1f2937;
}

.brand-text-accent {
    color: #dc2626;
}
