:root {
    --primary-color: #1B3B6F;  /* Dark blue */
    --secondary-color: #7AB5D6;  /* Light blue */
    --accent-color: #7AB5D6;  /* Light blue */
    --background-color: #F5F7FA;  /* White */
    --text-color: #262730;  /* Dark gray/black */
    --light-accent: #7AB5D6;  /* Light blue */
    --highlight: #6B7280;  /* Gray */
    --dark-color: #262730;  /* Dark gray/black */
    --light-color: #F5F7FA;  /* White */
}

body {
    font-family: 'Rubik', 'Heebo', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.navbar {
    background: #fcfcfc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
}

.navbar-brand, .nav-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link {
    position: relative;
    margin: 0 5px;
    padding: 10px 15px !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
    background-color: rgba(27, 59, 111, 0.05);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Heebo', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* New Logo */
.new-logo {
    height: 60px;
    max-width: 300px;
    margin: 5px 0;
    transition: transform 0.3s ease;
}

.new-logo:hover {
    transform: scale(1.05);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(27, 59, 111, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(27, 59, 111, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(27, 59, 111, 0);
    }
}

/* Card styles */
.card {
    border-radius: 15px !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none !important;
    overflow: hidden;
    background-color: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12) !important;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
    padding: 15px 20px;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

.btn {
    border-radius: 30px !important;
    padding: 8px 20px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border: none !important;
    box-shadow: 0 4px 8px rgba(53, 167, 255, 0.3) !important;
}

.btn-primary:hover {
    box-shadow: 0 6px 12px rgba(53, 167, 255, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Tag Filtering Styles */
.tags-filter-container {
    margin-top: 10px;
    margin-bottom: 15px;
}

.tag-filter-item {
    margin-right: 5px;
    margin-bottom: 5px;
    position: relative;
}

.tag-filter-item .form-check-label {
    cursor: pointer;
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50rem;
    font-weight: normal;
    transition: all 0.3s ease;
    background-color: var(--light-accent);
    color: var(--text-color);
}

/* תיבת סימון נסתרת */
.tag-filter-item .tag-checkbox {
    position: absolute;
    opacity: 0;
}

/* צבעים שונים לתגיות בהתאם למיקום */
.tag-filter-item:nth-child(5n+1) .form-check-label {
    background-color: #1B3B6F; /* Dark blue */
    color: white;
}

.tag-filter-item:nth-child(5n+2) .form-check-label {
    background-color: #7AB5D6; /* Light blue */
    color: #262730;
}

.tag-filter-item:nth-child(5n+3) .form-check-label {
    background-color: #F5F7FA; /* White */
    color: #262730;
}

.tag-filter-item:nth-child(5n+4) .form-check-label {
    background-color: #6B7280; /* Gray */
    color: white;
}

.tag-filter-item:nth-child(5n+5) .form-check-label {
    background-color: #262730; /* Dark gray/black */
    color: white;
}

/* סימון בחירה עם סמל צ'קבוקס במקום שינוי צבע */
.tag-filter-item .tag-checkbox:checked + .form-check-label {
    box-shadow: inset 0 0 0 2px #333;
    position: relative;
}

.tag-filter-item .tag-checkbox:checked + .form-check-label::before {
    content: "✓";
    position: absolute;
    right: 4px;
    top: 2px;
    font-size: 10px;
    font-weight: bold;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-filter-item .form-check-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.tag-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--light-accent));
    color: var(--text-color);
    font-weight: 500;
    margin: 3px;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination .page-link {
    color: var(--primary-color);
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

/* RTL specific styles */
.dropdown-menu {
    text-align: right;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 10px;
}

.mr-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Bidirectional text support */
.bidi-auto {
    unicode-bidi: plaintext;
}

/* Hebrew text */
.hebrew {
    direction: rtl;
    text-align: right;
}

/* English text */
.english {
    direction: ltr;
    text-align: left;
}

/* Flash messages */
.alert {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(92, 219, 149, 0.2);
    color: var(--text-color);
}

.alert-error, .alert-danger {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--text-color);
}

/* Dashboard stats */
.stat-card {
    text-align: center;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.stat-card i {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.8;
}

/* Content table */
.table-responsive {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    background: white;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.table thead th {
    border: none;
    padding: 15px;
    font-weight: 500;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(76, 205, 196, 0.05);
}

/* Document details */
.document-details {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.field-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.field-value {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(76, 205, 196, 0.05);
    border-radius: 8px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Memo field styling */
.memo-content {
    min-height: 50px;
    word-break: break-word;
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    padding: 10px;
    margin-bottom: 10px;
}

/* Login page styles */
.login-logo {
    max-height: 120px;
}

.login-container {
    margin-top: 50px;
}

.login-card {
    max-width: 450px;
    margin: 0 auto;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0;
}

.login-body {
    padding: 30px;
}

.login-button {
    width: 100%;
    padding: 10px 0;
    margin-top: 20px;
}

/* Footer styles */
.footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px 15px 0 0;
    color: white;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
}

.footer-title {
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.footer-description {
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.social-icon {
    font-size: 1.5rem;
    color: white;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
}