* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

/* تحسين قسم البحث */
.search-section {
    margin-bottom: 30px;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 10px;
    color: #666;
}

#searchInput {
    flex: 1;
    padding: 12px 40px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.clear-search {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
}

.search-options {
    display: flex;
    gap: 10px;
}

#searchCategory {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.search-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* تحسين نتائج البحث */
.search-results {
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid #ddd;
}

.search-summary {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.category-results {
    margin-bottom: 25px;
}

.category-results h3 {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.result-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-right: 3px solid #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.result-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.result-subtitle {
    margin-bottom: 8px;
    color: #555;
}

.result-info {
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 12px;
    margin-top: 10px;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 18px;
}

.no-results i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.archive-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.archive-form h2 {
    margin-bottom: 20px;
    color: #333;
}

.archive-form input,
.archive-form select,
.archive-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.archive-form textarea {
    height: 100px;
    resize: vertical;
}

.submit-btn {
    display: block;
    width: 200px;
    margin: 20px auto;
    padding: 12px;
    font-size: 16px;
}

#documentType {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Drag and drop styles */
.file-drop-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 25px;
    border: 2px dashed #007bff;
    border-radius: 5px;
    transition: 0.2s;
    background-color: #f8f9fa;
    margin-top: 15px;
    margin-bottom: 15px;
    cursor: pointer;
}

.file-drop-area.is-active {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: #0056b3;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0;
}

.drop-message {
    font-weight: medium;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

.upload-icon {
    font-size: 48px;
    color: #007bff;
}

.file-list {
    margin-top: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background-color: #e9ecef;
    border-radius: 4px;
}

.file-name {
    flex-grow: 1;
    margin-right: 10px;
}

.remove-file {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    cursor: pointer;
}

.remove-file:hover {
    background-color: #c82333;
}

/* Tab Styles */
.tabs-navigation {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    position: relative;
    z-index: 1;
}

.tab-btn {
    padding: 12px 25px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    /* إزالة الضبابية من النص والأيقونات */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: #666;
}

.tab-btn i {
    /* تحسين وضوح الأيقونات */
    font-size: 16px;
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
    /* إزالة الضبابية من الأيقونات */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.tab-btn:hover {
    background-color: #e9e9e9;
}

.tab-btn.active {
    background-color: #fff;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
    color: #007bff;
    font-weight: bold;
    /* تأكيد وضوح الأيقونات في التبويب النشط */
    box-shadow: 0 -3px 5px rgba(0,0,0,0.05);
    z-index: 2;
}

.tab-btn:not(.active) {
    opacity: 0.8;
}

.tab-content {
    display: none;
    padding: 25px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    background-color: #fff;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Advanced Search Fields Styles */
.advanced-search-fields {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.search-field-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.search-field-group input,
.search-field-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-field-group input:focus,
.search-field-group select:focus {
    border-color: #4CAF50;
    outline: none;
}
