:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pirot-container {
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-secondary);
    min-height: 100vh;
}

.pirot-search-wrapper {
    margin-bottom: 2rem;
    position: relative;
}

.pirot-search-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    padding-right: 3rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    font-weight: 400;
}

.pirot-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.pirot-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--shadow-md);
    background-color: var(--bg-primary);
}

.pirot-search-input:hover:not(:focus) {
    border-color: var(--border-hover);
}

.pirot-table-wrapper {
    overflow-x: auto;
    background-color: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
}

.pirot-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.pirot-table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 0 0 0.75rem 0.75rem;
}

.pirot-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

.pirot-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.pirot-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--bg-primary);
    direction: rtl;
    font-size: 0.9375rem;
}

.pirot-table thead {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pirot-table th {
    padding: 1.125rem 1.25rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.pirot-table th:first-child {
    border-top-right-radius: 0.75rem;
}

.pirot-table th:last-child {
    border-top-left-radius: 0.75rem;
}

.pirot-table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.pirot-table tbody tr:last-child td:first-child {
    border-bottom-right-radius: 0.75rem;
}

.pirot-table tbody tr:last-child td:last-child {
    border-bottom-left-radius: 0.75rem;
}

.pirot-table tbody tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

.pirot-table tbody tr:nth-child(odd) {
    background-color: var(--bg-primary);
}

.pirot-table tbody tr:hover {
    background-color: #eff6ff;
    transform: scale(1.001);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.pirot-table tbody tr:active {
    transform: scale(0.999);
}

.pirot-table td {
    padding: 1rem 1.25rem;
    text-align: right;
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.6;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.pirot-table tbody tr:last-child td {
    border-bottom: none;
}

.pirot-table tbody tr.hidden {
    display: none !important;
}

.pirot-empty-state-row {
    background-color: var(--bg-primary) !important;
}

.pirot-empty-state-row:hover {
    background-color: var(--bg-primary) !important;
    transform: none !important;
    box-shadow: none !important;
}

.pirot-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.pirot-table-wrapper.has-results {
    border-color: var(--border-color);
}

/* Loading state */
.pirot-table tbody tr.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Empty state */
.pirot-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Responsive design */
@media (max-width: 1024px) {
    .pirot-container {
        padding: 1.5rem;
    }
    
    .pirot-table th,
    .pirot-table td {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .pirot-container {
        padding: 1rem;
    }
    
    .pirot-search-input {
        padding: 0.75rem 1rem;
        padding-right: 2.5rem;
        font-size: 0.9375rem;
    }
    
    .pirot-table-wrapper {
        border-radius: 0.5rem;
    }
    
    .pirot-table th {
        padding: 0.75rem 0.875rem;
        font-size: 0.75rem;
    }
    
    .pirot-table td {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .pirot-table th:first-child {
        border-top-right-radius: 0.5rem;
    }
    
    .pirot-table th:last-child {
        border-top-left-radius: 0.5rem;
    }
}

@media (max-width: 480px) {
    .pirot-container {
        padding: 0.75rem;
    }
    
    .pirot-table th,
    .pirot-table td {
        padding: 0.625rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .pirot-search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Print styles */
@media print {
    .pirot-container {
        background: white;
        padding: 0;
    }
    
    .pirot-search-wrapper {
        display: none;
    }
    
    .pirot-table-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .pirot-table thead {
        background: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .pirot-table tbody tr {
        page-break-inside: avoid;
    }
}
