﻿/* Modern Legal Affairs Portal Theme */
/* ================================== */

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
}

/* Validation - Hide empty validation messages */
.text-danger:empty {
    display: none;
}

.text-danger:not(:empty) {
    display: flex;
}
.logo {
    direction: ltr;
}
.container {
    max-width: 1400px;
}

/* Page Header Styles */
/* ================== */
.page-header {
    background: linear-gradient(145deg, #2a2018 0%, #3e2f23 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: inline-block;
}

.page-subtitle {
    color: #888;
    font-size: 1rem;
    margin-top: 10px;
}

/* Header Actions */
/* ============== */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Buttons */
/* ======= */
.btn-create {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: #1a1a1a;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

    .btn-create:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
        color: #000;
    }

.btn {
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #b0b0b0;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #d4af37;
        transform: translateY(-2px);
    }

.btn-danger {
    background: rgba(231, 76, 60, 0.2);
    color: #ec7063;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

    .btn-danger:hover {
        background: rgba(231, 76, 60, 0.3);
        transform: translateY(-2px);
    }

.btn-success {
    background: rgba(46, 204, 113, 0.2);
    color: #52c77c;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

    .btn-success:hover {
        background: rgba(46, 204, 113, 0.3);
        transform: translateY(-2px);
    }

/* Search Box */
/* ========== */
.search-box {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    position: relative;
}

    .search-box input {
        width: 100%;
        padding: 12px 15px 12px 40px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(212, 175, 55, 0.2);
        border-radius: 8px;
        color: #f5f5f5;
        font-size: 0.95rem;
        transition: all 0.3s ease;
        text-align: right;
        direction: rtl;
    }

        .search-box input:focus {
            outline: none;
            border-color: #d4af37;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
        }

        .search-box input::placeholder {
            color: #888;
        }

    .search-box i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #d4af37;
    }

/* Filter Section */
/* ============== */
.filter-section {
    background: linear-gradient(145deg, #2a2018 0%, #3e2f23 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.filter-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #d4af37;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

    .toggle-icon.rotated {
        transform: rotate(180deg);
    }

#filterContent {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    #filterContent.expanded {
        max-height: 1000px;
    }

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    color: #d4af37;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: #f5f5f5;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

    .filter-input:focus,
    .filter-select:focus {
        outline: none;
        border-color: #d4af37;
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    }

    .filter-input::placeholder {
        color: #888;
    }

    .filter-select option {
        background: #2a2018;
        color: #f5f5f5;
    }

.filter-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-apply {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

    .btn-apply:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    }

.btn-clear {
    background: rgba(231, 76, 60, 0.2);
    color: #ec7063;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

    .btn-clear:hover {
        background: rgba(231, 76, 60, 0.3);
        transform: translateY(-2px);
    }

.results-info {
    color: #888;
    font-size: 0.9rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.results-count {
    color: #d4af37;
    font-weight: 600;
}

/* Statistics Cards */
/* ================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #2a2018 0%, #3e2f23 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #d4af37;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

/* Table Styles */
/* ============ */
.table-container {
    background: linear-gradient(145deg, #2a2018 0%, #3e2f23 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    direction: rtl;
}

    .custom-table thead {
        background: linear-gradient(135deg, #1a1410 0%, #2a1f15 100%);
    }

        .custom-table thead th {
            padding: 18px 15px;
            font-weight: 600;
            color: #d4af37;
            text-align: right;
            border-bottom: 2px solid rgba(212, 175, 55, 0.3);
            font-size: 0.95rem;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }

    .custom-table tbody tr {
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    }

        .custom-table tbody tr:hover {
            background: rgba(212, 175, 55, 0.08);
            transform: scale(1.01);
        }

    .custom-table tbody td {
        padding: 16px 15px;
        color: #e0e0e0;
        text-align: right;
        vertical-align: middle;
    }

.name-cell {
    font-weight: 500;
    color: #f4e5a1;
}

/* Badges */
/* ====== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-status,
.badge-type,
.badge-primary {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge-info {
    background: rgba(52, 152, 219, 0.2);
    color: #5dade2;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.badge-individual {
    background: rgba(52, 152, 219, 0.2);
    color: #5dade2;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.badge-company {
    background: rgba(155, 89, 182, 0.2);
    color: #bb8fce;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

/* Action Buttons */
/* ============== */
.actions-cell {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn-action {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-details {
    background: rgba(52, 152, 219, 0.2);
    color: #5dade2;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

    .btn-details:hover {
        background: rgba(52, 152, 219, 0.3);
        color: #85c1e9;
        transform: translateY(-2px);
    }

.btn-edit {
    background: rgba(241, 196, 15, 0.2);
    color: #f4d03f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

    .btn-edit:hover {
        background: rgba(241, 196, 15, 0.3);
        color: #f7dc6f;
        transform: translateY(-2px);
    }

.btn-delete {
    background: rgba(231, 76, 60, 0.2);
    color: #ec7063;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

    .btn-delete:hover {
        background: rgba(231, 76, 60, 0.3);
        color: #f1948a;
        transform: translateY(-2px);
    }

/* Empty State */
/* =========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

    .empty-state i {
        font-size: 4rem;
        color: #d4af37;
        opacity: 0.3;
        margin-bottom: 20px;
    }

    .empty-state h3 {
        color: #b0b0b0;
        font-weight: 500;
        margin-bottom: 10px;
    }

/* Form Styles */
/* =========== */
.form-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.form-card {
    background: linear-gradient(145deg, #2a2018 0%, #3e2f23 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #d4af37;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.form-grid-full {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    color: #d4af37;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.required::after {
    content: "*";
    color: #ec7063;
    margin-right: 3px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: #ffffff !important;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

    .form-control:focus {
        outline: none;
        border-color: #d4af37;
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
        color: #ffffff !important;
    }

    .form-control:disabled,
    .form-control[readonly] {
        background: rgba(255, 255, 255, 0.02);
        border-color: rgba(212, 175, 55, 0.1);
        color: #888 !important;
        cursor: not-allowed;
    }

    .form-control::placeholder {
        color: #666;
    }

input.form-control,
textarea.form-control,
select.form-control {
    color: #ffffff !important;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 30px rgba(42, 32, 24, 0.9) inset !important;
    box-shadow: 0 0 0 30px rgba(42, 32, 24, 0.9) inset !important;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4af37' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 40px;
}

    select.form-control option {
        background: #2a2018;
        color: #f5f5f5;
    }

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.text-danger {
    color: #ec7063;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .text-danger::before {
        content: "⚠";
    }

.validation-summary {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    color: #ec7063;
}

    .validation-summary ul {
        margin: 0;
        padding-right: 20px;
    }

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

/* Details Page Specific */
/* ===================== */
.details-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.full-name {
    font-size: 1.5rem;
    color: #f4e5a1;
    font-weight: 600;
    margin-bottom: 15px;
}

.status-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.case-info-badge,
.transaction-info-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 15px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}


.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 10px; 
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

    .detail-item:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(212, 175, 55, 0.2);
    }

.detail-label {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-value {
    color: #f5f5f5;
    font-size: 1rem;
    font-weight: 500;
    word-wrap: break-word;
}

    .detail-value.empty {
        color: #666;
        font-style: italic;
    }

.detail-item-full {
    grid-column: 1 / -1;
}

    .detail-item-full .detail-value {
        line-height: 1.6;
        white-space: pre-wrap;
    }

.timeline-info {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.timeline-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.timeline-label {
    color: #888;
    font-size: 0.85rem;
}

.timeline-value {
    color: #d4af37;
    font-size: 1rem;
    font-weight: 600;
}

.metadata-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metadata-label {
    color: #888;
    font-size: 0.85rem;
}

.metadata-value {
    color: #d4af37;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Download Dropdown */
/* ================= */
.download-dropdown {
    position: relative;
    display: inline-block;
}

.download-menu {
    display: none;
    position: absolute;
    background: linear-gradient(145deg, #2a2018 0%, #3e2f23 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    min-width: 200px;
    z-index: 1000;
    top: 100%;
    right: 0;
    margin-top: 5px;
    padding: 8px 0;
}

    .download-menu.show {
        display: block;
    }

    .download-menu button {
        width: 100%;
        padding: 12px 20px;
        background: transparent;
        border: none;
        color: #f5f5f5;
        text-align: right;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.95rem;
    }

        .download-menu button:hover {
            background: rgba(212, 175, 55, 0.2);
            color: #d4af37;
        }

/* Print Styles */
/* ============ */
@media print {
    body {
        background: white;
        color: black;
    }

    .page-header,
    .form-card,
    .details-card {
        background: linear-gradient(145deg, #2a2018 0%, #3e2f23 100%);
        border: 1px solid rgba(212, 175, 55, 0.2);
        border-radius: 16px;
        padding: 35px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        margin-bottom: 30px;
    }

    .page-title {
        color: #d4af37;
        -webkit-text-fill-color: #d4af37;
    }

    .full-name {
        color: #333;
    }

    .section-title {
        color: #d4af37;
        border-bottom-color: #d4af37;
    }

    .detail-label {
        color: #666;
    }

    .detail-value {
        color: #000;
    }

    .detail-item {
        background: #f9f9f9;
        border: 1px solid #ddd;
    }

    .badge {
        background: #f0f0f0;
        color: #333;
        border: 1px solid #ccc;
    }

    .timeline-info {
        background: #f9f9f9;
        border: 1px solid #ddd;
    }

    .timeline-value {
        color: #d4af37;
    }

    .action-buttons,
    .no-print {
        display: none !important;
    }

    .details-container,
    .form-container {
        max-width: 100%;
        margin: 0;
        padding: 20px;
    }
}

/* Responsive Design */
/* ================= */
@media (max-width: 768px) {
    .custom-table {
        font-size: 0.85rem;
    }

        .custom-table thead th,
        .custom-table tbody td {
            padding: 12px 8px;
        }

    .actions-cell {
        flex-direction: column;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-card,
    .details-card {
        padding: 20px;
    }

    .timeline-info {
        flex-direction: column;
        gap: 15px;
    }
}

/* Animations */
/* ========== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-card,
.details-card {
    animation: slideIn 0.5s ease;
}

    .details-card:nth-child(2) {
        animation-delay: 0.1s;
    }

    .details-card:nth-child(3) {
        animation-delay: 0.2s;
    }

    .details-card:nth-child(4) {
        animation-delay: 0.3s;
    }
