/* Hospital Equipment Management System - Main Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

/* RTL Support */
body[dir="rtl"] {
    font-family: 'Arial', 'Tahoma', sans-serif;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

nav a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

/* Navigation hover effects */
nav a:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #667eea;
    border-radius: 6px;
    transition: all 0.3s ease;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

nav a.active:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    color: white !important;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background-color: #f39c12;
    border-radius: 1px;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher a {
    padding: 0.3rem 0.8rem;
    background-color: rgba(255,255,255,0.1);
    border-radius: 3px;
    font-size: 0.9rem;
}

.language-switcher a.active {
    background-color: rgba(255,255,255,0.3);
}

/* Main Content */
main {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Enhanced Login/Register Cards */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.auth-card {
    max-width: 380px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 0 0 1px rgba(255,255,255,0.2);
    padding: 2rem;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.auth-icon svg {
    filter: brightness(0) invert(1);
}

.auth-header h2 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
}

.auth-card .form-group {
    margin-bottom: 1.4rem;
}

.auth-card .form-control {
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    font-size: 0.9rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.auth-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
    transform: translateY(-2px);
}

.auth-card .btn {
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.auth-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.auth-card .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.auth-card .btn-secondary {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.auth-card .btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.auth-card label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.4rem;
    display: block;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .auth-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.4rem;
    }
    
    .auth-icon {
        width: 60px;
        height: 60px;
    }
}

.auth-link-card {
    max-width: 450px;
    margin: 1rem auto;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e9ecef;
}

.auth-link-card a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.auth-link-card a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control.error {
    border-color: #e74c3c;
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.25rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Flash Messages */
.flash-message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

body[dir="rtl"] .table th,
body[dir="rtl"] .table td {
    text-align: right;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-working {
    background-color: #d4edda;
    color: #155724;
}

.status-not-working {
    background-color: #f8d7da;
    color: #721c24;
}

.status-needs-diagnosis {
    background-color: #fff3cd;
    color: #856404;
}

.status-needs-spare-part {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Filters */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Compact Statistics Cards */
.stats-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stats-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem;
    text-align: center;
    flex: 1;
    min-width: 150px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stats-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.stats-card p {
    font-size: 0.85rem;
    margin: 0;
    color: #666;
    font-weight: 500;
}

/* Fixed Height Table Container */
.table-container-fixed {
    height: 500px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
}

.table-container-fixed .table {
    margin-bottom: 0;
    box-shadow: none;
}

.table-container-fixed .table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

/* Wider table and better button layout */
.table-container-fixed {
    width: 100%;
    max-width: none;
}

.table {
    min-width: 1200px;
}

.table td .btn {
    margin: 0 2px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.table td form {
    display: inline-block;
    margin: 0 2px;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: nowrap;
}

.action-buttons .btn {
    white-space: nowrap;
    min-width: auto;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-cards {
        flex-direction: column;
    }
    
    .stats-card {
        min-width: 100%;
    }
    
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .table-container-fixed {
        height: 400px;
    }
    
    .table {
        min-width: 800px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.1rem;
    }
    
    .action-buttons .btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-sm {
        width: auto;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    /* Extra small screens */
    @media (max-width: 480px) {
        .auth-card {
            margin: 1rem;
            padding: 1.5rem;
        }
        
        .stats-card h3 {
            font-size: 1.5rem;
        }
        
        .stats-card p {
            font-size: 0.8rem;
        }
        
        .table-container-fixed {
            height: 300px;
        }
        
        .table {
            min-width: 600px;
        }
        
        nav ul {
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .header-content {
            text-align: center;
        }
        
        .logo h1 {
            font-size: 1.4rem;
        }
    }
    
    /* Medium screens */
    @media (min-width: 769px) and (max-width: 1024px) {
        .table {
            min-width: 1000px;
        }
        
        .auth-card {
            max-width: 500px;
        }
    }
    
    /* Large screens */
    @media (min-width: 1025px) {
        .container {
            max-width: 1400px;
        }
        
        .table {
            min-width: 1300px;
        }
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer Styles */
.footer-content {
    text-align: center;
    padding: 1rem 0;
}

.footer-content p {
    margin: 0.5rem 0;
    color: #6c757d;
}

.developer-info {
    font-size: 0.9rem;
}

.developer-info strong {
    color: #bc2918;
}

.developer-info a {
    color: #3498db;
    text-decoration: none;
}

.developer-info a:hover {
    text-decoration: underline;
}

/* Spare Parts Styles */
.spare-part-preview {
    max-width: 200px;
    font-size: 0.9rem;
    color: #666;
    cursor: help;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

.spare-parts-card {
    border-left: 4px solid #e67e22;
    background: linear-gradient(135deg, #fff9f0, #ffffff);
}

.spare-parts-card h2 {
    color: #e67e22;
    margin-bottom: 1rem;
}

.spare-parts-card .alert-text {
    color: #d35400;
    font-style: italic;
    margin-bottom: 1.5rem;
    padding: 10px;
    background-color: #fef5e7;
    border-radius: 4px;
    border-left: 3px solid #e67e22;
}

.spare-part-info {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #856404;
}

#spare_part_field {
    border: 2px dashed #e74c3c;
    border-radius: 8px;
    padding: 15px;
    background-color: #fdf2f2;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 0;
}

#spare_part_field.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

/* تحسين مظهر textarea داخل حقل قطع الغيار */
#spare_part_field textarea {
    border: 1px solid #dc3545;
    background-color: #fff;
    resize: vertical;
    min-height: 80px;
}

#spare_part_field textarea:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    outline: none;
}

#spare_part_field label {
    color: #dc3545;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* Flash Messages - Enhanced Design */
.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.4s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.flash-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.flash-icon {
    font-size: 20px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

.flash-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.flash-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Flash Message Types */
.flash-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: rgba(16, 185, 129, 0.3);
}

.flash-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: rgba(239, 68, 68, 0.3);
}

.flash-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-color: rgba(245, 158, 11, 0.3);
}

.flash-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: rgba(59, 130, 246, 0.3);
}

/* Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.flash-message.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Responsive Design for Flash Messages */
@media (max-width: 768px) {
    .flash-message {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .flash-content {
        padding: 14px 16px;
    }
    
    .flash-text {
        font-size: 13px;
    }
}

/* RTL Support for Flash Messages */
[dir="rtl"] .flash-message {
    right: auto;
    left: 20px;
}

@media (max-width: 768px) {
    [dir="rtl"] .flash-message {
        left: 10px;
        right: 10px;
    }
}

/* Notification System */
.notification-item {
    position: relative;
}

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.notification-bell:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 350px;
    max-width: 400px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.notification-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.notification-header h4 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item-content {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.notification-item-content:hover {
    background-color: #f8f9fa;
}

.notification-item-content:last-child {
    border-bottom: none;
}

.notification-sender {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.notification-equipment {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 8px;
}

.notification-message {
    color: #34495e;
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.notification-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-accept {
    background: #27ae60;
    color: white;
}

.btn-accept:hover {
    background: #219a52;
}

.btn-reject {
    background: #e74c3c;
    color: white;
}

.btn-reject:hover {
    background: #c0392b;
}

.notification-time {
    color: #95a5a6;
    font-size: 11px;
    margin-top: 8px;
}

.no-notifications {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

/* RTL Support for Notifications */
[dir="rtl"] .notification-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .notification-badge {
    right: auto;
    left: -2px;
}

/* Communication Modal */
.communication-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.communication-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.communication-modal h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.contact-info h4 {
    margin-top: 0;
    color: #2c3e50;
}

.contact-detail {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-detail i {
    width: 20px;
    color: #3498db;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-close-modal {
    background: #95a5a6;
    color: white;
}

.btn-close-modal:hover {
    background: #7f8c8d;
}

/* Communication Button Styles */
.communication-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    color: white;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
}

.communication-btn:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
    color: white;
}

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

.communication-btn i {
    margin-right: 5px;
}

/* RTL Support for Communication Button */
body[dir="rtl"] .communication-btn i {
    margin-right: 0;
    margin-left: 5px;
}

/* Communication Modal Styles */
#communicationModal {
    z-index: 9999;
}

#communicationModal .modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-width: 500px;
    width: 90%;
}

#communicationModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

#communicationModal .modal-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

#communicationModal .modal-title {
    font-weight: 600;
}

#communicationModal .btn-close {
    filter: brightness(0) invert(1);
}

#communicationModal #communicationMessage {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 100px;
}

#communicationModal #communicationMessage:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Print Styles */
@media print {
    header, nav, .filters, .btn {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        font-size: 12px;
    }
}