:root {
    /* Wizz Air / DADP Color Palette */
    --wizz-pink: #c6007e;
    --wizz-pink-hover: #a10066;
    --wizz-pink-light: #fdf2f8;
    --wizz-blue: #161998;
    --wizz-blue-hover: #0e1363;
    --wizz-blue-dark: #0a0e4a;
    --wizz-cyan: #00b2e3;
    --wizz-cyan-hover: #0096c2;
    --wizz-navy: #0f1742;
    
    /* Gradients */
    --wizz-gradient: linear-gradient(105deg, #0a0e4a 0%, #161998 52%, #c6007e 100%);
    --wizz-btn-gradient: linear-gradient(135deg, #d8137f 0%, #c6007e 100%);
    --wizz-btn-hover-gradient: linear-gradient(135deg, #be0f6f 0%, #a10066 100%);
    
    /* Standard Theme Mappings */
    --primary-blue: var(--wizz-pink);
    --primary-blue-hover: var(--wizz-pink-hover);
    --orange: #ea580c;
    --green-bg: #ecfdf5;
    --green-text: #047857;
    --bg-color: #f3f5fa;
    --text-color: #111827;
    --border-color: #e2e8f0;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background: var(--wizz-gradient);
    color: var(--white);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 16px rgba(10, 14, 74, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.header-title-box h1 {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.header-title-box p {
    font-size: 11px;
    margin: 2px 0 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}

.btn-primary {
    background: var(--wizz-btn-gradient);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(198, 0, 126, 0.3);
}

.btn-primary:hover {
    background: var(--wizz-btn-hover-gradient);
    box-shadow: 0 4px 14px rgba(198, 0, 126, 0.45);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-gold {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
    border: none;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-outline {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
}

.btn-success {
    background: #107c41;
    color: white;
}

.btn-success:hover {
    background: #0b5a2f;
    color: white;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 20px;
}

/* Stats Card */
.stats-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-card-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inventory-stats-badges {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inv-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.84rem;
    white-space: nowrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.inv-stat-badge:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.inv-stat-badge .stat-label {
    font-weight: 600;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.inv-stat-badge .stat-value {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

.badge-navy {
    background: #f0f4ff;
    color: #161998;
    border-color: rgba(22, 25, 152, 0.25);
}
.badge-navy .stat-label { color: #161998; }

.badge-green {
    background: #ecfdf5;
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.3);
}
.badge-green .stat-label { color: #047857; }

.badge-magenta {
    background: #fdf2f8;
    color: #c6007e;
    border-color: rgba(198, 0, 126, 0.25);
}
.badge-magenta .stat-label { color: #c6007e; }

.badge-cyan {
    background: #f0f9ff;
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.25);
}
.badge-cyan .stat-label { color: #0284c7; }

/* Filters Box */
.custom-filters {
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 22px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s;
    outline: none;
    font-family: inherit;
}

/* Exact Act Search Row */
.exact-search-box {
    background: #fdfaf3;
    border: 1.5px solid #fcd34d;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.08);
}

.exact-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.exact-search-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.exact-search-badge {
    background: #fef3c7;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #fde68a;
}

.exact-search-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.exact-search-grid .filter-group {
    flex: 0 0 auto;
}

.exact-search-grid .fg-exact-num {
    flex: 0 0 95px !important;
    width: 95px !important;
    max-width: 95px !important;
}

.exact-search-grid .fg-exact-year {
    flex: 0 0 125px !important;
    width: 125px !important;
    max-width: 125px !important;
}

.exact-search-grid .fg-exact-date {
    flex: 0 0 135px !important;
    width: 135px !important;
    max-width: 135px !important;
}

.exact-search-grid .fg-exact-datepicker {
    flex: 0 0 135px !important;
    width: 135px !important;
    max-width: 135px !important;
}

.exact-search-grid .fg-date-from {
    flex: 0 0 135px !important;
    width: 135px !important;
    max-width: 135px !important;
}

.exact-search-grid .fg-date-to {
    flex: 0 0 135px !important;
    width: 135px !important;
    max-width: 135px !important;
}

#filter-exact-datepicker,
#filter-date-from,
#filter-date-to {
    cursor: pointer;
}

.exact-buttons-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-left: auto;
}

.exact-buttons-group .btn {
    height: 38px;
    white-space: nowrap;
    padding: 0 16px;
}

@media (max-width: 900px) {
    .exact-buttons-group {
        margin-left: 0;
    }
}

@media (max-width: 540px) {
    .exact-search-grid .filter-group,
    .fg-exact-num, 
    .fg-exact-year, 
    .fg-exact-date, 
    .fg-exact-datepicker, 
    .fg-date-from, 
    .fg-date-to,
    .exact-search-grid #filter-exact-num,
    .exact-search-grid #filter-exact-year,
    .exact-search-grid #filter-exact-date,
    .exact-search-grid #filter-exact-datepicker,
    .exact-search-grid #filter-date-from,
    .exact-search-grid #filter-date-to {
        width: 100% !important;
    }
    .exact-buttons-group {
        width: 100%;
        justify-content: flex-start;
    }
}

/* PDF Content Search Row - Special Highlighted Box */
.pdf-search-box {
    background: #fff8fc;
    border: 1.5px solid #f9a8d4;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 10px;
    position: relative;
    box-shadow: 0 2px 8px rgba(198, 0, 126, 0.05);
}

.pdf-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pdf-search-title {
    font-size: 12px;
    font-weight: 700;
    color: #9d174d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdf-search-badge {
    background: #fdf2f8;
    color: #c6007e;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #fbcfe8;
}

.search-input-group {
    display: flex;
    gap: 8px;
}

.search-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #f472b6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.search-input-group input:focus {
    border-color: #c6007e;
    box-shadow: 0 0 0 3px rgba(198, 0, 126, 0.15);
}

/* DataTables Styling */
.table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    overflow-x: auto;
}

#hcl-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

#hcl-table thead th {
    background: #f8fafc !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 10px !important;
    border-bottom: 2px solid #cbd5e1 !important;
    white-space: nowrap !important;
}

#hcl-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

#hcl-table tbody tr:hover {
    background-color: #f8faff !important;
}

#hcl-table tbody tr.selected-act-row {
    background-color: #fdf2f8 !important;
    outline: 2px solid #c6007e !important;
    outline-offset: -2px;
}

#hcl-table tbody td {
    padding: 12px 10px !important;
    font-size: 13px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    vertical-align: middle !important;
}

/* Act Badges */
.act-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f1742;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 44px;
}

.act-year-badge {
    display: inline-block;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

.act-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.act-title-text {
    font-weight: 500;
    color: #0f172a;
    line-height: 1.45;
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
    min-width: 160px;
}

#hcl-table th:nth-child(3),
#hcl-table td:nth-child(3) {
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Asigurare că DataTables responsive afișează conținutul cu wrap complet */
table.dataTable > tbody > tr.child span.dtr-data {
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
    display: inline-block;
}

.act-pdf-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.pdf-available {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.pdf-missing {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Snippet box when searching in PDF */
.search-snippet-box {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fdf2f8;
    border-left: 3px solid #c6007e;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: #334155;
    line-height: 1.4;
}

.search-snippet-box .snippet-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #c6007e;
    margin-bottom: 2px;
}

mark.fts-highlight {
    background: #fde047;
    color: #000000;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2500;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 95%;
    max-width: 850px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--wizz-gradient);
    color: white;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
    white-space: pre-wrap;
    background: #f8fafc;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: white;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .container {
        padding: 12px;
    }
    .filters-grid {
        grid-template-columns: 1fr;
    }
    .header-right {
        margin-top: 8px;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 640px) {
    #hcl-table tbody td,
    #hcl-table thead th {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    .act-title-text {
        font-size: 12.5px !important;
        line-height: 1.4 !important;
        min-width: 130px;
    }
    .act-num-badge {
        font-size: 11px;
        padding: 2px 6px;
        min-width: 36px;
    }
    .act-date-badge {
        font-size: 11px;
        padding: 2px 5px;
    }
    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
}
