/* ==========================================================================
   1. ƏSAS TÜND ARAYÜZ STİLLƏRİ
   ========================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

body {
    background-color: #0b132b;
    color: #f1f5f9;
    padding: 0;
    margin: 0;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden !important;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   BLOKU ENİNƏ 600PX SAXLAYIB DAHA DA YAXINLAŞDIRAN KONTEYNER (ZOOM)
   ========================================================================= */
.app-container {
    max-width: 550px !important;
    width: 100% !important;
    
    /* Mərkəzləşdirmək üçün margin-i auto edirik */
    margin: 20px auto !important; 
    transform: translateX(-38px) ; /* Mərkəzləşdirmək üçün əlavə transform */
    

    /* Yaxınlaşdırma dərəcəsi və mərkəz nöqtəsi */
    zoom: 1.6 !important;
    -moz-transform: scale(1.6);
    -moz-transform-origin: top center; /* Miqyaslanmanın mərkəzdən başlaması üçün */
}

/* Giriş və İdarəetmə Paneli */
.control-panel {
    background: #1c2541;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #3a506b;
}

.control-panel input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #3a506b;
    border-radius: 6px;
    font-size: 16px;
    background-color: #0b132b;
    color: #ffffff;
    outline: none;
    font-weight: 600;
    height: 44px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap !important;
    /* Düymələrin aşağı keçməsini qəti qadağan edir */
    align-items: center;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s;
    height: 44px;
}

.btn-blue {
    background-color: #0b132b;
    border: 1px solid #5bc0be;
    color: #5bc0be;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

.btn-blue:hover {
    background-color: #5bc0be;
    color: #0b132b;
    border-color: #5bc0be;
}

.btnNewInvoice,
#btn-new-invoice {
    background-color: #10b981 !important; /* İçi dolu yaşıl rəng */
    border: 1px solid #10b981 !important;
    color: #ffffff !important; /* Yazı ağ rəng */
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: none !important; /* Hover keçid effektini ləğv edir */
    -webkit-tap-highlight-color: transparent;
}

/* Hover zamanı rəngin dəyişməməsi üçün eyni rəngdə saxlayırıq */
@media (hover: hover) {
    .btnNewInvoice:hover,
    #btn-new-invoice:hover {
        background-color: #10b981 !important;
        color: #ffffff !important;
        border-color: #10b981 !important;
    }
}

.btnNewInvoice.clicked {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

/* Gözləməyə Al / Yenilə düyməsi */
.btn-yellow {
    background-color: #ff6a00 !important; /* Daha açıq və canlı narıncı/sarı tonu */
    border: 1px solid #ff6a00 !important;
    color: #ffffff !important; /* Yazı ağ rəng */
    min-width: 14px !important;
    white-space: nowrap !important;
    text-align: center;
    transition: none !important; /* Hover keçid effektini ləğv edir */
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   İRİ CƏDVƏL STRUKTURU
   ========================================================================= */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

@media (min-width: 992px) {
    .control-panel {
        flex-direction: row;
        align-items: center;
    }
}

.invoice-box {
    background: #1c2541;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #3a506b;
}

/* style.css faylındakı mövcud hissəni bununla dəyişdirin */
.invoice-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 10px;
    border: 1px solid #3a506b;
    border-radius: 6px;
    background: #0b132b;
    margin-left: 0 !important;
    /* Cədvəli tam sola yapışdırır */
    padding-left: 0 !important;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-table th {
    background-color: #0b132b;
    color: #5bc0be;
    padding: 10px 12px;
    text-transform: uppercase;
    font-size: 12px;
    border-bottom: 2px solid #3a506b;
    text-align: left;
}

.invoice-table td {
    padding: 8px;
    border-bottom: 1px solid #1c2441;
    vertical-align: middle;
}

/* SÜTUN ÖLÇÜLƏRİ - AZN SİLİNDİYİ ÜÇÜN YENİDƏN BALANSLANDIRILDI */
.invoice-table th:nth-child(1),
.invoice-table td:nth-child(1) {
    width: 5%;
    text-align: center;
}

.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2) {
    width: 45%;
}

/* Məhsul adı üçün geniş yer */
.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3) {
    width: 15%;
}

/* Miqdar */
.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4) {
    width: 15%;
}

/* Qiymət */
.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5) {
    width: 15%;
}

/* Cəmi (Sadəcə rəqəm) */
.invoice-table th:nth-child(6),
.invoice-table td:nth-child(6) {
    width: 5%;
    text-align: center;
}

.invoice-table input {
    width: 100%;
    border: 1px solid #3a506b;
    padding: 6px 10px;
    border-radius: 5px;
    background-color: #1c2541;
    color: #ffffff;
    outline: none;
    font-size: 15px;
    height: 38px;
}

.invoice-table input.item-qty,
.invoice-table input.item-price {
    text-align: center;
    max-width: 80px;
    margin: 0 auto;
    display: block;
}

/* Sətir sil */
.btn-delete-row {
    background-color: #ef4444 !important;
    border: none !important;
    color: #ffffff !important;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Yekun məbləğ sahəsi */
.invoice-footer {
    display: flex;
    justify-content: flex-end;
    background: #0b132b;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #3a506b;
}

.total-amount {
    font-size: 14px;
    color: #5bc0be;
}

.total-amount span {
    font-size: 18px;
    color: #ffffff;
    font-weight: 800;
    margin-left: 6px;
}

/* Gözləyən Qaimələr Paneli */
.waiting-panel {
    background: #1c2541;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #3a506b;
    height: fit-content;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #3a506b;
    padding-bottom: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.panel-header h3 {
    font-size: 14px;
    color: #5bc0be;
    font-weight: 700;
}

.btn-refresh,
.btn-archive-nav {
    background-color: #10b981 !important; /* İçi dolu firuzəyi rəng */
    border: 1px solid #10b981 !important;
    color: #ffffff !important; /* Yazı ağ rəng */
    padding: 6px 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: none !important; /* Hover keçidini ləğv edir */
    -webkit-tap-highlight-color: transparent;
}

/* Hover və klik zamanı rəng dəyişməməsi üçün bunları eyni rəngdə saxlayırıq */
@media (hover: hover) {
    .btn-refresh:hover,
    .btn-archive-nav:hover {
        background-color: #10b981 !important;
        color: #ffffff !important;
        border-color: #10b981 !important;
    }
}

.btn-refresh.clicked {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.waiting-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
}

.waiting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0b132b;
    border: 1px solid #3a506b;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-delete-waiting {
    background-color: #0b132b;
    border: 1px solid #ef4444;
    color: #ef4444 !important;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* ==========================================================================
   YÜKLƏNMƏ SPİNNERİ
   ========================================================================= */
.loading-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.sharp-ring-loader {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(91, 192, 190, 0.15);
    border-top: 2px solid #5bc0be;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

body {
    background-color: #0b132b;
    color: #f1f5f9;
    padding: 0 !important; /* Kənar boşluqları sıfırlayırıq ki, kənara daşmasın */
    margin: 0 !important;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden !important;
    width: 100vw !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        background-color: #0b132b !important;
        width: 100vw !important;
    }

.app-container {
    max-width: 550px !important;
    width: 100% !important;
    
    /* Səhifədə tam mərkəzə salır */
    margin: 20px auto !important; 
    
    /* Daxili elementləri mərkəzləşdirir */
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Yaxınlaşdırma və miqyaslama */
    zoom: 1.7 !important;
    -moz-transform: scale(1.7);
    -moz-transform-origin: top center;
}

/* İçindəki bütün əsas blokların eninin tam oturması üçün */
.control-panel,
.invoice-box,
.waiting-panel,
.template-selector-container,
.invoice-date-archive-wrapper {
    width: 100% !important;
    box-sizing: border-box !important;
}

    .control-panel {
        padding: 10px !important;
    }

    .invoice-box {
        padding: 10px !important;
    }

    .waiting-panel {
        padding: 10px !important;
    }

    .template-selector-container {
        padding: 10px !important;
    }

    /* Tarix və Arxiv düyməsinin sətri */
    .invoice-date-archive-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 0 !important;
    }

    #btn-open-archive-modal {
        width: 100% !important;
        justify-content: center !important;
        height: 40px !important;
        font-size: 14px !important;
    }

    .control-panel input {
        height: 38px !important;
        font-size: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .actions {
        gap: 6px !important;
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        box-sizing: border-box !important;
    }

    .btn,
    .btn-blue,
    .btnNewInvoice,
    #btn-new-invoice,
    .btn-green,
    .btn-yellow,
    .btn-share-style {
        height: 30px !important;
        font-size: 10px !important;
        padding: 2px 4px !important;
        flex: 1 !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
    }
    .invoice-table-wrapper {
        width: 100% !important;
        overflow-x: auto !important;
        box-sizing: border-box !important;
    }

    .invoice-table {
        width: 100% !important;
    }

    .invoice-table th {
        padding: 6px 4px !important;
        font-size: 11px !important;
    }

    .invoice-table td {
        padding: 4px !important;
    }

    .invoice-table input {
        height: 32px !important;
        font-size: 13px !important;
        box-sizing: border-box !important;
    }
}

/* Cədvəlin "Cəmi" sütununda yalnız rəqəmləri saxlayır, AZN mətnini gizlədir */
.invoice-table td:nth-child(5) {
    font-size: 0px !important;
    /* Bütün daxili mətni (AZN daxil) sıfırlayır */
}

/* Yalnız rəqəm hissəsinin görünməsi üçün daxildəki rəqəmə yenidən şrift ölçüsü veririk */
.invoice-table td:nth-child(5)::first-line {
    font-size: 15px !important;
    /* Rəqəmi yenidən iri və görünən edir */
}

.btn-new-row-style {
    display: block !important;
    width: 100% !important;
    background-color: #0b132b !important;
    border: 1px solid #3a506b !important;
    color: #5bc0be !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: center !important;
    margin-bottom: 15px !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
    -webkit-tap-highlight-color: transparent;
    /* Mobil toxunuş kölgəsini silir */
}

/* Hover effekti YALNIZ siçan (PC) istifadə edənlər üçün */
@media (hover: hover) {
    .btn-new-row-style:hover {
        background-color: #5bc0be !important;
        color: #ffffff !important;
        border-color: #5bc0be !important;
    }
}

/* JavaScript ilə 500ms aktiv saxlayacağımız sinif */
.btn-new-row-style.clicked {
    background-color: #5bc0be !important;
    color: #ffffff !important;
    border-color: #5bc0be !important;
}

/* Siyahıdakı hər bir sətir - Maksimum Ölçü */
.dropdown-item {
    padding: 20px 24px;
    /* Klikləmə sahəsini (hündürlüyünü) xeyli artırdıq */
    color: #ffffff;
    font-size: 22px;
    /* Yazının ölçüsünü 18px-dən 22px-ə qaldırdıq */
    font-weight: 800;
    /* Yazını tam şrift qalınlığına gətirdik */
    cursor: pointer;
    border-bottom: 2px solid rgba(58, 80, 107, 0.6);
    /* Bölgü xəttini daha qalın etdik */
    transition: background 0.15s ease, color 0.15s ease;
}

/* Sonuncu sətirdə alt xətt olmasın */
.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #5bc0be;
    color: #0b132b;
}

/* Düymələrin yan-yana aralı durması üçün */
.panel-header-buttons {
    display: flex !important;
    gap: 8px !important;
    /* Aralarında 8px boşluq qoyur */
    align-items: center !important;
}

/* Parametr düyməsinin dizaynı */
.btn-settings {
    background-color: #3a506b !important; /* İçi dolu fon rəngi */
    border: 1px solid #3a506b !important;
    color: #ffffff !important; /* Yazı ağ rəng */
    padding: 6px 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: none !important; /* Hover keçidini ləğv edir */
    -webkit-tap-highlight-color: transparent;
}

/* Hover zamanı rəngin dəyişməməsi üçün eyni rəngdə saxlayırıq */
@media (hover: hover) {
    .btn-settings:hover {
        background-color: #3a506b !important;
        color: #ffffff !important;
        border-color: #3a506b !important;
    }
}

.btn-settings.clicked {
    background-color: #3a506b !important;
    color: #ffffff !important;
    border-color: #3a506b !important;
}

.template-selector-container {
    background-color: #1c2541;
    border: 1px solid #3a506b;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    /* Üst və alt bloklardan səliqəli məsafə */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-label {
    color: #5bc0be;
    font-size: 15px;
    font-weight: 700;
}

/* Tamamilə digər inputlar kimi standart dropdown dizaynı */
.template-select-dropdown {
    background-color: #0b132b;
    color: #ffffff;
    border: 1px solid #3a506b;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.template-select-dropdown:focus {
    border-color: #5bc0be;
}

/* ===================================================
   PAYLAŞ DÜYMƏSİ SƏLİQƏLİ DİZAYNI
   =================================================== */
.btn-share-style {
    background-color: #0ea5e9 !important; /* İçi dolu mavi rəng */
    border: 1px solid #0ea5e9 !important;
    color: #ffffff !important; /* Yazı ağ rəng */
    padding: 20px 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    font-size: 15px;
    transition: none !important; /* Hover keçid effektini ləğv edir */
    -webkit-tap-highlight-color: transparent;
}

/* Hover zamanı rəngin dəyişməməsi üçün eyni rəngdə saxlayırıq */
@media (hover: hover) {
    .btn-share-style:hover {
        background-color: #0ea5e9 !important;
        color: #ffffff !important;
        border-color: #0ea5e9 !important;
    }
}

.btn-share-style.clicked {
    background-color: #0ea5e9 !important;
    color: #ffffff !important;
    border-color: #0ea5e9 !important;
}

/* Mobil cihaz uyğunluğu */
@media (max-width: 768px) {
    .btn-share-style {
        height: 38px !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
}

/* PDF yaradılarkən istifadəçinin görmədiyi arxa fonda yaranan gizli blok */
.pdf-render-hidden {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 800px;
    /* Sabit en verilir ki, kəsilmə baş verməsin */
    background-color: #ffffff;
    color: #000000;
}

/* Düymələrin olduğu sağ tərəfdəki konteynerə verin */
.buttons-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    /* Aşağı sətirə keçməyə qoymur */
}

/* "Gözləməyə Al" düyməsini bir qədər yığcam edirik */
#btn-waiting {
    min-width: unset !important; /* Əvvəlki böyük min-width dəyərini ləğv edirik */
    padding: 10px 10px !important; /* Yan boşluqları azaldırıq */
    font-size: 13px !important;    /* Şrifti səliqəli görünüş üçün bir az kiçildirik */
    white-space: nowrap !important;
}

/* Paylaş düyməsi */
#btn-share-pdf {
    min-width: unset !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
}

/* Dropdown-un yerləşdiyi konteyner (əgər varsa) */
.input-container {
    position: relative;
    /* Bu vacibdir ki, dropdown bunun daxilində tam düzgün yerləşsin */
}

/* style.css faylında */
#custom-dropdown {
    position: fixed !important;
    z-index: 999999 !important;
    /* Ən üst qat[cite: 4] */
    background-color: #0b132b;
    border: 1px solid #5bc0be;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    /* Genişliyi JS-də dinamik təyin edirik */
}

/* Sətrin kliklənmə sahəsini böyüdürük */
.dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    color: #ffffff;
    border-bottom: 1px solid #3a506b;
}

.dropdown-item:hover {
    background-color: #5bc0be;
    color: #0b132b;
}

/* ==========================================================================
   PAYLAŞMA FORMATI SEÇİMİ (Şəkil / PDF) POPUP-U
   ========================================================================== */
.share-choice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 8, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    box-sizing: border-box;
}

.share-choice-box {
    background-color: #0b132b;
    border: 1px solid #3a506b;
    border-radius: 14px;
    width: 100%;
    max-width: 360px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    text-align: center;
    animation: shareModalPop 0.2s ease-out;
}

@keyframes shareModalPop {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.share-choice-box h3 {
    margin: 0 0 18px 0;
    color: #ffffff;
    font-size: 17px;
}

.share-choice-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.share-choice-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background-color: #1c2541;
    border: 1px solid #3a506b;
    border-radius: 10px;
    padding: 18px 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}

.share-choice-icon {
    font-size: 28px;
}

.share-choice-btn:hover {
    background-color: #5bc0be;
    color: #0b132b;
    border-color: #5bc0be;
}

.share-choice-btn:active {
    transform: scale(0.96);
}

.share-choice-cancel {
    width: 100%;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 13px;
    padding: 8px;
    cursor: pointer;
}

.share-choice-cancel:hover {
    color: #ffffff;
}

/* ==========================================================================
   BRAUZERİN NATİV ÇAP FUNKSİYASI İLƏ PDF (ən etibarlı üsul)
   ========================================================================== */

/* Normal ekranda çap üçün hazırlanan blok görünməsin */
#print-only-invoice {
    display: none;
}

@media print {

    /* Çap zamanı yalnız qaimə görünsün, tətbiqin qalan hissəsi tam gizlənsin */
    body * {
        visibility: hidden !important;
    }

    #print-only-invoice,
    #print-only-invoice * {
        visibility: visible !important;
    }

    #print-only-invoice {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    @page {
        size: A4;
        margin: 10mm;
    }
}

/* Gözləyən qaimələr axtarış inputu */
#waiting-search-input {
    flex: 1;
    max-width: 160px;
    height: 32px;
    padding: 4px 10px;
    background-color: #0b132b;
    border: 1px solid #3a506b;
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease;
}

#waiting-search-input:focus {
    border-color: #5bc0be;
}

/* Gözləyən siyahıdakı ümumi düymələr üçün baza stil */
.btn-complete-waiting,
.btn-delete-waiting {
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    transition: opacity 0.2s ease-in-out !important;
}

.btn-complete-waiting:hover,
.btn-delete-waiting:hover {
    opacity: 0.9 !important;
}

/* Tamamla düyməsi (Mavi fon) */
.btn-complete-waiting {
    background: #3b82f6 !important;
}

/* Sil düyməsi (Qırmızı fon) */
.btn-delete-waiting {
    background: #ef4444 !important;
}

/* Təsdiq qutusunun içindəki Bəli və Xeyr düymələri */
.waiting-item-confirm-box .btn-confirm-yes,
.waiting-item-confirm-box .btn-confirm-no {
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s ease-in-out !important;
}

/* Bəli düyməsi (Qırmızı) */
.waiting-item-confirm-box .btn-confirm-yes {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.waiting-item-confirm-box .btn-confirm-yes:hover {
    opacity: 0.9;
}

/* Xeyr düyməsi ( Boz) */
.waiting-item-confirm-box .btn-confirm-no {
    background: #4b5563 !important;
    color: #ffffff !important;
}

.waiting-item-confirm-box .btn-confirm-no:hover {
    opacity: 0.9;
}

/* Seçim qutusu və düyməni eyni sətrə gətirən konteyner */
.template-inline-row {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

/* Dropdown qutusunun qalan boş yeri tam doldurması üçün */
.template-inline-row .template-select-dropdown {
    flex: 1;
}

.btn-save-template-mini {
    background-color: #0ea5e9 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    transition: opacity 0.2s ease;
}

.btn-save-template-mini:hover {
    opacity: 0.9;
}

/* ==========================================================================
   ŞABLON ÜÇÜN MƏRKƏZİ MODAL STİLLƏRİ
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 8, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 10px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #0b132b;
    border: 1px solid #3a506b;
    border-radius: 14px;
    width: 100%;
    max-width: 380px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: shareModalPop 0.2s ease-out;
}

.modal-content h3 {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #3a506b;
    background-color: #1c2541;
    color: #fff;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
}

.modal-content input:focus {
    border-color: #5bc0be;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-buttons button {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: opacity 0.15s ease;
}

.modal-buttons button:hover {
    opacity: 0.9;
}

.modal-buttons .btn-primary {
    background-color: #5bc0be;
    color: #0b132b;
}

.modal-buttons .btn-secondary {
    background-color: #3a506b;
    color: #ffffff;
}

/* Xüsusi şablon modalının fonu */
#custom-select-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

/* Modalın əsas qutusu */
.custom-modal-content {
    background: #16162a;
    border: 1px solid #2e2e4f;
    width: 90%;
    max-width: 400px;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: modalScaleIn 0.2s ease;
}

@keyframes modalScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Modal başlığı */
.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid #2e2e4f;
    padding-bottom: 10px;
}

.custom-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
}

/* Siyahı elementləri (Sətirlər) */
.custom-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #1f1f38;
    border: 1px solid #2e2e4f;
    border-radius: 8px;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.custom-dropdown-item:hover {
    background: rgba(91, 192, 190, 0.1);
    border-color: #5bc0be;
}

/* ==========================================================================
   PAROL / PİN GİRİŞ EKRANI DİZAYNI
   ========================================================================== */
#pin-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0b132b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999999;
    font-family: 'Segoe UI', sans-serif;
    color: #f1f5f9;
}

.pin-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    
    /* Yaxınlaşdırma dərəcəsini 1.2-dən 2.0 və ya 2.5-ə qaldıraq */
    transform: scale(2.0); 
    
    /* Böyütdükdə mərkəzdən sürüşməməsi üçün: */
    transform-origin: center center; 
}

.pin-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.pin-dots {
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border: 2px solid #5bc0be;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.pin-dot.active {
    background-color: #5bc0be;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 75px);
    gap: 14px;
}

.pin-btn {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background-color: #1c2541;
    border: 1px solid #3a506b;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .pin-btn:hover {
        background-color: #3a506b;
    }
}

.pin-btn:active {
    transform: scale(0.92);
    background-color: #5bc0be;
    color: #0b132b;
}

.pin-btn.clear-btn {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.pin-btn.backspace-btn {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.4);
}

.pin-error-text {
    height: 20px;
    font-size: 13px;
    color: #ef4444;
    text-align: center;
    margin-top: -12px;
    margin-bottom: 4px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pin-error-text.visible {
    opacity: 1;
}

.pin-dot.error {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.2) !important;
}

.invoice-date-archive-wrapper {
    margin-top: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.invoice-date-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.invoice-date-group label {
    font-size: 12px;
    color: #a5b4fc;
    font-weight: 600;
}

.invoice-date-group input[type="date"] {
    width: 100%;
    padding: 10px;
    background-color: #1e1b4b;
    border: 1px solid #312e81;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

#btn-open-archive-modal {
    background-color: #8b5cf6;
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    height: 44px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#archive-modal .modal-content {
    max-width: 800px !important; /* Modalın enini daha da genişləndirir */
    width: 95% !important;        
    min-height: 700px !important; /* Hündürlüyünü artıraraq ekrana daha dolğun oturmasını təmin edir */
    transform: scale(1.05);       /* Ekranı optik olaraq bir qədər də yaxınlaşdırır */
}

#archive-list-container {
    max-height: 550px !important; /* Siyahının görünən hissəsini böyüdür */
}

/* Başlıq və axtarış hissəsi */
#archive-modal h3, 
#archive-modal .modal-title {
    font-size: 20px !important;
}

#archive-modal input {
    font-size: 16px !important;
}

/* Siyahıdakı elementlərin şrift ölçüləri */
#archive-list-container .archive-item,
#archive-modal .archive-item-title {
    font-size: 18px !important; /* Əsas adlar (məs: Bakir əmi) */
}

#archive-modal .archive-item-details,
#archive-modal .archive-item-date {
    font-size: 14px !important; /* Məhsul sayı və tarix */
}

/* Seç düyməsi */
#archive-modal .btn-select, 
#archive-modal button {
    font-size: 15px !important;
}
/* ==========================================================================
   ARXİV MODALI - MƏTN VƏ ŞRİFT ÖLÇÜLƏRİNİN TƏNZİMLƏNMƏSİ
   ========================================================================== */

/* Arxiv modalının daxilindəki əsas başlıq və axtarış inputu */
#archive-modal h3, 
#archive-modal .modal-title {
    font-size: 20px !important;
}

#archive-modal input#archive-search-input {
    font-size: 16px !important;
    height: 42px !important;
}

/* Arxiv siyahısındakı hər bir elementin konteyneri */
#archive-list-container .waiting-item {
    padding: 14px 16px !important;
}

/* Müştəri adı (Əsas başlıq) */
#archive-list-container strong {
    font-size: 16px !important;
}

/* Məhsul sayı və tarix məlumatları */
#archive-list-container span {
    font-size: 13px !important;
}

/* "Seç" düyməsinin ölçüsü və rahat toxunulması üçün */
#archive-list-container .btn-load-archive {
    font-size: 16px !important;     /* Şrifti bir qədər də böyüdürük */
    padding: 10px 22px !important;    /* Daxili boşluqları artıraraq düyməni iriləşdiririk */
    border-radius: 8px !important;
    font-weight: 700 !important;
}

/* Əgər arxiv boş olarsa, çıxan "Qaimə Tapılmadı" yazısının ölçüsü */
#archive-list-container p {
    font-size: 14px !important;
}

/* Şablon siyahısındakı məhsul sətri */
.template-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #0b132b;
    border: 1px solid #3a506b;
    padding: 8px 12px;
    border-radius: 6px;
    gap: 10px;
}

.template-product-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    color: #ffffff;
    font-size: 14px;
}

.template-product-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Şablon seçimindəki miqdar inputu */
.template-item-qty {
    width: 55px !important;
    height: 32px !important;
    text-align: center !important;
    background-color: #1c2541 !important;
    border: 1px solid #3a506b !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    outline: none;
}

/* //////////////////////////////////////////////////////////////////////////////////// */

/* Şablon seçimi açılış düyməsi */
.template-select-trigger-btn {
    flex: 1;
    background-color: #0b132b;
    color: #ffffff;
    border: 1px solid #3a506b;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    transition: border-color 0.15s ease;
}

.template-select-trigger-btn:hover {
    border-color: #5bc0be;
}

/* Modal daxilindəki şablon elementləri */
.template-option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1c2541;
    border: 1px solid #3a506b;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-option-item:hover {
    background: rgba(91, 192, 190, 0.15);
    border-color: #5bc0be;
}

/* Sürətli şablon konteynerini daha yığcam etmək */
.template-selector-container {
    margin-bottom: 12px;
    padding: 10px 14px;
}

.template-inline-row {
    gap: 8px;
}

/* Əsas form elementlərinin boşluqlarını azaldıb yaxınlaşdırmaq */
.container, body {
    padding-top: 10px;
}

/* ==========================================================================
   ŞABLON MODALI - MƏTN VƏ ELEMENTLƏRİN BÖYÜDÜLMƏSİ
   ========================================================================== */

/* Modalın özünün enini və səliqəsini artırırıq */
#custom-select-modal .custom-modal-content {
    max-width: 480px !important; /* Modal pəncərəsini genişləndiririk */
    padding: 24px !important;
}

/* Modal başlığı */
#custom-select-modal .custom-modal-header {
    font-size: 19px !important;
}

/* Axtarış inputu */
#template-search-input {
    font-size: 16px !important;
    height: 44px !important;
    padding: 10px 14px !important;
}

/* Şablon seçim siyahısındakı hər bir bölmə (element) */
.template-option-item {
    padding: 16px 18px !important; /* Blokların hündürlüyünü və toxunma sahəsini böyüdür */
    border-radius: 10px !important;
    margin-bottom: 6px;
}

/* Şablonun adı (Əsas mətn) */
.template-option-item strong {
    font-size: 18px !important; /* Yazını iriləşdiririk */
}

/* Məhsul sayı məlumatı */
.template-option-item span {
    font-size: 13px !important;
}

/* "Seç >" yazısı */
.template-option-item span:last-child {
    font-size: 15px !important;
    font-weight: 700 !important;
}

#custom-select-modal .modal-content {
    transform: scale(1.35) !important; /* 1.25 - 1.35 arası istədiyiniz qədər artıra bilərsiniz */
    transform-origin: center center !important;
    transition: transform 0.2s ease;
}