/* Main stylesheet */

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #27ae60;
    --info-color: #16a085;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* Dashboard Styles */
#wrapper {
    display: flex;
    width: 100%;
}

#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--dark-color);
    color: #fff;
    transition: all 0.3s;
}

#sidebar.active {
    margin-left: -250px;
}

[dir="rtl"] #sidebar.active {
    margin-left: 0;
    margin-right: -250px;
}

#sidebar .sidebar-brand {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
}

#sidebar .sidebar-brand a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

#sidebar .sidebar-brand img {
    max-height: 40px;
}

#sidebar ul {
    padding: 20px 0;
}

#sidebar ul li {
    padding: 0;
}

#sidebar ul li a {
    padding: 12px 20px;
    display: block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover,
#sidebar ul li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

[dir="rtl"] #sidebar ul li a i {
    margin-right: 0;
    margin-left: 10px;
}

#content {
    width: 100%;
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Content Header Styles */
.content-header {
    background: #fff;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.content-wrapper {
    padding: 20px;
}

/* Breadcrumb Styles */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    list-style: none;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:first-child)::before {
    display: inline-block;
    padding-right: 0.5rem;
    color: #6c757d;
    content: "/";
}

[dir="rtl"] .breadcrumb-item:not(:first-child)::before {
    padding-right: 0;
    padding-left: 0.5rem;
}

.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

.float-sm-right {
    float: right !important;
}

[dir="rtl"] .float-sm-right {
    float: left !important;
}

/* Content Styles */
.content {
    padding: 20px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.card-title i {
    margin-right: 0.5rem;
}

[dir="rtl"] .card-title i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: #f8f9fc;
    border-top: 1px solid #e3e6f0;
}

/* Border Left Cards */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.border-left-secondary {
    border-left: 0.25rem solid var(--secondary-color) !important;
}

.border-left-dark {
    border-left: 0.25rem solid var(--dark-color) !important;
}

[dir="rtl"] .border-left-primary,
[dir="rtl"] .border-left-success,
[dir="rtl"] .border-left-info,
[dir="rtl"] .border-left-warning,
[dir="rtl"] .border-left-secondary,
[dir="rtl"] .border-left-dark {
    border-left: none;
    border-right: 0.25rem solid;
}

[dir="rtl"] .border-left-primary { border-right-color: var(--primary-color) !important; }
[dir="rtl"] .border-left-success { border-right-color: var(--success-color) !important; }
[dir="rtl"] .border-left-info { border-right-color: var(--info-color) !important; }
[dir="rtl"] .border-left-warning { border-right-color: var(--warning-color) !important; }
[dir="rtl"] .border-left-secondary { border-right-color: var(--secondary-color) !important; }
[dir="rtl"] .border-left-dark { border-right-color: var(--dark-color) !important; }

/* Text Colors */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-dark { color: var(--dark-color) !important; }

/* Background Colors */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; }

/* Bootstrap 3/4 Compatible Card Styles */
.card-primary {
    border-top: 3px solid var(--primary-color);
}

.card-success {
    border-top: 3px solid var(--success-color);
}

.card-info {
    border-top: 3px solid var(--info-color);
}

.card-warning {
    border-top: 3px solid var(--warning-color);
}

.card-secondary {
    border-top: 3px solid var(--secondary-color);
}

.card-danger {
    border-top: 3px solid var(--danger-color);
}

.card-outline {
    border: 1px solid #dee2e6;
}

.card-primary.card-outline {
    border-top: 1px solid var(--primary-color);
}

.card-success.card-outline {
    border-top: 1px solid var(--success-color);
}

.card-info.card-outline {
    border-top: 1px solid var(--info-color);
}

.card-warning.card-outline {
    border-top: 1px solid var(--warning-color);
}

.card-secondary.card-outline {
    border-top: 1px solid var(--secondary-color);
}

.card-danger.card-outline {
    border-top: 1px solid var(--danger-color);
}

/* Bootstrap 3/4 Compatible Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-info {
    background-color: var(--info-color);
}

.badge-warning {
    background-color: var(--warning-color);
}

.badge-secondary {
    background-color: var(--secondary-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

/* Bootstrap 3/4 Compatible List Group Styles */
.list-group-unbordered {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-group-unbordered .list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Bootstrap 3/4 Compatible Description Block Styles */
.description-block {
    display: block;
    margin: 10px 0;
    text-align: center;
}

.description-block.border-right {
    border-right: 1px solid #dee2e6;
}

[dir="rtl"] .description-block.border-right {
    border-right: none;
    border-left: 1px solid #dee2e6;
}

.description-percentage {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.description-text {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Tab Styles */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-item {
    margin-bottom: -1px;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.nav-tabs .nav-link:hover {
    isolation: isolate;
    border-color: #e9ecef #e9ecef;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6;
}

.tab-content {
    display: none;
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .tab-pane.active {
    display: block;
}

.tab-pane {
    padding: 1rem;
}

/* Bootstrap 3/4 Compatible Timeline Styles */
.timeline {
    position: relative;
    margin: 0 0 45px 0;
    padding: 0;
    list-style: none;
}

.timeline:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 31px;
    width: 3px;
    background: #dee2e6;
}

[dir="rtl"] .timeline:before {
    left: auto;
    right: 31px;
}

.timeline > li {
    position: relative;
    margin-right: 0;
    margin-left: 0;
}

.timeline > li > .time-label {
    display: inline-block;
    padding: 5px 10px;
    background: var(--info-color);
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    margin-bottom: 10px;
}

.timeline > li > .fa,
.timeline > li > .fas,
.timeline > li > .far,
.timeline > li > .fab,
.timeline > li > .glyphicon,
.timeline > li > .ion {
    width: 30px;
    height: 30px;
    font-size: 1rem;
    line-height: 30px;
    position: absolute;
    color: #fff;
    background: var(--info-color);
    border-radius: 50%;
    text-align: center;
    left: 18px;
    top: 0;
}

[dir="rtl"] .timeline > li > .fa,
[dir="rtl"] .timeline > li > .fas,
[dir="rtl"] .timeline > li > .far,
[dir="rtl"] .timeline > li > .fab,
[dir="rtl"] .timeline > li > .glyphicon,
[dir="rtl"] .timeline > li > .ion {
    left: auto;
    right: 18px;
}

.timeline-item {
    background: #fff;
    border-left: 3px solid var(--info-color);
    border-radius: 3px;
    margin-left: 60px;
    margin-right: 15px;
    margin-bottom: 15px;
    padding: 15px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

[dir="rtl"] .timeline-item {
    border-left: none;
    border-right: 3px solid var(--info-color);
    margin-left: 15px;
    margin-right: 60px;
}

.timeline-header {
    border-bottom: 1px solid #f4f4f4;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.timeline-body {
    margin-bottom: 10px;
}

/* Profile Styles */
.profile-username {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 10px 0;
}

.img-circle {
    border-radius: 50%;
}

.text-center {
    text-align: center !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

/* Utility Classes */
.m-0 {
    margin: 0 !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.ml-2 {
    margin-left: 0.5rem !important;
}

[dir="rtl"] .ml-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

[dir="rtl"] .mr-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875em;
}

.form-horizontal .form-group {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

[dir="rtl"] .form-horizontal .form-group {
    flex-direction: row-reverse;
}

/* Button Styles */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:hover {
    color: #212529;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    color: #fff;
    background-color: #157347;
    border-color: #146c43;
}

.btn-default {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.btn-default:hover {
    color: #212529;
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

/* Table Styles */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    
    [dir="rtl"] #sidebar {
        margin-left: 0;
        margin-right: -250px;
    }
    
    #sidebar.active {
        margin-left: 0;
    }
    
    [dir="rtl"] #sidebar.active {
        margin-left: 0;
        margin-right: 0;
    }
}
