body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
}

.login-page {
    width: 100%;
    height: 100vh;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-wrapper {
    margin-bottom: 20px;
}

.logo-circle {
    display: inline-block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
}

.logo-circle:hover {
    border-color: #667eea;
}

.logo-circle input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.camera {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #ccc;
}

#logoPreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: none;
}

h2 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

p {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.error {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

button {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #5a6fd8;
}

@media (max-width: 480px) {
    .login-card {
        padding: 20px;
        margin: 20px;
    }
}

/* Dashboard Styles */
.dashboard-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0 160px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    gap: 30px;
    position: relative;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    padding: 5px 10px;
    margin-left: auto;
    order: 3;
}

.dashboard-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 0;
    width: 100%;
    max-width: 1200px;
    margin: 20px 20px 20px 20px;
    animation: fadeIn 0.5s ease-in;
    overflow: hidden;
}

.dashboard-container {
    display: flex;
    min-height: 600px;
}

.nav {
    display: flex;
    gap: 40px;
    flex: 1;
    justify-content: center;
    margin: 0 30px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-link.active,
.nav-link:hover {
    background: #667eea;
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.user-menu button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 100px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    pointer-events: none;
}

.sidebar-overlay.active {
    display: block;
    pointer-events: auto;
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #666;
    transition: background 0.3s;
}

.sidebar-link.active,
.sidebar-link:hover {
    background: #f0f0f0;
    color: #333;
}

.icon {
    margin-left: 10px;
    font-size: 18px;
}

.main-content {
    flex: 1;
    padding: 30px;
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: calc(100vh - 100px);
    overflow-y: auto;
    position: relative;
}

.sidebar.mobile-open {
    position: fixed;
    right: 0;
    top: 100px;
    width: 100%;
    max-width: 280px;
    height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 999;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
}

.main-content h1 {
    color: #333;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.stat-change {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 5px;
    display: inline-block;
}

.stat-change.positive {
    background: #d4edda;
    color: #155724;
}

.stat-change.negative {
    background: #f8d7da;
    color: #721c24;
}

.recent-activity {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recent-activity h2 {
    color: #333;
    margin-bottom: 20px;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: #666;
}

.activity-list li:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        order: 2;
    }
    .main-content {
        order: 1;
    }
    .dashboard-header {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 20px;
    }
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        gap: 10px;
    }
    
    .dashboard-header {
        padding: 0 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .user-menu {
        width: 100%;
        justify-content: center;
    }
    
    .sidebar {
        width: 100%;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .dashboard-card {
        margin: 10px;
        max-width: 100%;
    }
    
    #searchInput {
        width: 100%;
        margin-top: 10px;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px !important;
    }
}

/* Mobile Styles - Extra Small Screens */
@media (max-width: 480px) {
    .dashboard-header {
        padding: 0 5px;
    }
    
    .nav {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        width: 100% !important;
        font-size: 16px;
    }
    
    .btn-primary {
        width: 100%;
        padding: 10px;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    #searchInput {
        width: 100%;
        margin-top: 0;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9997;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in;
}

.modal.show {
    display: flex !important;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fefefe;
    padding: 24px;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* شريط السكرول داخل الموادل */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox scrollbar */
.modal-content {
    scrollbar-color: #888 #f1f1f1;
    scrollbar-width: thin;
}

.close {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #333;
}

/* تحسين Form داخل Modal */
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-content button {
    padding: 12px 20px;
    margin-top: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-content .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.modal-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-content .btn-primary:active {
    transform: translateY(0);
}

/* Form Groups */
.form-group {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.form-group .required {
    color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

@media (max-width: 768px) {
    .form-group label {
        font-size: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 10px;
    }
}.modal-content .btn-primary:active {
    transform: translateY(0);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        padding: 16px;
        max-height: 90vh;
    }

    .modal-content h2 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        padding: 10px;
        font-size: 16px;
    }

    .close {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
}

/* Table Styles */
.main-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: fit-content;
}

th, td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

th {
    background: #f5f5f5;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox scrollbar */
.table-wrapper {
    scrollbar-color: #888 #f1f1f1;
    scrollbar-width: thin;
}

/* Mobile scrollbar indicator */
@media (max-width: 768px) {
    table {
        font-size: 13px;
    }

    th, td {
        padding: 8px;
    }

    .main-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-right: 0;
    }

    /* إضافة مؤشر بصري للسكرول */
    table::after {
        content: '';
        display: block;
        width: 20px;
        height: 1px;
        flex-shrink: 0;
    }
}

/* مؤشرات السكرول الجانبي */
.scroll-indicator {
    position: absolute;
    top: 0;
    width: 30px;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
}

.scroll-indicator.visible {
    opacity: 1;
}

.scroll-indicator-left {
    left: 0;
    background: linear-gradient(to right, rgba(102, 126, 234, 0.3) 0%, transparent 100%);
}

.scroll-indicator-right {
    right: 0;
    background: linear-gradient(to left, rgba(102, 126, 234, 0.3) 0%, transparent 100%);
}

/* رسالة التلميح */
.scroll-hint {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
}

.btn-edit {
    background: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

/* أيقونات نقية بدون أسلوب زر */
.icon-btn {
    cursor: pointer;
    font-size: 18px;
    margin: 0 6px;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 4px;
    border-radius: 4px;
    user-select: none;
}

.icon-btn:hover {
    transform: scale(1.2);
    opacity: 0.7;
}

.icon-btn:active {
    transform: scale(0.95);
}

/* أيقونة التعديل */
.icon-edit {
    color: #28a745;
}

.icon-edit:hover {
    background: rgba(40, 167, 69, 0.1);
}

/* أيقونة الحذف */
.icon-delete {
    color: #dc3545;
}

.icon-delete:hover {
    background: rgba(220, 53, 69, 0.1);
}

.btn-icon.btn-delete {
    background: rgba(220, 53, 69, 0.1);
}

.btn-icon.btn-delete:hover {
    background: rgba(220, 53, 69, 0.2);
}

.actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

#searchInput {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 250px;
    flex-shrink: 0;
    margin-top: 15px;
}

/* Phone Input Styles */
input[type="tel"] {
    direction: ltr;
    text-align: right;
}

/* Checkboxes styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0 5px;
}

table input[type="checkbox"] {
    margin-right: auto;
    margin-left: auto;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 0 15px;
        height: 70px;
        flex-direction: row-reverse;
    }
    
    .logo {
        order: 2;
        margin: 0 auto;
    }
    
    .hamburger {
        display: block;
        order: 3;
        position: absolute;
        right: 15px;
        top: 15px;
    }
    
    .nav {
        display: none;
    }
    
    .sidebar {
        display: none;
    }
    
    .sidebar.mobile-open {
        display: block;
    }
    
    .dashboard-container {
        margin-right: 0;
    }
    
    .user-menu {
        gap: 10px;
        order: 1;
    }
    
    .user-menu button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 0 10px;
        height: 60px;
        flex-direction: row-reverse;
    }
    
    .logo {
        order: 2;
        margin: 0 auto;
        flex-shrink: 0;
    }
    
    .hamburger {
        display: block;
        font-size: 18px;
        order: 3;
        padding: 0 2px;
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        height: auto;
        width: auto;
        line-height: 1;
        text-align: center;
        background: none;
        border: none;
    }
    
    .logo img {
        height: 45px !important;
    }
    
    .user-menu {
        gap: 5px;
        flex-shrink: 0;
        order: 1;
    }
    
    .user-menu span {
        display: none;
    }
    
    .user-menu button {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .sidebar.mobile-open {
        width: 100%;
        max-width: 100%;
        height: calc(100vh - 60px);
    }
    
    /* Table responsive styles */
    table {
        font-size: 12px;
        width: 100%;
        min-width: 600px;
    }
    
    table td, table th {
        padding: 8px 5px;
    }
    
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 20px;
    }
    
    .actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-box {
        width: 100%;
    }
    
    button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea {
        font-size: 16px;
        padding: 8px;
    }
    
    .dashboard-card {
        padding: 10px;
        margin: 10px 5px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    h1, h2 {
        font-size: 18px;
    }
    
    .modal {
        width: 95%;
        max-width: 100%;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* POS Styles */
.pos-container {
    display: flex;
    gap: 20px;
}

.products-section, .cart-section {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.product-item {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
}

.product-item:hover {
    background: #f0f0f0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.cart-total {
    margin-top: 20px;
    text-align: center;
}

.cart-total p {
    font-size: 18px;
    font-weight: bold;
}

/* Report Tabs */
.report-tabs {
    margin-bottom: 20px;
}

.tab-btn {
    background: #f5f5f5;
    border: none;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

/* ===== Menu Button Outside Header but Aligned ===== */
.menu-btn {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 44px;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 10000 !important;
    color: #333;
    display: block !important;
    padding: 0;
    margin: 0 !important;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.menu-btn:hover {
    background-color: #f5f5f5;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.menu-btn:active {
    transform: scale(0.95);
}

/* ===== Install Prompt Styles ===== */
.install-prompt {
    position: fixed;
    bottom: -400px;
    right: 16px;
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

.install-prompt.show {
    bottom: 20px;
}

@keyframes slideUp {
    from {
        bottom: -400px;
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        bottom: 20px;
        opacity: 1;
        transform: scale(1);
    }
}

.install-prompt-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100%;
}

.install-prompt-header {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.install-prompt-close {
    cursor: pointer;
    font-size: 20px;
    color: #999;
    transition: color 0.3s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    hover: {
        background: #f5f5f5;
    }
}

.install-prompt-close:hover {
    color: #333;
    background: #f5f5f5;
}

.install-prompt-body {
    padding: 20px 16px;
    text-align: center;
    flex: 1;
}

.install-prompt-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.install-prompt-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.install-prompt-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.install-prompt-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
}

.benefit-icon {
    font-size: 24px;
}

.install-prompt-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    justify-content: flex-end;
}

.btn-dismiss,
.btn-install {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-dismiss {
    background: #f0f0f0;
    color: #333;
}

.btn-dismiss:hover {
    background: #e0e0e0;
}

.btn-install {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-install:active {
    transform: translateY(0);
}

/* جعل النافذة توافقية مع الشاشات الصغيرة */
@media (max-width: 480px) {
    .install-prompt {
        right: 8px;
        left: 8px;
        max-width: none;
        bottom: -500px;
    }

    .install-prompt.show {
        bottom: 8px;
    }

    .install-prompt-benefits {
        grid-template-columns: 1fr;
    }

    .install-prompt-footer {
        flex-direction: column;
    }

    .btn-dismiss,
    .btn-install {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-btn {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .menu-btn {
        display: none !important;
    }
}

/* ===== تنسيق تحذيرات التواريخ ===== */

/* صف كامل بلون تحذير للموظفين الذين تقترب صلاحياتهم من الانتهاء */
tr.row-expiring {
    background-color: #ffe6e6 !important;
    border-left: 4px solid #ff0000 !important;
}

tr.row-expiring:hover {
    background-color: #ffcccc !important;
}

/* خلايا التاريخ المنتهية (باللون الأحمر الداكن) */
.date-expired {
    background-color: #ff4444 !important;
    color: white !important;
    font-weight: bold !important;
    text-decoration: line-through !important;
    border-radius: 3px;
    padding: 5px;
}

/* خلايا التاريخ قريبة من الانتهاء (باللون الأصفر/البرتقالي) */
.date-warning {
    background-color: #ffaa00 !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 3px;
    padding: 5px;
}