/* Root Variables - Professional Office Color Scheme */
:root {
    /* Primary colors - more subdued professional palette */
    --primary: #2c3e50;          /* Dark blue-gray */
    --primary-light: #eef2f7;    /* Light primary for backgrounds */
    --primary-dark: #1a2533;     /* Darker shade for hover states */
    
    --secondary: #34495e;        /* Complementary dark blue-gray */
    --secondary-light: #f5f7fa;  /* Light secondary for backgrounds */
    
    /* Brand color - more subtle but distinctive */
    --brand: #3498db;            /* Professional blue */
    --brand-hover: #2980b9;      /* Darker blue for hover states */
    
    /* Text colors - improved readability hierarchy */
    --h-emp: #2c3e50;            /* Headings, high emphasis */
    --m-emp: #5d6975;            /* Medium emphasis text */
    --l-emp: #95a5a6;            /* Low emphasis text, placeholders */
    --border: #e2e8f0;           /* Subtle border color */
    
    /* Status colors - professional yet clear indicators */
    --success: #2ecc71;          /* Green */
    --danger: #e74c3c;           /* Red */
    --warning: #f39c12;          /* Orange */
    --info: #3498db;             /* Blue */
    
    /* Background and UI elements */
    --secondary-bg: #f8f9fa;     /* Softer background for reduced visual fatigue */
    --primary-bg: #ffffff;       /* Clean white background for contrast */
    --body-bg: var(--secondary-bg);
    
    /* Shadows and effects - more subtle and professional */
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 2px 6px rgba(0,0,0,0.12);
    --transition-speed: 0.2s;
    --border-radius: 4px;        /* Less rounded corners for a classic look */
    --box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Global Styles & Layout */
html {
    font-size: 16px; /* Base font-size for rem calculations. */
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape on iOS */
    -ms-text-size-adjust: 100%; /* Prevent font scaling in landscape on IE */
    scroll-behavior: smooth; /* Optional: for smooth scrolling */
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    color: var(--h-emp);
    background-color: var(--body-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all var(--transition-speed) ease;
    line-height: 1.5;
    font-size: 0.9rem;
}

main.container {
    flex: 1 0 auto;
    padding-bottom: 2rem;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: var(--transition-speed);
}

a:hover {
    color: var(--brand-hover);
    border-color: var(--brand-hover)
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--h-emp);
    line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-muted, .text-secondary {
    color: var(--l-emp) !important;
}

/* Buttons */
.btn,
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition-speed);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    box-shadow: none;
    border: 1px solid transparent;
}

.btn-primary,
.button.primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover,
.button.primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: var(--card-shadow);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background-color: transparent;
}

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

.btn-brand,
.button.brand {
    background-color: var(--brand);
    border-color: var(--brand);
    color: white;
}

.btn-brand:hover,
.button.brand:hover {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
}

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

.btn-warning,
.button.warning {
    background-color: var(--warning);
    color: white;
}

.btn-danger,
.button.danger {
    background-color: var(--danger);
    color: white;
}

.button.small,
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Icon-only buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: var(--transition-speed);
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--primary-bg);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    background-color: rgb(13, 62, 95);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    padding: 1rem 1.25rem;
    color: var(--h-emp);
}

.card-header.primary {
    background-color: rgb(13, 62, 95);
    color: white;
}

.card-body {
    padding: 0.75rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.card-text {
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--gray-light);
    padding: 12px 20px;
    display: contents;
    text-align: center;

}

.card-footer button {
    margin: 0 0;
    text-align: center;
    align-items: center;
    justify-content: center;
}


.card-img-top {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

/* Row Card Layout */
.row-cards {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.row-cards>[class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
    margin-bottom: 20px;
    display: flex;
}

.row-cards .card {
    width: 100%;
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: white;
    border-bottom: 1px solid var(--border);
}

.navbar-dark.bg-primary {
    background: var(--primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    background-color: white;
    transition: border-color var(--transition-speed) ease, 
                box-shadow var(--transition-speed) ease;
    height: calc(2.25rem + 2px);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--h-emp);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.table th {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-hover tbody tr:hover {
    background-color: var(--primary-light);
}

.table-container,
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

/* Content containers */
.content-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

/* Section headers */
.section-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Icon-only buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

/* Info displays */
.info-item {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.info-item .label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--m-emp);
    font-size: 0.8125rem;
}

.info-item .value {
    color: var(--h-emp);
    font-weight: 500;
}

/* Info Grid - Two column layout */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Optimize info-grid to reduce vertical space */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Make info items more compact */
.info-item {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.info-item .label {
    margin-bottom: 0.125rem;
    font-size: 0.75rem;
}

/* Enhanced styling for info items */
.info-item {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
    transition: transform var(--transition-speed), 
                box-shadow var(--transition-speed);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.info-item .label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--m-emp);
    font-size: 0.8125rem;
}

.info-item .value {
    color: var(--h-emp);
    font-weight: 500;
    word-break: break-word;
}

/* Maintain responsive behavior */
@media (max-width: 767.98px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: var(--transition-speed);
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--primary-bg);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--primary-bg);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    padding: 1rem 1.25rem;
    color: var(--h-emp);
}

.card-header.primary {
    background-color: var(--primary);
    color: white;
}

.card-body {
    padding: 0.75rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.card-text {
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--gray-light);
    padding: 12px 20px;
    display: contents;
    text-align: center;

}

.card-footer button {
    margin: 0 0;
    text-align: center;
    align-items: center;
    justify-content: center;
}


.card-img-top {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

/* Row Card Layout */
.row-cards {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.row-cards>[class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
    margin-bottom: 20px;
    display: flex;
}

.row-cards .card {
    width: 100%;
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: white;
    border-bottom: 1px solid var(--border);
}

.navbar-dark.bg-primary {
    background: var(--primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    background-color: white;
    transition: border-color var(--transition-speed) ease, 
                box-shadow var(--transition-speed) ease;
    height: calc(2.25rem + 2px);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--h-emp);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.table th {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.table-hover tbody tr:hover {
    background-color: var(--primary-light);
}

.table-container,
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

/* Content containers */
.content-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

/* Section headers */
.section-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Icon-only buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

/* Info displays */
.info-item {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.info-item .label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--m-emp);
    font-size: 0.8125rem;
}

.info-item .value {
    color: var(--h-emp);
    font-weight: 500;
}

/* Info Grid - Two column layout */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Optimize info-grid to reduce vertical space */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Make info items more compact */
.info-item {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.info-item .label {
    margin-bottom: 0.125rem;
    font-size: 0.75rem;
}

/* Enhanced styling for info items */
.info-item {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
    transition: transform var(--transition-speed), 
                box-shadow var(--transition-speed);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.info-item .label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--m-emp);
    font-size: 0.8125rem;
}

.info-item .value {
    color: var(--h-emp);
    font-weight: 500;
    word-break: break-word;
}

/* Maintain responsive behavior */
@media (max-width: 767.98px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: var(--transition-speed);
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--primary-bg);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--primary-bg);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    padding: 1rem 1.25rem;
    color: var(--h-emp);
}

.card-header.primary {
    background-color: var(--primary);
    color: white;
}

.card-body {
    padding: 0.75rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.card-text {
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--gray-light);
    padding: 12px 20px;
    display: contents;
    text-align: center;

}

.card-footer button {
    margin: 0 0;
    text-align: center;
    align-items: center;
    justify-content: center;
}


.card-img-top {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

/* Row Card Layout */
.row-cards {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.row-cards>[class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
    margin-bottom: 20px;
    display: flex;
}

.row-cards .card {
    width: 100%;
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: white;
    border-bottom: 1px solid var(--border);
}

.navbar-dark.bg-primary {
    background: var(--primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    background-color: white;
    transition: border-color var(--transition-speed) ease, 
                box-shadow var(--transition-speed) ease;
    height: calc(2.25rem + 2px);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--h-emp);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.table th {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.table-hover tbody tr:hover {
    background-color: var(--primary-light);
}

.table-container,
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

/* Content containers */
.content-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

/* Section headers */
.section-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Icon-only buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

/* Info displays */
.info-item {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.info-item .label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--m-emp);
    font-size: 0.8125rem;
}

.info-item .value {
    color: var(--h-emp);
    font-weight: 500;
}

/* Info Grid - Two column layout */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Optimize info-grid to reduce vertical space */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Make info items more compact */
.info-item {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.info-item .label {
    margin-bottom: 0.125rem;
    font-size: 0.75rem;
}

/* Enhanced styling for info items */
.info-item {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
    transition: transform var(--transition-speed), 
                box-shadow var(--transition-speed);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.info-item .label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--m-emp);
    font-size: 0.8125rem;
}

.info-item .value {
    color: var(--h-emp);
    font-weight: 500;
    word-break: break-word;
}

/* Maintain responsive behavior */
@media (max-width: 767.98px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: var(--transition-speed);
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--primary-bg);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--primary-bg);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    padding: 1rem 1.25rem;
    color: var(--h-emp);
}

.card-header.primary {
    background-color: var(--primary);
    color: white;
}

.card-body {
    padding: 0.75rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.card-text {
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--gray-light);
    padding: 12px 20px;
    display: contents;
    text-align: center;

}

.card-footer button {
    margin: 0 0;
    text-align: center;
    align-items: center;
    justify-content: center;
}


.card-img-top {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

/* Row Card Layout */
.row-cards {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.row-cards>[class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
    margin-bottom: 20px;
    display: flex;
}

.row-cards .card {
    width: 100%;
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: white;
    border-bottom: 1px solid var(--border);
}

.navbar-dark.bg-primary {
    background: var(--primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    background-color: white;
    transition: border-color var(--transition-speed) ease, 
                box-shadow var(--transition-speed) ease;
    height: calc(2.25rem + 2px);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--h-emp);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.table th {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.table-hover tbody tr:hover {
    background-color: var(--primary-light);
}

.table-container,
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

/* Scrollable containers */
.scrollable-container {
    max-height: 80vh; /* Use viewport-relative units instead of fixed pixels */
    overflow-y: auto;
}

.scrollable-container::-webkit-scrollbar {
    width: 6px;
}

.scrollable-container::-webkit-scrollbar-track {
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
}

.scrollable-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: var(--border-radius);
}

.scrollable-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Product & Class Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: white;
    transition: var(--transition-speed);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.product-header {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-content {
    padding: 1rem;
    flex-grow: 1;
}

.product-footer {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 30px;
    text-align: center;
    min-width: 70px;
    letter-spacing: 0.02em;
}

.status-delivered, .status-success {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-processing, .status-warning {
    background-color: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-pending {
    background-color: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.status-cancelled, .status-danger {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Notes */
.notes-container {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.note {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--brand);
}

.note-meta {
    font-size: 0.85rem;
    color: var(--gray);
    display: block;
    margin-top: 0.5rem;
}

/* Tabs */
.filter-tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.tab {
    padding: 0.75rem 1.25rem;
    margin-right: 0.25rem;
    cursor: pointer;
    white-space: nowrap;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    transition: var(--transition-speed);
    color: var(--m-emp);
}

.tab:hover {
    background-color: var(--secondary-bg);
}

.tab-active {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
}

/* Nav Tabs */
.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray);
    padding: 10px 15px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--brand);
    color: var(--brand);
}

.nav-tabs .nav-link.active {
    border-bottom-color: var(--brand);
    color: var(--primary);
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Pagination */
.pagination .page-item .page-link {
    color: var(--primary);
    border: none;
    margin: 0 3px;
    border-radius: 4px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    color: white;
}

.pagination .page-item .page-link:hover {
    background-color: var(--primary-light);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
}

.alert-warning {
    background-color: #fff8e1;
    color: #ef6c00;
}

.alert-info {
    background-color: #e3f2fd;
    color: #0277bd;
}

.alert-dismissible {
    padding-left: 3rem;
    padding-right: 1.25rem;
}

.alert-dismissible .btn-close {
    left: 0;
    right: auto;
}

/* Stats and Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 20px;
    text-align: center;
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.stat-title {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 15px;
    background: var(--primary-light);
    color: var(--primary);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 10px;
}

.stat-card.secondary .stat-icon {
    background: var(--secondary-light);
    color: var(--secondary);
}

.stat-card.success .stat-icon {
    background: #e8f5e9;
    color: var(--success);
}

.stat-card.warning .stat-icon {
    background: #fff8e1;
    color: #f57c00;
}

.stat-card.danger .stat-icon {
    background: #ffebee;
    color: var(--danger);
}

/* Charts */
canvas.chart {
    margin: 20px 0;
    border-radius: 8px;
    background-color: white;
    box-shadow: var(--card-shadow);
}

/* Footer */
footer.bg-dark {
    flex-shrink: 0;
    background: linear-gradient(135deg, #2b3035, #1a1e21) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 0 30px;
    margin-top: auto;
}

footer.bg-primary {
    background: linear-gradient(135deg, rgba(10, 45, 70, 1), rgba(5, 25, 45, 1)) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 8px;
}

footer p {
    color: rgba(255, 255, 255, 0.85);
}

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--m-emp);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: right;
    padding: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    color: var(--primary);
    border-radius: 5px;
    transition: var(--transition-speed);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    background-color: transparent;
    border: 1px ridge transparent;
    margin: 50 5px;
}

.dropdown-item:hover {
    border-color: var(--brand-hover);
    border-style: ridge;
    
}

.dropdown-item i {
    color: var(--primary);
    width: 20px;
    text-align: center;
    margin-left: 0.5rem;
    padding: 10px 15px;
    border-color: var(--brand-hover);
}

/* Make pipeline layout more efficient */
.pipeline-scrollable {
    min-height: auto; /* Remove the 600px min-height */
    padding: 1rem;
    gap: 1rem;
}

.pipeline-stage {
    flex: 0 0 300px; /* Slightly narrower */
}

/* Media Queries for Responsiveness */

/* Large desktops and up */
@media (min-width: 1200px) {
    html {
        font-size: 17px; /* Slightly larger text for very large screens */
    }
    /* Add other layout adjustments for very large screens if needed */
}

/* Medium devices (tablets, smaller desktops, up to 991.98px) */
/* Base font size of 16px applies for 992px to 1199.98px */
@media (max-width: 991.98px) {
    html {
        font-size: 15px;
    }
}

/* Small devices (landscape phones, tablets in portrait) */
@media (max-width: 767.98px) {
    html {
        font-size: 14px;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .filter-tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex-grow: 1;
        text-align: center;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .header-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions h2 {
        margin-bottom: 15px;
    }

    .button-group {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }

    .button-group .btn {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    .content-container {
        padding: 15px;
    }

    .card {
        margin-bottom: 15px;
    }
}

/* For very small screens (extra small devices, phones) */
@media (max-width: 575.98px) {
    html {
        font-size: 13px;
    }

    .data-table td,
    .data-table th {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    /* Card-based layout for tables on mobile */
    .responsive-card-table thead {
        display: none;
    }

    .responsive-card-table tr {
        display: block;
        border: 1px solid var(--gray-light);
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 10px;
        box-shadow: var(--card-shadow);
    }

    .responsive-card-table td {
        display: flex;
        justify-content: space-between;
        text-align: right;
        border-bottom: 1px solid var(--gray-light);
        padding: 8px 0;
    }

    .responsive-card-table td:last-child {
        border-bottom: none;
    }

    .responsive-card-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        color: var(--primary);
    }
}

/* RTL Specific adjustments */
html[dir="rtl"] .dropdown-menu-end {
    left: 0;
    right: auto;
}

html[dir="rtl"] .dropdown-item i {
    margin-right: 0;
    margin-left: 8px;
}

html[dir="rtl"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

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

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

html[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

html[dir="rtl"] .form-check .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}

/* Softer link color */
.customer-link {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-speed);
}

.customer-link:hover {
    text-decoration: none;
    color: var(--primary-dark);
}

/* Softer table styling */
.table th {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    padding: 0.75rem 1rem;
}

/* Softer badge styling */
.status-badge {
    opacity: 0.85;
    font-weight: 500;
}

/* Button styling with reduced intensity */
.button-group .button.small {
    opacity: 0.9;
}

.button-group .button.small:hover {
    opacity: 1;
}

/* Alternate row styling for better readability */
.table-hover tbody tr:nth-of-type(odd) {
    background-color: rgba(232, 241, 255, 0.3);
    /* Very light primary */
}

/* Payment form specific styles */
.payment-summary-card {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border);
}

.summary-item.highlight {
    color: var(--brand);
}

.field-error, .negative-balance {
    color: var(--brand) !important;
}

.invalid-amount {
    border-color: var(--brand) !important;
    background-color: rgba(221, 51, 51, 0.05);
}

@keyframes flash-update {
    0% { background-color: rgba(45, 45, 45, 0); }
    50% { background-color: rgba(45, 45, 45, 0.1); }
    100% { background-color: rgba(45, 45, 45, 0); }
}

/* Toast notifications */
.toast-success {
    background-color: var(--success) !important;
}

.toast-error {
    background-color: var(--brand) !important;
}

.toast-warning {
    background-color: var(--warning) !important;
}

.toast-info {
    background-color: var(--primary) !important;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    gap: 5px;
}

.pagination-item {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-item:hover {
    background-color: #e9ecef;
    color: #212529;
    text-decoration: none;
}

.pagination-item.active {
    background-color: var(--primary);
    color: white;
}

.pagination-item.active:hover {
    background-color: var(--primary-dark);
    color: white;
}

.pagination-item i {
    font-size: 14px;
}

/* Order Detail Modal */
.order-detail-modal .modal-dialog {
    max-width: 800px;
}

.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e3e6f0;
}

.order-basic-info h4 {
    margin-bottom: 8px;
    color: #2c3e50;
}

.order-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.order-meta span {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-actions {
    display: flex;
    gap: 10px;
}

/* Order Timeline */
.order-timeline {
    margin-bottom: 25px;
}

.timeline-container {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 24px;
    width: 2px;
    height: calc(100% + 10px);
    background: #e3e6f0;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e3e6f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6c757d;
}

.timeline-item.completed .timeline-marker {
    background: #1cc88a;
    color: white;
}

.timeline-item.current .timeline-marker {
    background: #4e73df;
    color: white;
    animation: pulse 2s infinite;
}

.timeline-content {
    background: #f8f9fb;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid #e3e6f0;
}

.timeline-item.completed .timeline-content {
    border-left-color: #1cc88a;
}

.timeline-item.current .timeline-content {
    border-left-color: #4e73df;
    background: #e8f4fd;
}

.timeline-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.timeline-date {
    font-size: 12px;
    color: #6c757d;
}

/* Order Items */
.order-items {
    margin-bottom: 25px;
}

.items-list {
    background: #f8f9fb;
    border-radius: 6px;
    padding: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e3e6f0;
}

.order-item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.item-details {
    font-size: 12px;
    color: #6c757d;
}

.item-total {
    font-weight: 600;
    color: #2c3e50;
}

/* Payment Information */
.order-payment-info {
    margin-bottom: 25px;
}

.payment-summary {
    background: #f8f9fb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.payment-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #e3e6f0;
    font-weight: 600;
}

/* Interactions */
.order-interactions {
    margin-bottom: 25px;
}

.interactions-list {
    background: #f8f9fb;
    border-radius: 6px;
    padding: 15px;
}

.interaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e3e6f0;
}

.interaction-item:last-child {
    border-bottom: none;
}

.interaction-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4e73df;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.interaction-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.interaction-meta {
    font-size: 12px;
    color: #6c757d;
}

/* Workflow Rules */
.order-workflows {
    margin-bottom: 25px;
}

.workflows-list {
    background: #f8f9fb;
    border-radius: 6px;
    padding: 15px;
}

.workflow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e3e6f0;
}

.workflow-item:last-child {
    border-bottom: none;
}

.workflow-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.workflow-content {
    flex: 1;
}

.workflow-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.workflow-description {
    font-size: 12px;
    color: #6c757d;
}

/* Quick Actions */
.order-quick-actions {
    background: #f8f9fb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Workflow Rule Cards */
.workflow-rule-card {
    background: white;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.rule-header {
    background: #f8f9fb;
    padding: 15px 20px;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rule-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rule-title h6 {
    margin: 0;
    color: #2c3e50;
}

.rule-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rule-body {
    padding: 20px;
}

.rule-description {
    margin-bottom: 15px;
    color: #6c757d;
    font-style: italic;
}

.rule-conditions, .rule-actions-section {
    margin-bottom: 15px;
}

.rule-conditions h7, .rule-actions-section h7 {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.conditions-list, .actions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.condition-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #bbdefb;
}

.action-tag {
    background: #e8f5e8;
    color: #388e3c;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #c8e6c9;
}

.rule-footer {
    background: #f8f9fb;
    padding: 15px 20px;
    border-top: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rule-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    font-size: 12px;
}

.stat-label {
    color: #6c757d;
}

.stat-value {
    color: #2c3e50;
    font-weight: 500;
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.priority-1 {
    background: #fee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.priority-2 {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.priority-3 {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .order-detail-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .order-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .order-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .rule-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .rule-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .rule-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .rule-stats {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
}

/* Loading states */
.pipeline-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.pipeline-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4e73df;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success/Error states */
.pipeline-success {
    border-left: 4px solid #1cc88a;
    background: #d4edda;
}

.pipeline-error {
    border-left: 4px solid #e74a3b;
    background: #f8d7da;
}

/* Notification toasts */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    width: 320px;
}

.notification-toast {
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border);
    background-color: white;
    opacity: 0;
    transform: translateX(50px);
    animation: slide-in 0.3s forwards;
}

@keyframes slide-in {
    100% { opacity: 1; transform: translateX(0); }
}

.notification-toast.closing {
    animation: slide-out 0.3s forwards;
}

@keyframes slide-out {
    100% { opacity: 0; transform: translateX(50px); }
}

.notification-toast .toast-header {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-toast .toast-body {
    padding: 1rem;
    color: var(--m-emp);
    font-size: 0.875rem;
}

.notification-toast.success .toast-header {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border-bottom: 1px solid rgba(46, 204, 113, 0.3);
}

.notification-toast.error .toast-header {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border-bottom: 1px solid rgba(231, 76, 60, 0.3);
}

.notification-toast.warning .toast-header {
    background-color: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border-bottom: 1px solid rgba(243, 156, 18, 0.3);
}

.notification-toast.info .toast-header {
    background-color: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}