/* Lepton Theme CSS - Inspired by ABP Framework Lepton Theme */

:root {
    --lepton-primary: #3f51b5;
    --lepton-primary-dark: #303f9f;
    --lepton-primary-light: #c5cae9;
    --lepton-accent: #ff4081;
    --lepton-sidebar-width: 260px;
    --lepton-sidebar-width-collapsed: 80px;
    --lepton-header-height: 64px;
    --lepton-footer-height: 50px;
    --lepton-sidebar-bg: #2c3e50;
    --lepton-sidebar-text: #ecf0f1;
    --lepton-sidebar-active: #3498db;
    --lepton-content-bg: #f5f5f5;
    --lepton-card-bg: #ffffff;
    --lepton-text-primary: #333333;
    --lepton-text-secondary: #777777;
    --lepton-border-color: #e0e0e0;
}

/* Base Styles */
body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--lepton-content-bg);
    color: var(--lepton-text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Layout Structure */
.lepton-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.lepton-sidebar {
    width: var(--lepton-sidebar-width);
    background-color: var(--lepton-sidebar-bg);
    color: var(--lepton-sidebar-text);
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.lepton-sidebar.collapsed {
    width: var(--lepton-sidebar-width-collapsed);
}

.sidebar-header {
    height: var(--lepton-header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--lepton-sidebar-text);
    flex-grow: 1;
    overflow: hidden;
}

.logo-default {
    height: 40px;
    margin-left: 10px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.collapsed .logo-text {
    opacity: 0;
    width: 0;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--lepton-sidebar-text);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.sidebar-content {
    padding: 15px 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-header {
    padding: 15px 20px 5px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-menu-item {
    margin: 5px 0;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 12px 20px;
    color: var(--lepton-sidebar-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

[dir="rtl"] .sidebar-menu-link { justify-content: flex-end; }
[dir="ltr"] .sidebar-menu-link { justify-content: flex-start; }

[dir="rtl"] .sidebar-menu-link span { text-align: right; }
[dir="ltr"] .sidebar-menu-link span { text-align: left; }

.sidebar-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-menu-item.active .sidebar-menu-link {
    background-color: rgba(255, 255, 255, 0.1);
    border-right-color: var(--lepton-sidebar-active);
    color: #fff;
}

.sidebar-menu-link i {
    margin-inline-end: 15px; /* يدعم RTL وLTR تلقائياً */
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-menu-link span {
    transition: opacity 0.3s ease;
}

.collapsed .sidebar-menu-link span {
    opacity: 0;
    width: 0;
}

/* Main Content Area */
[dir="rtl"] .lepton-main {
    flex: 1;
    margin-right: var(--lepton-sidebar-width);
    margin-left: 0;
    transition: margin 0.3s ease;
    display: flex;
    flex-direction: column;
}
[dir="ltr"] .lepton-main {
    flex: 1;
    margin-left: var(--lepton-sidebar-width);
    margin-right: 0;
    transition: margin 0.3s ease;
    display: flex;
    flex-direction: column;
}

.collapsed + .lepton-main {
    margin-right: var(--lepton-sidebar-width-collapsed);
}

/* Header Styles */
.lepton-header {
    height: var(--lepton-header-height);
    background-color: var(--lepton-card-bg);
    border-bottom: 1px solid var(--lepton-border-color);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.mobile-sidebar-toggle {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--lepton-text-primary);
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-dropdown {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--lepton-text-primary);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.user-dropdown:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-dropdown i {
    font-size: 20px;
    margin-left: 8px;
}

/* Content Area */
.lepton-content {
    flex: 1;
    padding: 20px;
    background-color: var(--lepton-content-bg);
}

.page-header {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    margin-left: auto;
}

.page-subtitle {
    font-size: 14px;
    color: var(--lepton-text-secondary);
    margin-top: 5px;
    width: 100%;
}

.page-actions {
    margin-right: auto;
}

/* Card Styles */
.lepton-card {
    background-color: var(--lepton-card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.lepton-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--lepton-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lepton-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.lepton-card-body {
    padding: 20px;
}

.lepton-card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--lepton-border-color);
    background-color: rgba(0, 0, 0, 0.02);
}

/* Footer Styles */
.lepton-footer {
    height: var(--lepton-footer-height);
    background-color: var(--lepton-card-bg);
    border-top: 1px solid var(--lepton-border-color);
    color: var(--lepton-text-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    font-size: 14px;
}

.footer-link {
    color: var(--lepton-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--lepton-primary);
}

/* Form Styles */
.lepton-form-group {
    margin-bottom: 20px;
}

.lepton-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.lepton-form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--lepton-border-color);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.lepton-form-control:focus {
    border-color: var(--lepton-primary);
    outline: none;
}

/* Button Styles */
.lepton-btn {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lepton-btn-primary {
    background-color: var(--lepton-primary);
    color: white;
}

.lepton-btn-primary:hover {
    background-color: var(--lepton-primary-dark);
}

.lepton-btn-secondary {
    background-color: transparent;
    border: 1px solid var(--lepton-primary);
    color: var(--lepton-primary);
}

.lepton-btn-secondary:hover {
    background-color: var(--lepton-primary-light);
}

/* Table Styles */
.lepton-table {
    width: 100%;
    border-collapse: collapse;
}

.lepton-table th,
.lepton-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--lepton-border-color);
}

.lepton-table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.02);
}

.lepton-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .lepton-sidebar {
        transform: translateX(100%);
        width: var(--lepton-sidebar-width);
    }
    
    .lepton-sidebar.show {
        transform: translateX(0);
    }
    
    .lepton-main {
        margin-right: 0 !important;
    }
    
    .mobile-sidebar-toggle {
        display: block;
    }
    
    .sidebar-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-actions {
        margin-top: 15px;
        margin-right: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 10px 0;
    }
    
    .footer-right {
        margin-top: 5px;
    }
}
