/* Global Styles */
:root {
    --primary-color: #e9901c;
    --secondary-color: #44326e;
    --text-color: #333;
    --light-color: #f5f5f5;
    --border-color: #ddd;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --font-family: 'Tajawal', Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    direction: rtl;
    background-color: #f8f8f8;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    padding: 20px 0;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.nav-item {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: rgba(233, 144, 28, 0.1);
    color: var(--primary-color);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.logo-icon {
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-left: 10px;
}

.logo-text {
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-family);
    font-size: 16px;
    transition: border 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.phone-input-container {
    display: flex;
    gap: 10px;
}

.phone-input-container select {
    width: 40%;
}

.phone-input-container input {
    width: 60%;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.submit-button:hover {
    background-color: #d78419;
}

/* Messages */
.success-message,
.error-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.success-message {
    background-color: rgba(46, 204, 113, 0.2);
    border: 1px solid var(--success-color);
}

.error-message {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.success-icon {
    width: 40px;
    height: 40px;
    background-color: var(--success-color);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 15px;
}

/* Sections */
.section-title {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: bold;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo .logo-icon {
    background-color: white;
    color: var(--primary-color);
}

.footer-logo .logo-text {
    color: white;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 14px;
    opacity: 0.8;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 20px;
    left: 20px;
}

.lang-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.lang-button:hover {
    background-color: var(--primary-color);
}

/* Login Section */
.login-section, .register-section {
    max-width: 500px;
    margin: 40px auto;
}

.login-container, .register-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-footer, .register-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.login-footer a, .register-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    margin-top: 20px;
}

.sidebar {
    width: 250px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-left: 20px;
    height: fit-content;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu-item {
    margin-bottom: 10px;
}

.sidebar-menu-link {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar-menu-link:hover, .sidebar-menu-link.active {
    background-color: rgba(233, 144, 28, 0.1);
    color: var(--primary-color);
}

.sidebar-menu-link.active {
    font-weight: bold;
}

.main-content {
    flex: 1;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-title {
    color: var(--secondary-color);
    font-size: 24px;
    font-weight: bold;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: #f8f8f8;
    font-weight: bold;
    color: var(--secondary-color);
}

.data-table tr:hover {
    background-color: rgba(233, 144, 28, 0.05);
}

.action-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    margin-left: 5px;
    transition: background-color 0.3s;
    font-size: 14px;
}

.action-button:hover {
    background-color: #d78419;
}

.action-button.delete {
    background-color: var(--error-color);
}

.action-button.delete:hover {
    background-color: #c0392b;
}

.action-button.view {
    background-color: var(--secondary-color);
}

.action-button.view:hover {
    background-color: #352556;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    color: var(--secondary-color);
    font-size: 20px;
    font-weight: bold;
}

.card-body {
    margin-bottom: 15px;
}

.card-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Chat Styles */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-sidebar {
    width: 250px;
    border-left: 1px solid var(--border-color);
    padding: 15px;
    overflow-y: auto;
}

.chat-user {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-user:hover, .chat-user.active {
    background-color: rgba(233, 144, 28, 0.1);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
    max-width: 70%;
}

.message.sent {
    margin-right: auto;
    background-color: var(--primary-color);
    color: white;
    border-radius: 15px 15px 0 15px;
    padding: 10px 15px;
}

.message.received {
    margin-left: auto;
    background-color: #f1f1f1;
    border-radius: 15px 15px 15px 0;
    padding: 10px 15px;
}

.message-time {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 5px;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.chat-input textarea {
    flex: 1;
    resize: none;
    height: 50px;
}

.chat-input button {
    margin-right: 10px;
    align-self: flex-end;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-left: 0;
        margin-bottom: 20px;
    }
    
    .chat-container {
        flex-direction: column;
        height: auto;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 200px;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .chat-main {
        height: 500px;
    }
    
    .phone-input-container {
        flex-direction: column;
    }
    
    .phone-input-container select,
    .phone-input-container input {
        width: 100%;
    }
    
    .nav {
        flex-direction: column;
        gap: 10px;
    }
}

/* Color Input Styles */
.color-picker {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.color-preview.selected {
    border-color: var(--secondary-color);
    transform: scale(1.1);
}

.color-label {
    font-size: 12px;
}

/* Loader */
.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(233, 144, 28, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilities */
.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-error {
    background-color: var(--error-color);
    color: white;
}

.badge-pending {
    background-color: #f39c12;
    color: white;
}

/* Import Arabic Font */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

/* Add this to your main.css file or as a style tag in the users.php head section */

.data-table td {
    vertical-align: middle; /* Ensure vertical alignment is centered */
}

.action-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 5px;
    flex-wrap: wrap;
}

.action-button {
    margin-bottom: 0; /* Remove any bottom margin */
    margin-left: 0; /* Remove left margin since we're using gap */
    white-space: nowrap; /* Prevent text wrapping inside buttons */
}

/* For smaller screens, add responsive behavior */
@media screen and (max-width: 768px) {
    .action-buttons-container {
        gap: 3px;
    }
    
    .action-button {
        padding: 6px 8px;
        font-size: 12px;
    }
}

