/* Fayoum Health — TailAdmin polish */

.ta-dashboard {
    --ta-brand: #0f766e;
    --ta-brand-soft: #ccfbf1;
    --ta-brand-ink: #115e59;
    --ta-surface: #f4f7f8;
    --ta-card: #ffffff;
    --ta-line: #e5eef0;
    --ta-muted: #64748b;
    --ta-ink: #0f172a;
    --color-brand-500: #0f766e;
    --color-brand-600: #0d9488;
    --color-brand-50: #f0fdfa;
    --color-brand-100: #ccfbf1;
}

.ta-dashboard,
.ta-dashboard * {
    font-family: "Tajawal", Tahoma, sans-serif !important;
}

.ta-dashboard.dark,
.dark .ta-dashboard {
    --ta-surface: #0b1220;
    --ta-card: #111827;
    --ta-line: #1f2937;
    --ta-muted: #94a3b8;
    --ta-ink: #f8fafc;
}

.ta-main-shell {
    background:
        radial-gradient(ellipse 80% 50% at 100% -10%, rgba(15, 118, 110, 0.08), transparent 50%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(14, 165, 233, 0.05), transparent 45%),
        var(--ta-surface);
}

html[dir="rtl"] .ta-sidebar {
    right: 0;
    left: auto;
    border-right: 0;
}

html[dir="rtl"] .ta-sidebar.translate-x-full {
    transform: translateX(100%);
}

html[dir="rtl"] .ta-sidebar.translate-x-0 {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    html[dir="rtl"] .ta-sidebar.lg\:translate-x-0 {
        transform: translateX(0);
    }
}

.ta-sidebar {
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.04);
}

.ta-brand-mark {
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: linear-gradient(145deg, #14b8a6, #0f766e);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}

.ta-sidebar-foot {
    margin-top: auto;
    border-top: 1px solid var(--ta-line);
    padding: 1rem 0 1.25rem;
}

.ta-user-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 1rem;
    background: var(--ta-brand-soft);
    padding: 0.75rem;
}

.dark .ta-user-chip {
    background: rgba(15, 118, 110, 0.15);
}

.ta-header {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.86) !important;
}

.dark .ta-header {
    background: rgba(17, 24, 39, 0.85) !important;
}

.ta-icon-btn {
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    border: 1px solid var(--ta-line);
    background: #fff;
    color: var(--ta-muted);
    transition: 0.18s ease;
}

.ta-icon-btn:hover {
    border-color: #99f6e4;
    color: var(--ta-brand);
    background: #f0fdfa;
}

.dark .ta-icon-btn {
    background: transparent;
    border-color: #1f2937;
}

.ta-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ta-page-title {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 800;
    color: var(--ta-ink);
    letter-spacing: -0.02em;
}

.ta-page-sub {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--ta-muted);
    line-height: 1.6;
}

.ta-welcome {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(120deg, #0f766e 0%, #0d9488 48%, #0891b2 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(15, 118, 110, 0.22);
}

.ta-welcome::after {
    content: "";
    position: absolute;
    inset-inline-end: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.ta-welcome-title {
    position: relative;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.ta-welcome-text {
    position: relative;
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    opacity: 0.92;
    max-width: 42rem;
}

.ta-welcome-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.ta-welcome .ta-btn-light {
    background: #fff;
    color: #0f766e;
}

.ta-welcome .ta-btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}

.ta-welcome .ta-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
}

.ta-stat {
    position: relative;
    overflow: hidden;
    border-radius: 1.1rem;
    border: 1px solid var(--ta-line);
    background: var(--ta-card);
    padding: 1.15rem 1.2rem 1.2rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ta-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.ta-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.ta-stat-icon {
    display: inline-flex;
    height: 2.4rem;
    width: 2.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.ta-stat-icon.teal { background: #ccfbf1; color: #0f766e; }
.ta-stat-icon.blue { background: #e0f2fe; color: #0369a1; }
.ta-stat-icon.amber { background: #fef3c7; color: #b45309; }
.ta-stat-icon.sky { background: #e0f2fe; color: #0284c7; }
.ta-stat-icon.violet { background: #ede9fe; color: #6d28d9; }
.ta-stat-icon.green { background: #d1fae5; color: #047857; }

.ta-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--ta-ink);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.ta-stat-label {
    margin-top: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ta-muted);
}

.ta-card {
    border-radius: 1.15rem;
    border: 1px solid var(--ta-line);
    background: var(--ta-card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    overflow: hidden;
}

.ta-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ta-line);
    background: linear-gradient(180deg, rgba(15, 118, 110, 0.03), transparent);
}

.dark .ta-card-header {
    background: transparent;
}

.ta-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ta-ink);
}

.ta-card-body {
    padding: 1.25rem;
}

.ta-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ta-brand);
    text-decoration: none;
}

.ta-link:hover {
    text-decoration: underline;
}

.ta-table {
    width: 100%;
    border-collapse: collapse;
}

.ta-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: right;
    padding: 0.85rem 1rem;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: none;
}

.dark .ta-table th {
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
}

.ta-table td {
    padding: 0.95rem 1rem;
    border-top: 1px solid var(--ta-line);
    color: #334155;
    font-size: 0.875rem;
    vertical-align: middle;
}

.dark .ta-table td {
    color: #cbd5e1;
}

.ta-table tr:hover td {
    background: #f8fafc;
}

.dark .ta-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.ta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.85rem;
    padding: 0.68rem 1.05rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: 0.18s ease;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.ta-btn:active {
    transform: translateY(1px);
}

.ta-btn-primary {
    background: linear-gradient(145deg, #14b8a6, #0f766e);
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.ta-btn-primary:hover {
    filter: brightness(1.05);
    color: #fff;
}

.ta-btn-success {
    background: #059669;
    color: #fff;
}

.ta-btn-success:hover {
    background: #047857;
    color: #fff;
}

.ta-btn-danger {
    background: #e11d48;
    color: #fff;
}

.ta-btn-danger:hover {
    background: #be123c;
    color: #fff;
}

.ta-btn-outline {
    border-color: var(--ta-line);
    background: #fff;
    color: #334155;
}

.dark .ta-btn-outline {
    border-color: #1f2937;
    background: transparent;
    color: #cbd5e1;
}

.ta-btn-outline:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: var(--ta-brand);
}

.ta-btn-sm {
    padding: 0.42rem 0.78rem;
    font-size: 0.8rem;
    border-radius: 0.7rem;
}

.ta-btn-light {
    background: #fff;
    color: var(--ta-brand);
    font-weight: 800;
}

.ta-btn-ghost {
    background: transparent;
    color: inherit;
}

.ta-input,
.ta-select,
.ta-textarea {
    width: 100%;
    border-radius: 0.85rem;
    border: 1px solid #d0d9de;
    background: #fff;
    padding: 0.72rem 0.95rem;
    font-size: 0.875rem;
    color: var(--ta-ink);
    transition: 0.15s ease;
}

.dark .ta-input,
.dark .ta-select,
.dark .ta-textarea {
    border-color: #1f2937;
    background: #0b1220;
    color: #f8fafc;
}

.ta-input:focus,
.ta-select:focus,
.ta-textarea:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.ta-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #475569;
}

.dark .ta-label {
    color: #cbd5e1;
}

.ta-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.ta-badge-pending { background: #fef3c7; color: #92400e; }
.ta-badge-progress { background: #e0f2fe; color: #075985; }
.ta-badge-resolved { background: #d1fae5; color: #065f46; }
.ta-badge-rejected { background: #ffe4e6; color: #9f1239; }
.ta-badge-success { background: #d1fae5; color: #065f46; }
.ta-badge-warning { background: #fef3c7; color: #92400e; }
.ta-badge-info { background: #e0f2fe; color: #075985; }

.ta-alert-success {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    border-radius: 1rem;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    padding: 0.9rem 1rem;
    color: #065f46;
    font-size: 0.9rem;
    font-weight: 600;
}

.dark .ta-alert-success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.ta-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--ta-muted);
    font-size: 0.9rem;
}

.ta-news-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--ta-line);
}

.ta-news-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ta-news-row:first-child {
    padding-top: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    border: 1px solid var(--ta-line);
    border-radius: 0.85rem;
    overflow: hidden;
    background: #f8fafc;
}

.dark .gallery-item {
    background: #0b1220;
}

.gallery-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.gallery-item label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
}

.cover-preview {
    max-height: 180px;
    border-radius: 0.85rem;
    border: 1px solid var(--ta-line);
}

.pagination {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination .page-item .page-link,
.pagination > * {
    border-radius: 0.7rem !important;
}

.ta-dashboard .pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.65rem;
    border: 1px solid var(--ta-line);
    background: #fff;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.ta-dashboard .pagination .page-item.active .page-link,
.ta-dashboard .pagination .active > .page-link {
    background: var(--ta-brand);
    border-color: var(--ta-brand);
    color: #fff;
}

.ta-dashboard .pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

.dark .ta-dashboard .pagination .page-link {
    border-color: #1f2937;
    background: #111827;
    color: #cbd5e1;
}

/* Soften TailAdmin menu active to teal */
.ta-dashboard .menu-item-active {
    background-color: #f0fdfa !important;
    color: #0f766e !important;
}

.ta-dashboard .menu-item-icon-active {
    color: #0f766e !important;
}

.dark .ta-dashboard .menu-item-active {
    background-color: rgba(15, 118, 110, 0.15) !important;
    color: #5eead4 !important;
}

.ta-dashboard .menu-item-inactive:hover {
    background-color: #f8fafc;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 0.4rem;
}

.dark code {
    background: rgba(255, 255, 255, 0.06);
}
