/* ========== RESET & GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    min-height: 100vh;
    padding: 15px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

body.night-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

/* ========== CONTAINERS ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Styl dla stron dokumentów */
.document-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== HEADER ========== */
header {
    text-align: center;
    padding: 20px 0 15px 0;
    margin-bottom: 20px;
    position: relative;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.night-mode .theme-toggle {
    background: rgba(30, 30, 46, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Przełącznik języka */
.language-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-left: 10px;
}

body.night-mode .language-switcher {
    background: rgba(30, 30, 46, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lang-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.night-mode .lang-btn {
    color: #d0d0d0;
}

.lang-btn.active {
    background: linear-gradient(135deg, #4a6fa5 0%, #3a5a80 100%);
    color: white;
}

body.night-mode .lang-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.lang-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
}

body.night-mode .lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

/* Przycisk powrotu do głównej strony */
.back-to-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    color: #495057;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    text-decoration: none;
}

.back-to-main:hover {
    background: #e9ecef;
    transform: translateX(-3px);
}

body.night-mode .back-to-main {
    background: #3a3e5c;
    color: #d0d0d0;
}

body.night-mode .back-to-main:hover {
    background: #4a4e6b;
}

/* Przycisk powrotu (stary styl - dla kompatybilności) */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    color: #495057;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

body.night-mode .back-btn {
    background: #3a3e5c;
    color: #d0d0d0;
}

.back-btn:hover {
    background: #e9ecef;
    transform: translateX(-3px);
}

body.night-mode .back-btn:hover {
    background: #4a4e6b;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    width: 40%;
    height: 2px;
    background: linear-gradient(to right, transparent, #4a6fa5, transparent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

body.night-mode header::after {
    background: linear-gradient(to right, transparent, #667eea, transparent);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
}

body.night-mode header h1 {
    color: #ffffff;
}

header p {
    font-size: 0.95rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto 10px auto;
    font-weight: 400;
    transition: color 0.3s ease;
}

body.night-mode header p {
    color: #b0b0b0;
}

.logo-icon {
    color: #4a6fa5;
    margin-right: 10px;
    transition: color 0.3s ease;
}

body.night-mode .logo-icon {
    color: #667eea;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    flex: 1;
    min-width: 300px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

body.night-mode .card {
    background: #2d3047;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-title {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4f8;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

body.night-mode .card-title {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.card-title i {
    color: #4a6fa5;
    background: #f0f4f8;
    padding: 8px;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

body.night-mode .card-title i {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

body.night-mode label {
    color: #d0d0d0;
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: #f8f9fa;
    color: #333;
    transition: all 0.3s ease;
}

body.night-mode input,
body.night-mode select {
    background: #3a3e5c;
    border-color: #4a4e6b;
    color: #e0e0e0;
}

input:focus, select:focus {
    outline: none;
    border-color: #4a6fa5;
    background: white;
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.1);
}

body.night-mode input:focus,
body.night-mode select:focus {
    border-color: #667eea;
    background: #2d3047;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* ========== BUTTONS ========== */
.btn {
    background: linear-gradient(135deg, #4a6fa5 0%, #3a5a80 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 111, 165, 0.25);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.night-mode .btn:disabled {
    background: #5a5a5a;
}

.btn-secondary {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
}

.btn-secondary:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

body.night-mode .btn-secondary {
    background: linear-gradient(135deg, #3a3e5c 0%, #2d3047 100%);
    color: #d0d0d0;
}

body.night-mode .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.night-mode .btn:hover {
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

/* ========== RESULT CARD ========== */
.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#barcode-container {
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    margin-bottom: 20px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    transition: all 0.3s ease;
}

body.night-mode #barcode-container {
    background: #2d3047;
    border-color: #4a4e6b;
    background-image: linear-gradient(45deg, #3a3e5c 25%, transparent 25%), 
                    linear-gradient(-45deg, #3a3e5c 25%, transparent 25%), 
                    linear-gradient(45deg, transparent 75%, #3a3e5c 75%), 
                    linear-gradient(-45deg, transparent 75%, #3a3e5c 75%);
}

svg {
    max-width: 100%;
    height: auto;
    max-height: 140px;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.08));
}

.actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* ========== VALIDATION INFO ========== */
.validation-info {
    background: #e8f4fd;
    padding: 14px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 3px solid #4a6fa5;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

body.night-mode .validation-info {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
}

.validation-info h4 {
    margin-top: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

body.night-mode .validation-info h4 {
    color: #ffffff;
}

.validation-info ul {
    margin: 8px 0;
    padding-left: 18px;
}

.validation-info li {
    margin-bottom: 5px;
    color: #495057;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

body.night-mode .validation-info li {
    color: #d0d0d0;
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    color: #6c757d;
    padding: 20px 0;
    margin-top: 25px;
    font-size: 0.85rem;
    border-top: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

body.night-mode footer {
    color: #b0b0b0;
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ========== MESSAGES ========== */
.error {
    color: #dc3545;
    background: #fff5f5;
    padding: 14px;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 3px solid #dc3545;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

body.night-mode .error {
    background: rgba(220, 53, 69, 0.1);
    color: #ff6b6b;
    border-left-color: #ff6b6b;
}

.success {
    color: #28a745;
    background: #f0fff4;
    padding: 12px;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 3px solid #28a745;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

body.night-mode .success {
    background: rgba(40, 167, 69, 0.1);
    color: #51cf66;
    border-left-color: #51cf66;
}

.warning {
    color: #ffc107;
    background: #fffdf5;
    padding: 12px;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 3px solid #ffc107;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

body.night-mode .warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffd43b;
    border-left-color: #ffd43b;
}

.info {
    color: #17a2b8;
    background: #f0f9ff;
    padding: 12px;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 3px solid #17a2b8;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

body.night-mode .info {
    background: rgba(23, 162, 184, 0.1);
    color: #22b8cf;
    border-left-color: #22b8cf;
}

/* ========== UTILITIES ========== */
.compact-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.compact-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.hidden {
    display: none;
}

.gradient-text {
    background: linear-gradient(135deg, #4a6fa5, #2c3e50);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: all 0.3s ease;
}

body.night-mode .gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    transition: all 0.3s ease;
}

body.night-mode .status-active {
    background: rgba(81, 207, 102, 0.1);
    color: #51cf66;
}

.status-inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.generated-code-info {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    margin-top: 8px;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.3s ease;
}

body.night-mode .generated-code-info {
    color: #b0b0b0;
    background: #3a3e5c;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.4s ease-out;
}

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

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

body.night-mode ::-webkit-scrollbar-track {
    background: #2d3047;
}

body.night-mode ::-webkit-scrollbar-thumb {
    background: #4a4e6b;
}

body.night-mode ::-webkit-scrollbar-thumb:hover {
    background: #5a5e7b;
}

/* ========== THEME ICONS ========== */
.theme-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-icons .fa-sun {
    color: #ffc107;
    font-size: 1rem;
}

.theme-icons .fa-moon {
    color: #6c757d;
    font-size: 1rem;
}

body.night-mode .theme-icons .fa-sun {
    color: #6c757d;
}

body.night-mode .theme-icons .fa-moon {
    color: #667eea;
}

/* ========== CONSENT MODAL ========== */
.consent-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.consent-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.consent-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
}

body.night-mode .consent-content {
    background: #2d3047;
    color: #e0e0e0;
}

.consent-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
}

body.night-mode .consent-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.consent-header i {
    color: #4a6fa5;
    font-size: 1.8rem;
    background: #f0f4f8;
    padding: 12px;
    border-radius: 10px;
}

body.night-mode .consent-header i {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.consent-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 600;
}

body.night-mode .consent-header h3 {
    color: #ffffff;
}

.consent-body {
    padding: 20px 24px;
}

.consent-text {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #495057;
}

body.night-mode .consent-text {
    color: #d0d0d0;
}

.consent-options {
    margin-bottom: 25px;
}

.consent-option {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

body.night-mode .consent-option {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.consent-option:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

body.night-mode .consent-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.consent-option-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

body.night-mode .consent-option-title {
    color: #ffffff;
}

.consent-toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.consent-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.consent-toggle input:checked + .consent-slider {
    background: linear-gradient(135deg, #4a6fa5 0%, #3a5a80 100%);
}

body.night-mode .consent-toggle input:checked + .consent-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.consent-toggle input:checked + .consent-slider:before {
    transform: translateX(20px);
}

/* Styl dla disabled toggle */
.consent-toggle input:disabled + .consent-slider {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.consent-toggle input:disabled:checked + .consent-slider {
    background: #adb5bd;
}

body.night-mode .consent-toggle input:disabled + .consent-slider {
    background-color: #4a4e6b;
}

body.night-mode .consent-toggle input:disabled:checked + .consent-slider {
    background: #6c757d;
}

.consent-option-description {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.5;
}

body.night-mode .consent-option-description {
    color: #b0b0b0;
}

.consent-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

body.night-mode .consent-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.consent-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
    min-width: 120px;
}

.consent-btn-reject {
    background: #f8f9fa;
    color: #495057;
}

body.night-mode .consent-btn-reject {
    background: #3a3e5c;
    color: #d0d0d0;
}

.consent-btn-reject:hover {
    background: #e9ecef;
}

body.night-mode .consent-btn-reject:hover {
    background: #4a4e6b;
}

.consent-btn-accept {
    background: linear-gradient(135deg, #4a6fa5 0%, #3a5a80 100%);
    color: white;
}

body.night-mode .consent-btn-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.consent-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 111, 165, 0.25);
}

body.night-mode .consent-btn-accept:hover {
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

.consent-btn-settings {
    background: transparent;
    color: #4a6fa5;
    text-decoration: underline;
    padding: 12px 16px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

body.night-mode .consent-btn-settings {
    color: #667eea;
}

.consent-btn-settings:hover {
    text-decoration: none;
}

.consent-advanced-toggle {
    text-align: center;
    margin: 20px 0;
}

.advanced-settings {
    display: none;
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

body.night-mode .advanced-settings {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.advanced-settings.active {
    display: block;
}

.consent-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
}

body.night-mode .consent-links {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: #b0b0b0;
}

.consent-links a {
    color: #4a6fa5;
    text-decoration: none;
    margin: 0 10px;
    cursor: pointer;
}

body.night-mode .consent-links a {
    color: #667eea;
}

.consent-links a:hover {
    text-decoration: underline;
}

/* ========== CONSENT MANAGEMENT ========== */
.consent-manage-btn {
    background: #f8f9fa;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.8rem;
    color: #495057;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

body.night-mode .consent-manage-btn {
    background: #3a3e5c;
    color: #d0d0d0;
}

.consent-manage-btn:hover {
    background: #e9ecef;
}

body.night-mode .consent-manage-btn:hover {
    background: #4a4e6b;
}

footer .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.consent-info {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 10px;
    max-width: 600px;
    text-align: center;
    line-height: 1.4;
}

body.night-mode .consent-info {
    color: #b0b0b0;
}

/* ========== DOCUMENT PAGES ========== */
.document-page {
    display: none;
}

.document-page.active {
    display: block;
}

.document-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
    line-height: 1.6;
    transition: all 0.3s ease;
}

body.night-mode .document-content {
    background: #2d3047;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.document-content h2 {
    color: #2c3e50;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f4f8;
    font-weight: 600;
}

body.night-mode .document-content h2 {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.document-content h3 {
    color: #4a6fa5;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

body.night-mode .document-content h3 {
    color: #667eea;
}

.document-content p {
    margin-bottom: 15px;
    color: #495057;
}

body.night-mode .document-content p {
    color: #d0d0d0;
}

.document-content ul, .document-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.document-content li {
    margin-bottom: 8px;
    color: #495057;
}

body.night-mode .document-content li {
    color: #d0d0d0;
}

.document-content strong {
    color: #2c3e50;
    font-weight: 600;
}

body.night-mode .document-content strong {
    color: #ffffff;
}

.document-date {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

body.night-mode .document-date {
    color: #b0b0b0;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 3px solid #4a6fa5;
}

body.night-mode .contact-info {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
}

/* ========== FOOTER FOR DOCUMENT PAGES ========== */
.document-footer {
    text-align: center;
    color: #6c757d;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.85rem;
    border-top: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

body.night-mode .document-footer {
    color: #b0b0b0;
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .actions {
        flex-direction: column;
        gap: 10px;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    .card {
        padding: 18px;
    }
    
    .compact-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .theme-toggle, .language-switcher {
        margin: 0 auto;
        justify-content: center;
    }
    
    .status-indicator {
        order: 3;
    }
    
    .consent-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .consent-footer {
        flex-direction: column;
    }
    
    .consent-btn {
        min-width: 100%;
    }
    
    .document-content {
        padding: 20px;
    }
    
    .document-container {
        padding: 15px;
    }
    
    .back-to-main, .back-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .header-controls,
    .theme-toggle,
    .language-switcher,
    .consent-manage-btn,
    footer,
    .back-to-main,
    .back-btn,
    .btn:not(#print-btn) {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        padding: 0 !important;
    }
    
    .container, .document-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
    }
    
    .card, .document-content {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin: 0 !important;
    }
}