@font-face {
  font-family: 'Sora-Thin';
  src: url('../fonts/Sora-Thin.woff2') format('woff2'),
       url('../fonts/Sora-Thin.woff') format('woff'),
       url('../fonts/Sora-Thin.ttf') format('truetype');
  font-weight: 100;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-ThinItalic';
  src: url('../fonts/Sora-ThinItalic.woff2') format('woff2'),
       url('../fonts/Sora-ThinItalic.woff') format('woff'),
       url('../fonts/Sora-ThinItalic.ttf') format('truetype');
  font-weight: 100;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Sora-ExtraLight';
  src: url('../fonts/Sora-ExtraLight.woff2') format('woff2'),
       url('../fonts/Sora-ExtraLight.woff') format('woff'),
       url('../fonts/Sora-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-ExtraLightItalic';
  src: url('../fonts/Sora-ExtraLightItalic.woff2') format('woff2'),
       url('../fonts/Sora-ExtraLightItalic.woff') format('woff'),
       url('../fonts/Sora-ExtraLightItalic.ttf') format('truetype');
  font-weight: 200;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Sora-Light';
  src: url('../fonts/Sora-Light.woff2') format('woff2'),
       url('../fonts/Sora-Light.woff') format('woff'),
       url('../fonts/Sora-Light.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-LightItalic';
  src: url('../fonts/Sora-LightItalic.woff2') format('woff2'),
       url('../fonts/Sora-LightItalic.woff') format('woff'),
       url('../fonts/Sora-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Sora-Regular';
  src: url('../fonts/Sora-Regular.woff2') format('woff2'),
       url('../fonts/Sora-Regular.woff') format('woff'),
       url('../fonts/Sora-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-Italic';
  src: url('../fonts/Sora-Italic.woff2') format('woff2'),
       url('../fonts/Sora-Italic.woff') format('woff'),
       url('../fonts/Sora-Italic.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Sora-Medium';
  src: url('../fonts/Sora-Medium.woff2') format('woff2'),
       url('../fonts/Sora-Medium.woff') format('woff'),
       url('../fonts/Sora-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-MediumItalic';
  src: url('../fonts/Sora-MediumItalic.woff2') format('woff2'),
       url('../fonts/Sora-MediumItalic.woff') format('woff'),
       url('../fonts/Sora-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Sora-SemiBold';
  src: url('../fonts/Sora-SemiBold.woff2') format('woff2'),
       url('../fonts/Sora-SemiBold.woff') format('woff'),
       url('../fonts/Sora-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-SemiBoldItalic';
  src: url('../fonts/Sora-SemiBoldItalic.woff2') format('woff2'),
       url('../fonts/Sora-SemiBoldItalic.woff') format('woff'),
       url('../fonts/Sora-SemiBoldItalic.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Sora-Bold';
  src: url('../fonts/Sora-Bold.woff2') format('woff2'),
       url('../fonts/Sora-Bold.woff') format('woff'),
       url('../fonts/Sora-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-BoldItalic';
  src: url('../fonts/Sora-BoldItalic.woff2') format('woff2'),
       url('../fonts/Sora-BoldItalic.woff') format('woff'),
       url('../fonts/Sora-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Sora-ExtraBold';
  src: url('../fonts/Sora-ExtraBold.woff2') format('woff2'),
       url('../fonts/Sora-ExtraBold.woff') format('woff'),
       url('../fonts/Sora-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-ExtraBoldItalic';
  src: url('../fonts/Sora-ExtraBoldItalic.woff2') format('woff2'),
       url('../fonts/Sora-ExtraBoldItalic.woff') format('woff'),
       url('../fonts/Sora-ExtraBoldItalic.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Sora-Variable';
  src: url('../fonts/Sora-Variable.woff2') format('woff2'),
       url('../fonts/Sora-Variable.woff') format('woff'),
       url('../fonts/Sora-Variable.ttf') format('truetype');
  font-weight: 100 800;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Sora-VariableItalic';
  src: url('../fonts/Sora-VariableItalic.woff2') format('woff2'),
       url('../fonts/Sora-VariableItalic.woff') format('woff'),
       url('../fonts/Sora-VariableItalic.ttf') format('truetype');
  font-weight: 100 800;
  font-display: swap;
  font-style: italic;
}

:root {
  --color-primary: #1976d2;
  --color-primary-light: #42a5f5;
  --color-dark: #21324c;
  --color-accent: #f8991d;
  --color-bg: #f7fafd;
  --color-bg-alt: #e9f1fb;
  --color-success: #41b883;
  --color-danger: #e53935;
  --color-warning: #ffc107;
  --color-info: #42a5f5;
}



body {
    font-family: 'Sora-Regular', 'BwAleta', 'Roboto', sans-serif;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sora-Regular', 'BwAleta', 'Roboto', sans-serif;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--color-primary);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: 8px;
    color: #fff;
    transition: background 0.2s;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-primary-light);
    color: #fff;
}

.card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--color-bg-alt);
    box-shadow: 0 2px 12px 0 rgba(33, 50, 76, 0.06);
    transition: box-shadow 0.2s;
}
.card-header {
    background: var(--color-bg-alt);
    color: var(--color-dark);
    border-bottom: 1px solid var(--color-bg-alt);
    font-weight: 600;
    font-size: 1.1rem;
        border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
}



.form-control:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 0.25rem rgba(30, 136, 229, 0.25);
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

footer {
    margin-top: 3rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 0.25rem rgba(30, 136, 229, 0.25);
}


.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    font-size: 1rem;
    line-height: 1.5;
}

.form-select:focus {
    border-color: #1e88e5;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(30, 136, 229, 0.25);
}

.table-sm th,
.table-sm td {
    padding: 0.5rem;
    font-size: 0.875rem;
}

.table th {
    white-space: nowrap;
    vertical-align: middle;
}

.table td {
    vertical-align: middle;
}

.container-fluid {
    max-width: 98%;
}

.table-responsive {
    overflow-x: auto;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.breadcrumb {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

.dropdown-header {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.modal {
    transition: opacity 0.15s linear;
}

.modal.fade .modal-dialog {
    transition: transform 0.15s ease-out;
}

.btn:disabled {
    opacity: 0.65;
    pointer-events: none;
}

.modal[id^="deleteModal"] {
    z-index: 1055;
}

.alert.auto-dismiss {
    position: relative;
    z-index: 1;
}

.modal .card.bg-light {
    border: 1px solid #dee2e6;
    box-shadow: none;
}

.modal-dialog {
    pointer-events: all;
}

.modal[id^="deleteModal"].show {
    border-left: 3px solid green;
}

.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    font-weight: 600;
    font-size: 0.875rem;
    transition: width 0.3s ease;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}


.card.border-info {
    border-width: 2px;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
}

form[style*="opacity"] {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

nav.navbar {
    z-index: 1030 !important;
}

nav.navbar .dropdown-menu {
    z-index: 1035 !important;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
}

.verification-code-input {
    font-size: 1.5rem !important;
    letter-spacing: 0.5rem !important;
    text-align: center !important;
    font-family: 'Sora-Light', monospace !important;
}

.verification-code-input:focus {
    font-size: 1.3rem !important;
}

.requests-table {
    font-size: 0.85rem;
}

.requests-table th,
.requests-table td {
    padding: 0.4rem;
    white-space: nowrap;
    vertical-align: middle;
}

.requests-table th {
    font-size: 0.8rem;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.requests-table .col-narrow {
    width: 80px;
    max-width: 80px;
}

.requests-table .col-medium {
    width: 120px;
    max-width: 120px;
}

.requests-table .col-wide {
    width: 200px;
    max-width: 200px;
}

@media (max-width: 1400px) {
    .requests-table {
        font-size: 0.75rem;
    }

    .requests-table th,
    .requests-table td {
        padding: 0.3rem;
    }
}

.table-responsive {
    max-height: 80vh;
    overflow-y: auto;
}

.flash-messages {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: auto;
    max-width: 600px;
    pointer-events: none;
}

.flash-messages .alert {
    pointer-events: auto;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    color: var(--color-dark); /* albo #21324c */
    background-color: #f7fafd; /* lub inny jasny z brandu */
    /*transition: opacity 0.5s ease-in-out;*/
    opacity: 1;
}

.flash-messages .alert.hide {
    opacity: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-messages .alert.fade {
    animation: slideUp 0.6s ease-in forwards;
    animation-delay: 4s;
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.alert-info {
    background: var(--color-bg-alt);
    color: var(--color-primary);
    border-left: 4px solid var(--color-primary);
}
.alert-success {
    background: #ecfdf5;
    color: #157347;
    border-left: 4px solid #41b883;
}
.alert-warning {
    background: #fffbe7;
    color: #b78909;
    border-left: 4px solid #ffc107;
}
.alert-danger {
    background: #ffe7e7;
    color: #d32f2f;
    border-left: 4px solid #e53935;
}

/* Komentarz przeczytany/standardowy */
.comment-read {
    background: var(--color-bg-alt);
    color: var(--color-dark);
    border: 1.5px solid #dee2e6;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    font-weight: 400;
}

/* Nowy komentarz */
.comment-new {
    background: rgba(25, 118, 210, 0.08); /* --color-primary, tylko bardzo jasny */
    color: var(--color-dark);
    border: 1.5px solid var(--color-primary-light);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    font-weight: 600;
}

/* Komentarz wewnętrzny */
.comment-internal {
    background: var(--color-warning);
    color: #b78909;
    border: 1.5px solid var(--color-warning);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    font-weight: 400;
}

/* Autor */
.comment-author {
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.15rem;
    display: block;
}
/* Data */
.comment-date {
    font-size: 0.92em;
    color: #888;
    margin-bottom: 0.45rem;
}

.comment-form-box {
    background: var(--color-bg-alt);
    border: 1.5px solid var(--color-primary-light);
    border-radius: 0.9rem;
    box-shadow: 0 2px 8px 0 rgba(33, 50, 76, 0.03);
    padding: 1.5rem 1.5rem 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
}
.comment-form-box h5,
.comment-form-box .form-label {
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}
.comment-form-box label {
    font-weight: 500;
}
.comment-form-box {
    font-weight: 400;
    color: var(--color-dark);
}
.comment-form-box .form-text {
    color: #666;
}
.btn-add-comment {
    background: var(--color-primary);
    color: #fff !important;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    padding: 0.75rem 2rem;
    box-shadow: 0 1px 4px 0 rgba(33, 50, 76, 0.06);
    transition: background 0.15s;
    margin-top: 1rem;
}
.btn-add-comment:hover,
.btn-add-comment:focus {
    background: var(--color-primary-light);
    color: #fff !important;
}

.object-info-section {
    background: #f7fafd;
    border: 1.5px solid #e9f1fb;
    border-radius: 1rem;
    box-shadow: 0 2px 12px 0 rgba(33,50,76,0.04);
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    /* Najważniejsze: rozciągnie się jak blok, nie jak karta */
    padding: 0; /* najważniejsze! */
    margin-right: 0 !important;
}
.object-info-header {
    background: #e9f1fb;
    color: #21324c;
    padding: 0; /* najważniejsze! */
    border-bottom: 1px solid #e9f1fb;
    border-radius: 1rem 1rem 0 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.file-item {
    background-color: #f8f9fa;
}

.file-item:hover {
    background-color: #e9ecef;
}


/* Custom priority badge colors - matching CRM */
.priority-badge-wysoki {
    background-color: #D9AD15 !important;
    color: white !important;
}

.priority-badge-normalny {
    background-color: #C3E220 !important;
    color: black !important;
}

.priority-badge-niski {
    background-color: #04BD78 !important;
    color: white !important;
}

.priority-badge-default {
    background-color: #6c757d !important;
    color: white !important;
}

/* Custom status badge colors - matching CRM */
.status-badge-oczekuje-na-weryfikacje {
    background-color: #8B4513 !important;
    color: white !important;
}

.status-badge-w-trakcie-weryfikacji {
    background-color: #F5DEB3 !important;
    color: black !important;
}

.status-badge-w-realizacji {
    background-color: #87CEEB !important;
    color: black !important;
}

.status-badge-zgloszono-uwagi {
    background-color: #FFFF00 !important;
    color: black !important;
}

.status-badge-oczekuje-na-odpowiedz {
    background-color: #FFA500 !important;
    color: white !important;
}

.status-badge-otrzymano-odpowiedz {
    background-color: #0000FF !important;
    color: white !important;
}

.status-badge-do-akceptacji {
    background-color: #9932CC !important;
    color: white !important;
}

.status-badge-do-umowienia {
    background-color: #FF8C00 !important;
    color: white !important;
}

.status-badge-zaplanowane {
    background-color: #4B0082 !important;
    color: white !important;
}

.status-badge-do-zamkniecia {
    background-color: #FFB6C1 !important;
    color: black !important;
}

.status-badge-zrealizowane-oczekiwanie-na-dokumentacje {
    background-color: #BDB76B !important;
    color: black !important;
}

.status-badge-zrealizowane {
    background-color: #00FF00 !important;
    color: black !important;
}

.status-badge-odrzucony {
    background-color: #FF0000 !important;
    color: white !important;
}

.status-badge-default {
    background-color: #6c757d !important;
    color: white !important;
}

/* Custom MPK/GOLD badge colors - matching store brands */
.mpk-badge-gold {
    background-color: #DC143C !important;  /* DINO czerwony */
    color: white !important;
}

.mpk-badge-mpk {
    background-color: #FFD700 !important;  /* Biedronka żółty */
    color: black !important;
}

/* Wymuszenie elipsy dla długich tekstów w komórkach */
.datatable-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mniejsze nagłówki */
.datatable-table th {
    font-size: 0.85rem;
    padding: 0.4rem 0.2rem;
}

/* Progress bar dla uploadu */
#upload-progress-section {
    background-color: #f8f9fa;
    border-radius: 0 0 0.375rem 0.375rem;
}

#upload-progress-bar {
    transition: width 0.3s ease;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* Komunikaty uploadu */
#upload-status-text {
    font-weight: 500;
    color: #495057;
}

#upload-file-counter {
    font-family: monospace;
    font-weight: 600;
}

#upload-size-info, #upload-time-info {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Ulepszenia dla progress bara */
#progressContainer .alert {
    border-left: 4px solid #0d6efd;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
}

#main-progress-bar {
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #0d6efd 0%, #1976d2 100%);
}

#progressContainer .spinner-border {
    color: #0d6efd;
}

#main-status-text {
    color: #0d47a1;
    font-size: 1.1rem;
}

.section-box {
    background-color: var(--color-bg-alt);
    color: var(--color-dark);
    border: 1.5px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(33, 50, 76, 0.03);
}

@media (max-width: 576px) {
  .button-group-responsive {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
  }

  .button-group-responsive .btn,
  .button-group-responsive .btn-group,
  .button-group-responsive form {
    width: 100%;
  }

  .button-group-responsive .btn-group .btn {
    width: 100%;
    text-align: center;
  }
}

/* Responsywne progress bary dla mobile */
@media (max-width: 768px) {
    #upload-progress-section {
        padding: 10px;
    }

    #upload-progress-section .progress {
        height: 12px; /* Większy progress bar na mobile */
    }

    #upload-progress-section small {
        font-size: 0.75rem;
    }

    /* Zapobiegaj zoom na mobile przy focus */
    input[type="file"] {
        font-size: 16px;
    }
}

/* Fallback dla starszych przeglądarek */
.progress-bar {
    -webkit-transition: width 0.3s ease;
    -moz-transition: width 0.3s ease;
    -o-transition: width 0.3s ease;
    transition: width 0.3s ease;
}

body {
    background: linear-gradient(
        120deg,
        var(--color-bg) 0%,
        #fffbe7 20%,
        #f9efd6 40%,
        var(--color-bg-alt) 70%,
        var(--color-primary-light) 100%
    );
    min-height: 100vh;
}
