:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --background-color: #ecf0f1;
    --card-background: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: none;
    margin: 0;
    padding: 2rem;
    display: block;
    direction: ltr; 
}

.main-content {
    direction: rtl;
    margin-bottom: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.search-container {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-result-item:hover {
    background: rgba(44, 62, 80, 0.05);
}

.search-result-item .icon {
    width: 32px;
    height: 32px;
}

.search-result-item h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-color);
}

.search-result-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

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

.module-card {
    background: var(--card-background);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.module-card h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.module-card p {
    color: #666;
    font-size: 1rem;
}

.top-bar {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.user-info:hover {
    opacity: 0.8;
}

.profile-icon {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-display {
    font-size: 1.1rem;
}

/* Tools section styles moved to top-bar-tools.css */

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* Calculator styles */
.calculator {
    width: 320px;
    background: var(--primary-color);
    border-radius: 15px;
    padding: 1rem;
}

.calc-display {
    background: white;
    padding: 1rem;
    text-align: right;
    font-size: 2rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    min-height: 60px;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    padding: 1rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.calc-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.calc-btn.operator {
    background: var(--accent-color);
}

.calc-btn.zero {
    grid-column: span 2;
}

/* Task Manager styles */
.task-input {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.task-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: #f5f5f5;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.task-item.completed span {
    text-decoration: line-through;
    color: #888;
}

.task-item button {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
}

/* Enhanced Task Manager styles */
.task-manager {
    width: 900px;
    max-width: 90vw;
    background: white;
    border-radius: 20px;
    padding: 2rem;
}

.task-header {
    margin-bottom: 2rem;
}

.task-header h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.task-input {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.task-input input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.task-input input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.add-task-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.tasks-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.task-column {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
}

.task-column h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    position: relative;
}

.task-column h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 200px;
}

.task-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: move;
    transition: all 0.3s ease;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.task-item.dragging {
    opacity: 0.5;
    background: #f0f0f0;
}

.task-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 1rem;
}

.task-date {
    font-size: 0.8rem;
    color: #666;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: flex-end;
}

.delete-task {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-task:hover {
    background: rgba(231, 76, 60, 0.1);
}

@media (max-width: 900px) {
    .tasks-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .task-column {
        margin-bottom: 1rem;
    }
}

/* Enhanced Agenda styles */
.agenda-modal .modal-content {
    width: 800px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: linear-gradient(135deg, #f6f8fa, #ffffff);
    padding: 2rem;
    position: relative;
}

.calendar {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-header button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.calendar-header button:hover {
    transform: scale(1.1);
}

.calendar-header h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
    text-align: center;
}

.weekdays div {
    font-weight: bold;
    color: var(--secondary-color);
    padding: 5px;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background: rgba(52, 152, 219, 0.1);
}

.calendar-day.has-appointment {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    position: relative;
}

.calendar-day.has-appointment::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

.calendar-day.today {
    border: 2px solid var(--accent-color);
    font-weight: bold;
}

.appointments {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.appointments h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
}

.appointments h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.appointment-input {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.appointment-input input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.appointment-input input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.appointment-input button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.appointment-input button:hover {
    transform: translateY(-2px);
}

.appointment-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.appointment-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    transition: transform 0.2s;
}

.appointment-item:hover {
    transform: translateX(-5px);
}

.appointment-item .date {
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.appointment-item .title {
    font-weight: 500;
}

.appointment-item button {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.appointment-item button:hover {
    opacity: 1;
}

/* Email styles */
.email-app {
    width: 600px;
    background: white;
    border-radius: 15px;
    padding: 2rem;
}

.email-compose {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.email-input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.email-body {
    min-height: 200px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
}

.email-body:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.email-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.send-btn, .draft-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.send-btn {
    background: var(--secondary-color);
    color: white;
}

.draft-btn {
    background: #f0f0f0;
    color: var(--primary-color);
}

.send-btn:hover, .draft-btn:hover {
    transform: translateY(-2px);
}

/* Chat styles */
.chat-window {
    width: 800px;
    height: 600px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 250px 1fr;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.chat-sidebar {
    background: var(--primary-color);
    padding: 1.5rem;
    color: white;
}

.chat-sidebar-header {
    margin-bottom: 2rem;
}

.chat-sidebar-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.chat-search {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 0.8rem;
    border-radius: 10px;
    color: white;
    width: 100%;
    margin-bottom: 1rem;
}

.chat-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.chat-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: calc(100% - 120px);
}

.chat-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-contact:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-contact.active {
    background: var(--secondary-color);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.contact-status {
    font-size: 0.8rem;
    opacity: 0.8;
}

.chat-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
}

.status-online {
    background: #2ecc71;
}

.status-offline {
    background: #95a5a6;
}

.chat-main {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-messages {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 70%;
    padding: 1rem;
    border-radius: 15px;
    position: relative;
}

.message.received {
    background: #f5f5f5;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.sent {
    background: var(--secondary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message-time {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    text-align: right;
}

.chat-input {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
}

.chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.chat-input button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-input button:hover {
    transform: scale(1.05);
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        direction: rtl;
    }
}

/* Quick Access Section */
.quick-access {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0 2rem;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.quick-access h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 1rem;
}

.quick-access h2::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 2px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: none;
    background: linear-gradient(135deg, #f6f8fa, #ffffff);
    border-radius: 12px;
    cursor: move;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-btn:hover::before {
    opacity: 1;
}

.quick-action-btn .icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.8rem;
    stroke: var(--secondary-color);
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

.quick-action-btn:hover .icon {
    stroke: var(--accent-color);
    transform: scale(1.1);
}

.quick-action-btn span {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-align: center;
}

.quick-action-btn.dragging {
    opacity: 0.5;
    background: #f8f9fa;
}

/* Inventory Dashboard styles */
.inventory-dashboard {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.inventory-dashboard h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.inventory-dashboard h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.inventory-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.inventory-module {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.inventory-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inventory-module:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.inventory-module:hover::before {
    opacity: 1;
}

.inventory-module .icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    stroke: var(--secondary-color);
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

.inventory-module:hover .icon {
    stroke: var(--accent-color);
    transform: scale(1.1);
}

.inventory-module h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
}