
:root {

    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;

    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;

    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;

    --text-primary: var(--slate-800);
    --text-secondary: var(--slate-500);
    --text-tertiary: var(--slate-400);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-brand: 0 10px 30px -10px rgba(13, 148, 136, 0.4);

    --border-color: var(--slate-200);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    --nav-card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 20px 50px -20px rgba(0, 0, 0, 0.06);
    --nav-card-shadow-hover: 0 30px 60px -15px rgba(0, 0, 0, 0.1), 0 20px 40px -20px rgba(0, 0, 0, 0.05);
    --glass-surface: rgba(255, 255, 255, 0.95);
    --accent-glow: 0 0 30px -5px rgba(99, 102, 241, 0.2);
}

* {
    box-sizing: border-box;
    outline: none;
}

body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--slate-900);
    font-weight: 700;
    line-height: 1.25;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary-600);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-700);
    box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-outline-primary:hover {
    color: white !important;
    background-color: var(--primary-600) !important;
    border-color: var(--primary-600) !important;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25) !important;
}

.btn-outline-primary:active, .btn-outline-primary:focus {
    color: white !important;
    background-color: var(--primary-700) !important;
    border-color: var(--primary-700) !important;
}

.btn-secondary {
    background-color: white;
    border-color: var(--slate-200);
    color: var(--slate-700);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--slate-50);
    border-color: var(--slate-300);
    color: var(--slate-900);
}

.btn-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border: none;
}

.btn-danger:hover {
    background-color: #fecaca;
    color: #991b1b;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius);
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.03);
    border-color: var(--primary-300);
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--slate-900);
    margin: 0;
    line-height: 1.2;
}

.stat-label {
    color: var(--slate-500);
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 4px;
}

.stat-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.bg-warning-soft {
    background-color: #fffbeb !important;
    color: #d97706 !important;
}

.btn-sub-action {
    background: white !important;
    border: 1px solid #cbd5e1 !important;
    color: var(--slate-700) !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02) !important;
    transition: var(--transition) !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-sub-action:hover {
    background: #f8fafc !important;
    color: var(--primary-600) !important;
    border-color: var(--primary-300) !important;
    transform: translateY(-1px);
}

.input-group:focus-within {
    border-color: var(--primary-400) !important;
    box-shadow: 0 0 0 4px var(--primary-100) !important;
}

.form-select:focus {
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 4px var(--primary-100) !important;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--slate-700);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    background-color: white;
    color: var(--slate-900);
    font-family: inherit;
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.form-control::placeholder {
    color: var(--slate-400);
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    background-color: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-left: 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    color: var(--slate-500);
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.badge {
    padding: 0.35em 0.8em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 99px;
    letter-spacing: 0.025em;
}

.bg-success-soft {
    background-color: #e6f4ee !important;
    color: #008a4f !important;
}

.bg-danger-soft {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.bg-primary-soft {
    background-color: var(--primary-50) !important;
    color: var(--primary-700) !important;
}

.bg-info-soft {
    background-color: #ecfeff !important;
    color: #0891b2 !important;
}

.badge-id {
    background: #f1f5f9;
    color: var(--slate-600);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

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

.table-custom th {
    background-color: var(--slate-50);
    color: var(--slate-600);
    font-weight: 600;
    padding: 1rem 1.5rem;
    text-align: right;
    border-bottom: 1px solid var(--slate-200);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-custom td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-600);
    vertical-align: middle;
}

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

.table-custom tr:hover td {
    background-color: var(--slate-50);
}

.login-page {
    background-color: var(--slate-50);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card-modern {
    background: white;
    width: 100%;
    max-width: 420px;
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-brand);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--primary-500), var(--primary-300));
}

.brand-logo-container {
    width: 80px;
    height: 80px;
    background: var(--primary-50);
    color: var(--primary-600);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    transform: rotate(-5deg);
    transition: var(--transition);
}

.login-card-modern:hover .brand-logo-container {
    transform: rotate(0) scale(1.1);
    background: var(--primary-100);
}

.app-navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 50;
}

.app-navbar .nav-link {
    color: var(--slate-600);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
    color: var(--primary-600);
    background: var(--primary-50);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up-effect {
    animation: fadeInUp 0.5s ease-out forwards;
}

.data-card {
    background: white;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
    transition: var(--transition) !important;
    position: relative;
    overflow: hidden;
    padding: 0;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.data-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05) !important;
    border-color: var(--primary-100) !important;
}

.data-card.border-top-primary {
    border-top: 3px solid var(--primary-500) !important;
}

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

.card-inner {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 20px;
    padding: 14px;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.badge-custom {
    padding: 3px 8px;
    border-radius: 100px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.avatar-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
}

.avatar-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1.5px dashed var(--primary-100);
    animation: rotateRing 30s linear infinite;
}

@keyframes rotateRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    transition: var(--transition);
    margin-bottom: 6px;
}

.info-item:hover {
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.02);
    transform: translateX(-4px);
    border-color: var(--primary-100);
}

.info-icon {
    width: 24px;
    height: 24px;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
    color: var(--slate-400);
    font-size: 0.8rem;
}

.btn-card-action {
    color: white !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-weight: 700 !important;
    border: none !important;
    width: 100%;
    transition: var(--transition) !important;
    font-size: 0.85rem !important;
}

.btn-card-action.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25) !important;
}

.btn-card-action.bg-primary-gradient:hover {
    box-shadow: 0 8px 16px rgba(13, 148, 136, 0.4) !important;
}

.btn-card-action.bg-info-gradient {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.25) !important;
}

.btn-card-action.bg-info-gradient:hover {
    box-shadow: 0 8px 16px rgba(6, 182, 212, 0.4) !important;
}

.btn-card-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-circle-action {
    width: 38px;
    height: 38px;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-600);
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.btn-circle-action:hover {
    background: var(--slate-50);
    transform: rotate(15deg);
    color: var(--primary-600);
}

.micro-actions-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.micro-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.micro-btn:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.micro-btn-blue {
    color: #3b82f6;
}

.micro-btn-blue:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.micro-btn-amber {
    color: #f59e0b;
}

.micro-btn-amber:hover {
    background: #fffbeb;
    border-color: #fef3c7;
}

.micro-btn-emerald {
    color: #10b981;
}

.micro-btn-emerald:hover {
    background: #ecfdf5;
    border-color: #d1fae5;
}

.micro-btn-rose {
    color: #f43f5e;
}

.micro-btn-rose:hover {
    background: #fff1f2;
    border-color: #fecdd3;
}

.card-avatar-box {
    width: 100% !important;
    height: 100% !important;
    border: 3px solid #f8fafc !important;
}

.card-avatar-icon {
    font-size: 1.8rem !important;
}

.card-verified-badge {
    bottom: 0% !important;
    left: 8% !important;
    width: 20px !important;
    height: 20px !important;
    z-index: 2 !important;
}

.card-verified-icon {
    font-size: 12px !important;
    line-height: 1 !important;
    color: var(--primary-600) !important;
}

.card-worker-title {
    font-size: 1.05rem !important;
    letter-spacing: -0.02em !important;
    min-height: 2.8rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.3 !important;
}

.card-badge-id {
    font-size: 0.72rem !important;
    padding: 2px 8px !important;
}

.card-info-label {
    font-size: 0.6rem !important;
    text-transform: uppercase !important;
}

.card-info-val {
    font-size: 0.82rem !important;
}

.card-info-date {
    font-size: 0.75rem !important;
}

.btn-card-details {
    font-size: 0.8rem !important;
    padding: 7px 10px !important;
}

.btn-card-details .bi-arrow-left {
    font-size: 0.8rem !important;
}

.micro-btn i {
    font-size: 0.82rem !important;
}

.brand-logo-box {
    width: 40px !important;
    height: 40px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
}

.brand-logo-img {
    height: 24px !important;
    width: auto !important;
}

.btn-new-contract {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%) !important;
    color: white !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.search-glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
}

.search-input-lg {
    font-size: 1rem !important;
}

.filter-select-lg {
    font-size: 1rem !important;
}

.btn-filter-action {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

.empty-avatar-circle {
    width: 120px !important;
    height: 120px !important;
    font-size: 3.5rem !important;
    border: 1px solid #f1f5f9 !important;
}

.fab-new-contract {
    width: 56px !important;
    height: 56px !important;
    z-index: 100 !important;
}