/* style.css */
/* إعدادات عامة */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* سمة شمسية زجاجية (Solar Glassmorphism) */
body {
    background: linear-gradient(135deg, #FFB75E, #ED8F03);
    background-attachment: fixed;
    color: #fff;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
}

/* الشاشات */
.screen {
    display: none;
    height: 100vh;
    flex-direction: column;
}
.screen.active {
    display: flex;
}

/* شاشة تسجيل الدخول */
#login-screen {
    justify-content: center;
    align-items: center;
}
.login-box {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2) !important;
    width: 90%;
    max-width: 400px;
}
.login-box h2 { margin-bottom: 25px; color: #fff; font-size: 22px; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }

/* الرأس والمحتوى */
header {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white;
    text-align: center; 
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 10;
    position: relative;
}
header h1 { text-shadow: 2px 2px 4px rgba(0,0,0,0.4); }

main {
    flex: 1; overflow-y: auto; padding: 15px; padding-bottom: 80px;
}

/* حالة الاتصال بالإنترنت */
.network-status {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.online { background-color: #27ae60; }
.offline { background-color: #e74c3c; }
.syncing { background-color: #f39c12; }

/* التبويبات السفلية زجاجية */
.bottom-nav {
    position: fixed; bottom: 0; width: 100%;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    display: flex;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    overflow: hidden;
}
.nav-btn {
    flex: 1; padding: 15px 0; border: none;
    background: transparent; font-size: 16px; font-weight: bold;
    color: rgba(255,255,255,0.7); cursor: pointer;
    transition: all 0.3s;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.nav-btn.active {
    color: #fff !important; 
    background-color: rgba(255,255,255,0.2) !important;
    border-top: 4px solid #fff !important;
    text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* المحتوى داخل التبويبات */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* الأزرار ذات التأثير ثلاثي الأبعاد 3D */
button { 
    cursor: pointer; 
    border-radius: 12px !important; 
    border: none; 
    padding: 12px 15px; 
    font-weight: bold; 
    font-size: 15px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2), 0 10px 20px rgba(0,0,0,0.2) !important;
    transition: all 0.1s !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}
button:active {
    transform: translateY(6px) !important;
    box-shadow: 0 0px 0 rgba(0,0,0,0.2), 0 2px 5px rgba(0,0,0,0.2) !important;
}

.btn-primary { background: linear-gradient(135deg, #f39c12, #d35400) !important; color: white !important; width: 100%; margin-bottom: 10px;}
.btn-secondary { background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important; color: white !important; box-shadow: 0 6px 0 #555, 0 10px 20px rgba(0,0,0,0.2) !important;}
.btn-success { background: linear-gradient(135deg, #2ecc71, #27ae60) !important; color: white !important; width: 100%; margin-bottom: 10px; box-shadow: 0 6px 0 #1e8449, 0 10px 20px rgba(0,0,0,0.2) !important;}
.btn-danger { background: linear-gradient(135deg, #e74c3c, #c0392b) !important; color: white !important; box-shadow: 0 6px 0 #922b21, 0 10px 20px rgba(0,0,0,0.2) !important;}
.btn-warning { background: linear-gradient(135deg, #f1c40f, #f39c12) !important; color: white !important; width: 100%; margin-bottom: 5px; box-shadow: 0 6px 0 #b9770e, 0 10px 20px rgba(0,0,0,0.2) !important;}
.btn-small { padding: 8px 12px; font-size: 13px; margin-bottom: 0; width: auto;}

/* حقول الإدخال ثلاثية الأبعاد زجاجية */
input, select {
    width: 100%; padding: 12px; margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.5); border-radius: 12px;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.2);
    background-color: rgba(255,255,255,0.8);
    font-size: 15px;
    color: #333;
    transition: all 0.2s ease;
}
input:focus, select:focus {
    outline: none; 
    border-color: #fff;
    background-color: #fff;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.1), 0 0 10px rgba(255, 255, 255, 0.8);
}
#search-inventory, #search-customer {
    margin-top: 10px;
}

.input-group { display: flex; align-items: stretch; margin-bottom: 15px;}
.country-code {
    background: rgba(255,255,255,0.7);
    padding: 12px; border: 1px solid rgba(255,255,255,0.5);
    border-left: none; border-radius: 0 12px 12px 0; 
    direction: ltr; font-weight: bold; color: #555;
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.1);
}

/* المخزون */
.inventory-selectors { display: flex; gap: 10px; margin-bottom: 15px; }
.inventory-selectors button { 
    flex: 1; 
    background: rgba(255,255,255,0.2) !important; 
    color: #fff !important; 
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 0 rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.1) !important;
}
.inventory-selectors button.active { 
    background: linear-gradient(135deg, #e67e22, #d35400) !important; 
    color: white !important; 
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 0 #a04000, 0 5px 10px rgba(0,0,0,0.2) !important;
}

/* القوائم والبطاقات الزجاجية ثلاثية الأبعاد */
.list-container { display: flex; flex-direction: column; gap: 15px; }
.card {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 18px; border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    display: flex; justify-content: space-between; align-items: center;
    border-right: 5px solid rgba(255,255,255,0.8);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25) !important;
}
.card-info h4 { margin-bottom: 8px; color: #fff; font-size: 18px; text-shadow: 1px 1px 2px rgba(0,0,0,0.4);}
.card-info p { font-size: 14px; color: #f0f0f0; margin-bottom: 3px; font-weight: bold; text-shadow: 1px 1px 1px rgba(0,0,0,0.3);}
.card-actions { display: flex; gap: 8px; flex-direction: column;}

/* تفاصيل الزبون */
.balance-card {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(15px) !important; 
    padding: 20px; border-radius: 15px;
    text-align: center; margin: 15px 0; 
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.balance-card h3 { color: #fff; font-size: 28px; direction: ltr; margin-top: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5);}
.action-buttons { display: flex; gap: 10px; }

/* النوافذ المنبثقة (Modals) الزجاجية */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); justify-content: center; align-items: center; z-index: 1000;
    backdrop-filter: blur(8px);
}
.modal.active { display: flex; }
.modal-content {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    padding: 25px; border-radius: 20px;
    width: 92%; max-width: 400px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4) !important;
}
.modal-large { max-width: 600px; }
.modal-content h3 { margin-bottom: 20px; text-align: center; border-bottom: 2px solid rgba(255,255,255,0.3); padding-bottom: 12px; color: #fff; text-shadow: 1px 1px 3px rgba(0,0,0,0.5);}
.modal-actions { display: flex; gap: 10px; margin-top: 5px; }
.modal-actions button { margin-bottom: 0; flex: 1; }

.rent-item-row {
    display: flex; gap: 8px; margin-bottom: 12px; align-items: stretch;
    background: rgba(255,255,255,0.15); padding: 12px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}
.rent-item-row select { margin-bottom: 0; flex: 1; }

.rent-item-dropdown div:hover {
    background-color: rgba(255,255,255,0.9);
    color: #333;
}

/* الوضع الليلي الداكن (Deep Solar Dark) */
body.dark-mode { background: linear-gradient(135deg, #2c3e50, #000000); color: #e0e0e0; }
.dark-mode .card, .dark-mode .modal-content, .dark-mode .login-box, .dark-mode header, .dark-mode .bottom-nav { 
    background: rgba(0, 0, 0, 0.4) !important; border-color: rgba(255,255,255,0.1) !important; 
}
.dark-mode input, .dark-mode select { background-color: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.2); }
