/*
 * PharmaBuy Front Design System
 * Premium, Modern, and RTL-ready
 */

:root {
    --pb-primary: #1e8d41;
    --pb-primary-hover: #166c32;
    --pb-primary-light: #ecfdf5;
    --pb-bg: #f8f9fb;
    --pb-card-bg: #ffffff;
    --pb-text-main: #0f172a;
    --pb-text-muted: #64748b;
    --pb-border: #e2e8f0;
    --pb-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --pb-shadow-premium: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Typography for RTL */
:lang(ar) {
    font-family: 'Cairo', sans-serif !important;
}

:lang(ar) h1,
:lang(ar) h2,
:lang(ar) h3,
:lang(ar) h4,
:lang(ar) h5 {
    font-family: 'Cairo', sans-serif !important;
}

/* Premium Card Layout */
.pb-card {
    background: var(--pb-card-bg);
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
}

.pb-card:hover {
    box-shadow: var(--pb-shadow-premium);
    border-color: var(--pb-primary-light);
}

/* Modern Table Design */
.pb-table-wrapper {
    background: var(--pb-card-bg);
    border-radius: 24px;
    border: 1px solid var(--pb-border);
    overflow: hidden;
    margin-top: 24px;
}

.pb-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.pb-table thead th {
    background: #fdfdfd;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pb-text-muted);
    border-bottom: 1px solid var(--pb-border);
}

:lang(ar) .pb-table thead th {
    text-align: right;
}

:lang(en) .pb-table thead th {
    text-align: left;
}

.pb-table tbody td {
    padding: 20px 24px;
    font-size: 14px;
    color: var(--pb-text-main);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.pb-table tbody tr:last-child td {
    border-bottom: none;
}

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

.pb-table .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Premium Buttons */
.pb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
    gap: 8px;
    cursor: pointer;
}

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

.pb-btn-primary:hover {
    background: var(--pb-primary-hover);
    transform: translateY(-1px);
}

.pb-btn-ghost {
    color: var(--pb-text-muted);
    background: transparent;
}

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

/* Custom Statistics Widget */
.pb-stat-card {
    padding: 20px;
    border-radius: 20px;
    background: white;
    box-shadow: var(--pb-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.pb-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pagination Styling */
.pb-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 24px 0;
}

.pb-pagination a,
.pb-pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background: white;
    border: 1px solid var(--pb-border);
    color: var(--pb-text-muted);
    transition: all 0.2s;
}

.pb-pagination a:hover {
    border-color: var(--pb-primary);
    color: var(--pb-primary);
    background: var(--pb-primary-light);
}

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

.pagination {
    display: ruby;
}

/* Modern Form System */
.pb-form-group {
    margin-bottom: 24px;
}

.pb-label {
    display: block !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #64748b !important;
    /* slate-500 */
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin-bottom: 10px !important;
}

.form-control,
.pb-input {
    width: 100% !important;
    padding: 12px 18px !important;
    background-color: #f8fafc !important;
    /* bg-slate-50 */
    border: 1px solid #e2e8f0 !important;
    /* border-slate-200 */
    border-radius: 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    /* text-slate-800 */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    appearance: none !important;
    box-shadow: none !important;
}

.form-control:focus,
.pb-input:focus {
    background-color: #ffffff !important;
    border-color: var(--pb-primary) !important;
    box-shadow: 0 0 0 4px rgba(30, 141, 65, 0.08) !important;
}

.form-control::placeholder,
.pb-input::placeholder {
    color: #94a3b8 !important;
}

/* Fix for dark mode overrides - Force light inputs in these forms */
.pb-card .form-control,
.pb-card .pb-input {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}


/* Global override to neutralize dark mode slate text */
.dark\:text-slate-200 {
    color: inherit !important;
}


/* Global override to neutralize dark mode slate background */
.dark\:bg-slate-800 {
    background-color: inherit !important;
}

.dark\:text-white {
    --tw-text-opacity: 1;
    color: inherit !important;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    vertical-align: middle;
}