/* ========== RESET & BASE ========== */

@font-face {
    font-family: 'Lama Sans';
    font-style: normal;
    font-weight: 400;
    src: url('https://fonts.cdnfonts.com/s/89696/LamaSans-Regular.woff') format('woff');
}

@font-face {
    font-family: 'Lama Sans';
    font-style: normal;
    font-weight: 500;
    src: url('https://fonts.cdnfonts.com/s/89696/LamaSans-Medium.woff') format('woff');
}

@font-face {
    font-family: 'Lama Sans';
    font-style: normal;
    font-weight: 600;
    src: url('https://fonts.cdnfonts.com/s/89696/LamaSans-SemiBold.woff') format('woff');
}

@font-face {
    font-family: 'Lama Sans';
    font-style: normal;
    font-weight: 700;
    src: url('https://fonts.cdnfonts.com/s/89696/LamaSans-Bold.woff') format('woff');
}

@font-face {
    font-family: 'Lama Sans';
    font-style: normal;
    font-weight: 800;
    src: url('https://fonts.cdnfonts.com/s/89696/LamaSans-ExtraBold.woff') format('woff');
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lama Sans', sans-serif;
    font-style: normal;
    background-color: rgba(26, 25, 25, 1);
    color: #333;
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input,
textarea {
    font-family: inherit;
    border: none;
    outline: none;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1919;
}

::-webkit-scrollbar-thumb {
    background: rgba(141, 49, 118, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(141, 49, 118, 0.8);
}

/* ========== LAYOUT ========== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 90px;
    background: rgba(26, 25, 25, 1);
    /* border-left: 1px solid rgba(255, 255, 255, 0.08); */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 0;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-logo {
    /* width: 48px;
    height: 48px; */
    margin-bottom: 16px;
    flex-shrink: 0;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
    flex: 1;
}

.sidebar-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: 76px;
    position: relative;
    text-align: center;
}

.sidebar-nav-item:hover {
    background: transparent;
}

.sidebar-nav-item.active {
    background: transparent;
}

.sidebar-nav-item .nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 10px;
    box-sizing: content-box;
    border-radius: 10px;
    background: transparent;
}

.sidebar-nav-item.active .nav-icon,
.sidebar-nav-item:hover .nav-icon {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
    filter: brightness(0) saturate(100%) invert(25%) sepia(60%) saturate(1600%) hue-rotate(291deg) brightness(95%) contrast(90%);
}

.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    fill: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 10px;
    box-sizing: content-box;
    border-radius: 10px;
    background: transparent;
}

.sidebar-nav-item.active svg,
.sidebar-nav-item:hover svg {
    fill: rgba(141, 49, 118, 1);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-item span {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.sidebar-nav-item.active span,
.sidebar-nav-item:hover span {
    color: rgba(255, 255, 255, 0.9);
}

/* ========== SIDEBAR FLYOUT MENUS ========== */
.sidebar-flyout-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-flyout {
    position: fixed;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    min-width: 260px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 6px 0;
    pointer-events: none;
}

.sidebar-flyout.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sidebar-flyout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

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

.sidebar-flyout-item:hover {
    background: #f8f7fc;
}

.flyout-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.flyout-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1919;
}

.flyout-desc {
    font-size: 0.72rem;
    color: #999;
    font-weight: 400;
}

.flyout-arrow {
    font-size: 1.2rem;
    color: #999;
    transition: transform 0.2s ease;
}

.sidebar-flyout-item:hover .flyout-arrow {
    transform: translateX(-4px);
    color: rgba(141, 49, 118, 1);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-right: 90px;
    margin-top: 12px;
    margin-left: 12px;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    min-height: calc(100vh - 12px);
    overflow: hidden;
}

/* ========== HEADER ========== */
.header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 24px;
    margin-bottom: 20px;
    padding-top: 32px;
}

.create-back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #D48E00;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    margin-bottom: 8px;
    align-self: flex-end;
}

.create-back-link svg {
    width: 20px;
    height: 20px;
    stroke: #D48E00;
    /* transform: rotate(180deg); */
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.header-greeting {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-greeting h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1919;
    line-height: 100%;
    letter-spacing: 0px;
}

.header-greeting .wave-emoji {
    font-size: 1.4rem;
}

.header-subtitle {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 4px 4px 14px;
    border-radius: 50px;
    background: #ECECEC;
    transition: background 0.3s ease;
    position: relative;
}

.header-user:hover {
    background: #e2e2e2;
}

.header-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    flex-shrink: 0;
}

.header-user-chevron {
    font-size: 0.55rem;
    color: #666;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: 40px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.header-btn-primary {
    background: #8D3176;
    color: #fff;
    border-radius: 12px;
    height: 40px;
    padding: 0 16px;
}

.header-btn-primary:hover {
    background: #7a2a66;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(141, 49, 118, 0.2);
}

.header-btn-primary svg {
    width: 18px;
    height: 18px;
    fill: none;
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ECECEC;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.header-icon-btn:hover {
    background: #e2e2e2;
}

.header-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #333;
    stroke-width: 1.5;
}

/* ========== DROPDOWN MENUS ========== */
.dropdown-wrapper {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    min-width: 200px;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Action Dropdown --- */
.dropdown-action {
    right: 0;
    min-width: 230px;
    padding: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.dropdown-item:hover {
    background: #f8f7fc;
}

.dropdown-arrow {
    font-size: 1.1rem;
    color: #999;
    transition: transform 0.2s ease;
}

.dropdown-item:hover .dropdown-arrow {
    transform: translateX(-4px);
    color: rgba(141, 49, 118, 1);
}

/* --- Profile Dropdown --- */
.dropdown-profile {
    left: 0;
    min-width: 220px;
    padding: 0;
    overflow: hidden;
}

.dropdown-profile-header {
    padding: 16px 18px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-profile-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1919;
    margin-bottom: 2px;
}

.dropdown-profile-role {
    font-size: 0.78rem;
    color: #999;
    font-weight: 400;
}

.dropdown-profile-body {
    padding: 8px 0;
}

.dropdown-profile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.dropdown-profile-item:hover {
    background: #f8f7fc;
}

.dropdown-chevron {
    font-size: 1.3rem;
    color: #999;
}

.dropdown-logout {
    color: rgba(141, 49, 118, 1);
    justify-content: center;
    gap: 8px;
}

.dropdown-logout svg {
    width: 18px;
    height: 18px;
    stroke: rgba(141, 49, 118, 1);
    fill: none;
}

/* ========== STAT CARDS ========== */
.stats-section {
    padding: 0 24px 16px;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
}

.stat-card {
    background: rgba(26, 25, 25, 1);
    border-radius: 40px;
    padding: 14px 18px;
    color: #fff;
    position: relative;
    overflow: hidden;
    width: 220px;
    height: 190px;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(26, 25, 25, 0.6), 0 0 20px rgba(100, 80, 160, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/card-background.jpg') center/cover no-repeat;
    opacity: 0.2;
    border-radius: 40px;
    pointer-events: none;
    z-index: 0;
}

.stat-card::after {
    display: none;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.stat-card-title {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
    line-height: 100%;
    letter-spacing: 0.31px;
}

.stat-card-number-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.stat-card-number {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.stat-card-number-wrapper .increase {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #fff;
    font-weight: 600;
    font-size: 0.65rem;
}

.stat-card-number-wrapper .increase svg {
    width: 12px;
    height: 12px;
    fill: #fff;
}

.stat-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 11.2px;
    font-weight: 500;
    line-height: 15.51px;
    letter-spacing: -0.07px;
    color: rgba(255, 255, 255, 1);
    opacity: 0.65;
}

.stat-card-meta .increase {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    font-weight: 700;
    opacity: 1;
    font-size: 0.75rem;
}

.stat-card-meta .increase svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

.stat-card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* margin-top: auto; */
    /* padding-top: 12px; */
    /* border-top: 1px solid rgba(255, 255, 255, 0.08); */
    position: relative;
    z-index: 1;
}

.stat-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-direction: row-reverse;
}

.stat-detail-label {
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: -0.1px;
    color: rgba(255, 255, 255, 1);
}

.stat-detail-value {
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: -0.3px;
    color: rgba(255, 255, 255, 1);
}

/* ========== CONTENT SECTIONS ========== */
.content-section {
    padding: 0 24px 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ========== TASK LIST CARD ========== */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ========== TASK LIST CARD ========== */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1919;
}

.add-task-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: rgba(141, 49, 118, 1);
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-direction: row-reverse;
}

.add-task-btn:hover {
    opacity: 0.8;
}

.add-task-btn .plus-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #392d54;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
}

/* Task List Items */
.task-list {
    display: flex;
    flex-direction: column;
    max-height: 400px;
    overflow-y: auto;
    padding-left: 8px;
    /* For scrollbar breathing room */
}

/* Custom scrollbar for task list */
.task-list::-webkit-scrollbar {
    width: 6px;
}

.task-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #efefef;
    transition: background 0.2s ease;
}

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

.task-checkbox {
    width: 26px;
    height: 26px;
    border: 2px solid #8e94a3;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-checkbox:hover {
    border-color: rgba(141, 49, 118, 0.5);
}

.task-checkbox.checked {
    background: #fff;
    border-color: #8e94a3;
    position: relative;
}

.task-checkbox.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #392d54;
    border-radius: 50%;
}

.task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1919;
}

.task-description {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.task-date {
    font-size: 13px;
    color: #1a1919;
    font-weight: 600;
    margin-top: 2px;
}

.task-delete {
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    padding: 4px;
    flex-shrink: 0;
}

.task-delete:hover {
    color: #e74c3c;
}

/* ========== RECENT TASKS CARD ========== */
/* ========== RECENT TASKS NEW DESIGN ========== */
#card-recent-tasks-container {
    background: none;
    border-radius: 20px;
    padding: 0;
    box-shadow: none;
}

.recent-tasks-new-header {
    background: rgba(243, 243, 243, 0.66);
    border-radius: 18px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.recent-tasks-new-title {
    font-size: 18px;
    font-weight: 800;
    color: #1a1919;
    margin: 0;
}

.view-all-new-btn {
    padding: 6px 16px;
    border-radius: 8px;
    border: 1.5px solid rgba(141, 49, 118, 1);
    background: transparent;
    color: rgba(141, 49, 118, 1);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-new-btn:hover {
    background: rgba(141, 49, 118, 0.05);
}

.recent-task-new-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(243, 243, 243, 0.66);
    padding: 16px;
    border-radius: 20px;
}

.recent-task-new-item {
    background: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.recent-task-status-pill {
    position: absolute;
    top: -4px;
    left: 18px;
    /* Image shows arrow on left, status might be right? Wait. */
    /* Let's re-check the image. Arrow is left. Date is right. Status is TOP RIGHT. */
    right: 18px;
    width: 50px;
    height: 8px;
    border-radius: 4px;
}

.recent-task-status-pill.teal {
    background: #16a085;
}

.recent-task-status-pill.orange {
    background: #f39c12;
}

.recent-task-status-pill.pink {
    background: #f06292;
}

.recent-task-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.recent-task-date-new {
    font-size: 13px;
    font-weight: 600;
    color: #1a1919;
}

.recent-task-arrow-new {
    color: #000;
    display: flex;
    align-items: center;
}

.recent-task-arrow-new svg {
    width: 20px;
    height: 20px;
}

.recent-task-row-mid {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align task name to right in RTL */
    gap: 8px;
}

.recent-task-name-new {
    font-size: 16px;
    font-weight: 700;
    color: #1a1919;
    margin: 0;
}

.recent-task-check-new {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #1a1919;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-task-check-new svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #1a1919;
    stroke-width: 2.5;
}

.recent-task-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.recent-task-avatar-new {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.recent-task-project-pill-new {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f2f4f7;
    padding: 5px 10px;
    border-radius: 6px;
    color: #667085;
}

.recent-task-project-pill-new svg {
    width: 16px;
    height: 16px;
}

.recent-task-project-pill-new span {
    font-size: 12px;
    font-weight: 600;
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

.stat-card {
    animation: fadeInUp 0.6s ease forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

.card {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.5s;
}

.sidebar-nav-item {
    animation: slideInRight 0.4s ease forwards;
}

.sidebar-nav-item:nth-child(1) {
    animation-delay: 0.05s;
}

.sidebar-nav-item:nth-child(2) {
    animation-delay: 0.1s;
}

.sidebar-nav-item:nth-child(3) {
    animation-delay: 0.15s;
}

.sidebar-nav-item:nth-child(4) {
    animation-delay: 0.2s;
}

.sidebar-nav-item:nth-child(5) {
    animation-delay: 0.25s;
}

.sidebar-nav-item:nth-child(6) {
    animation-delay: 0.3s;
}

.sidebar-nav-item:nth-child(7) {
    animation-delay: 0.35s;
}

.sidebar-nav-item:nth-child(8) {
    animation-delay: 0.4s;
}

.sidebar-nav-item:nth-child(9) {
    animation-delay: 0.45s;
}

.sidebar-nav-item:nth-child(10) {
    animation-delay: 0.5s;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }

    .sidebar-nav-item span {
        display: none;
    }

    .main-content {
        margin-right: 80px;
        border-radius: 20px 0 0 20px;
    }

    .header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
    }

    .header-right {
        align-items: center;
        text-align: center;
    }

    .stats-section {
        padding: 0 20px 20px;
    }

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

    .content-section {
        padding: 0 20px 20px;
    }

    .stat-card-details {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .header-greeting h1 {
        font-size: 1.3rem;
    }

    .header-left {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========== CLIENTS PAGE ========== */
.clients-section {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Filters */
.clients-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: row;
}

.clients-filters .btn-outline-primary {
    border: 1px solid rgba(65, 47, 106, 1);
    color: rgba(65, 47, 106, 1);
    background: transparent;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.clients-filters .btn-outline-primary:hover {
    background: rgba(141, 49, 118, 0.05);
}

.filters-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
}

.filter-select {
    position: relative;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    background: #fff;
    min-width: 120px;
    width: fit-content !important;
}

.filter-select.custom-select {
    border: none;
    padding: 0;
}

.filter-select .custom-select-trigger {
    padding: 8px 12px;
    height: 100%;
}

.filter-select .custom-options {
    top: calc(100% + 4px);
}

.filter-select::after {
    content: '';
}

.filter-date,
.filter-search {
    position: relative;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 7px 12px;
    flex-direction: row;
}

.filter-date input,
.filter-search input {
    background: transparent;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
}

.filter-date {
    width: 180px;
}

.filter-search {
    width: 280px;
}

.filter-date input::placeholder,
.filter-search input::placeholder {
    color: #A2A2A2;
}

.filter-date svg,
.filter-search svg {
    width: 18px;
    height: 18px;
    color: #A2A2A2;
    margin-left: 8px;
}

/* Flatpickr Custom Match */
.flatpickr-calendar {
    font-family: 'Lama Sans', sans-serif !important;
    border-radius: 16px !important;
    border: 1px solid #E5E5E5 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    direction: rtl;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: rgba(141, 49, 118, 1) !important;
    border-color: rgba(141, 49, 118, 1) !important;
}

/* Tabs & Actions */
.clients-tabs-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #F0F0F0;
    padding-bottom: 0px;
    margin-top: 10px;
}

.actions-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-direction: row-reverse;
}

.btn-action-outline {
    border: 1px solid #ccc;
    background: transparent;
    color: #1a1919;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-action-outline:hover {
    background: #f9f9f9;
}

.btn-action-outline svg,
.btn-action-outline img {
    width: 16px;
    height: 16px;
    color: rgba(141, 49, 118, 1);
}

.btn-action-outline.btn-export,
.btn-action-outline.btn-import {
    border-color: rgba(65, 47, 106, 1);
    color: rgba(65, 47, 106, 1);
}

.btn-action-outline.btn-download {
    border-color: rgba(208, 213, 221, 1);
    color: rgba(52, 64, 84, 1);
}

.tabs-group {
    display: flex;
    gap: 24px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    padding: 0 0 12px 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.tab-btn.active {
    color: rgba(141, 49, 118, 1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #8D3176;
    border-radius: 3px 3px 0 0;
}

.tab-badge {
    background: #F2F4F7;
    color: #667085;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.tab-btn.active .tab-badge {
    background: #8D3176;
    color: #fff;
}

/* Table */
.clients-table {
    /* background: #F9F9F9; */
    border-radius: 12px;
    overflow: hidden;
    padding: 10px 0;
}

.clients-table table {
    width: 100%;
    border-spacing: 0;
    text-align: right;
}

.clients-table th {
    color: #1a1919;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 16px;
}

.clients-table td {
    padding: 10px 16px;
    vertical-align: middle;
    color: #333;
    font-size: 13px;
    font-weight: 600;
}

.clients-table tr {
    background: transparent;
    transition: background 0.3s;
    border-bottom: 2px solid #fff;
}

.clients-table tbody tr:hover {
    background: #f0f0f0;
}

.clients-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.td-id {
    color: #8D3176;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 1px;
}

.td-name {
    color: #1a1919;
    font-weight: 600;
    font-size: 13px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.status-active {
    background: #EBF7EE;
    color: #34A853;
}

.status-pending {
    background: #FFF7E6;
    color: #F8B500;
}

.status-archived {
    background: #EBEEF2;
    color: #8E94A3;
}

.status-lost {
    background: #FFEBEE;
    color: #E53935;
}

.btn-options {
    background: #E5E5E5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-options:hover {
    background: #d4d4d4;
}

.btn-options svg {
    width: 20px;
    height: 20px;
}

/* Row Actions Dropdown - Image 2 style */
.row-options-dropdown {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: max-content;
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #F0F0F0;
}

.row-options-dropdown.open {
    display: flex;
}

.row-option-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 16px;
    /* border-radius: 12px; */
    transition: background 0.2s;
    color: #1a1919;
    font-weight: 600;
    font-size: 20px;
    text-align: right;
}

.row-option-item:hover {
    background: #F9FAFB;
}

.row-option-item svg {
    width: 24px;
    height: 24px;
    stroke: #1a1919;
}

.row-option-item.text-danger {
    color: #B42318;
}

.row-option-item.text-danger svg {
    stroke: #B42318;
}

.dropdown-divider {
    height: 1px;
    background: #F0F0F0;
    margin: 8px 0;
}

/* Create Quotation Page Styles */
.create-quotation-section {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.create-quotation-card {
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.create-form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1919;
    margin-bottom: 6px;
}

.create-form-label span {
    color: #E53935;
}

.create-form-input {
    width: 100%;
    height: 42px;
    background: #F9FAFB;
    border: 1px solid #F0F0F0;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 13px;
    color: #333;
    transition: all 0.3s;
}

.create-form-input:focus {
    border-color: #8D3176;
    background: #fff;
}

.create-input-wrapper {
    position: relative;
    width: 100%;
}

.search-product-wrapper {
    margin-top: 24px;
}

.search-product-input {
    width: 100%;
    height: 44px;
    background: #F9FAFB;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    padding: 0 50px 0 16px;
    font-size: 14px;
}

.search-product-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #8D3176;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-product-icon svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
}

/* Added Products List */
.added-products-container {
    margin-top: 30px;
    display: flex;
    gap: 24px;
}

.added-products-main {
    flex: 1;
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 24px;
    padding: 24px;
}

.added-products-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.products-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr auto;
    gap: 16px;
    padding: 0 16px 12px;
    color: #8E94A3;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

.product-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.product-row-content {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 16px;
    align-items: center;
    padding: 12px 24px;
    background: #F9FAFB;
    border-radius: 40px;
    text-align: center;
}

.product-info-cell {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name-val {
    font-size: 15px;
    font-weight: 700;
    color: #1a1919;
}

.product-code-val {
    font-size: 13px;
    color: #8D3176;
    font-weight: 600;
}

.qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #DAE1F0;
    border-radius: 14px;
    padding: 3px;
    width: fit-content;
    margin: 0 auto;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1a1919;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qty-val {
    font-weight: 700;
    font-size: 15px;
}

.delete-product-btn {
    color: #B42318;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Financial Summary Sidebar */
.financial-summary-card {
    width: 320px;
    background: #F9FAFB;
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.financial-summary-card .create-form-input,
.financial-summary-card .custom-select-trigger {
    background: #fff !important;
}

.summary-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1919;
}

.summary-val {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.summary-val.total-large {
    font-size: 24px;
    color: #8D3176;
}

.validity-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8E94A3;
    font-size: 13px;
    margin-top: 12px;
    justify-content: flex-start;
}

/* Responsiveness for Create Quotation Page */
@media (max-width: 1100px) {
    .added-products-container {
        flex-direction: column;
    }

    .financial-summary-card {
        width: 100%;
    }

    .added-products-main {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .products-table-header,
    .product-row {
        min-width: 850px;
    }
}

@media (max-width: 768px) {
    .create-header-row {
        flex-direction: column;
        gap: 16px;
    }

    .create-header-row .form-group {
        width: 100% !important;
    }

    .form-actions-footer {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .btn-save-main,
    .btn-save-convert,
    .btn-cancel-main {
        width: 100%;
        padding: 14px 20px;
        margin-inline-start: 0 !important;
    }
}

/* Bottom Actions */
.form-actions-footer {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 40px;
}

.btn-save-main {
    background: #8D3176;
    color: #fff;
    border-radius: 12px;
    padding: 10px 40px;
    font-size: 15px;
    font-weight: 700;
}

.btn-save-convert {
    background: #fff;
    border: 1.5px solid #F8B500;
    color: #F8B500;
    border-radius: 12px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 700;
}

.btn-cancel-main {
    background: #fff;
    border: 1.5px solid #1a1919;
    color: #1a1919;
    border-radius: 12px;
    padding: 10px 40px;
    font-size: 15px;
    font-weight: 700;
    margin-inline-start: auto;
}

/* Pagination */
.clients-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    padding-right: 20px;
}

.page-num,
.page-nav {
    background: transparent;
    border: none;
    color: #A2A2A2;
    font-size: 14px;
    font-weight: 600;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
}

.page-num.active {
    background: rgba(141, 49, 118, 1);
    color: #fff;
}

.page-num:hover:not(.active),
.page-nav:hover {
    color: rgba(141, 49, 118, 1);
}

/* ========== ROW OPTIONS DROPDOWN ========== */
.td-actions {
    position: relative;
    text-align: center;
}

.row-options-dropdown {
    position: absolute;
    left: 100%;
    top: 80%;
    transform: translateY(10px) translateX(10px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-width: 180px;
    padding: 8px 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
}

/* Arrow for the dropdown box */
/* .row-options-dropdown::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 12px;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
} */

.row-options-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(-37px) translateX(0);
}

.row-options-dropdown.open.open-up {
    top: auto;
    bottom: 50%;
    transform: translateY(-10px) translateX(0);
}

.row-option-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 20px;
    color: #1a1919;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: right;
    cursor: pointer;
    flex-direction: row-reverse;
}

.row-option-item:hover {
    background: #f8f8f8;
}

.row-option-item svg {
    width: 20px;
    height: 20px;
}

.row-option-item.text-whatsapp {
    color: #009776;
}

.row-option-item.text-danger {
    color: #E2001A;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
    padding-top: 16px;
}

/* ========== MODAL POPUP ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: 22px;
    width: 100%;
    max-width: 460px;
    padding: 28px;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 20px;
    text-align: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1919;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: #1a1919;
}

/* Custom Select styling for Modal */
.custom-select {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.custom-select-trigger .arrow {
    width: 12px;
    height: 12px;
    border-bottom: 2px solid #666;
    border-left: 2px solid #666;
    transform: rotate(-45deg) translateY(-2px);
    transition: transform 0.3s;
}

.custom-select.open .custom-select-trigger .arrow {
    transform: rotate(135deg) translateY(-2px);
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 8px 0;
    max-height: 250px;
    overflow-y: auto;
}

.custom-options::-webkit-scrollbar {
    width: 6px;
}

.custom-options::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
    margin: 8px 0;
}

.custom-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

.custom-options::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

.custom-option {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: #1a1919;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.custom-option:hover {
    background: #f8f8f8;
}

.custom-option.selected {
    background: #f0f0f0;
    font-weight: 700;
}

.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    background: #FDFDFD;
    resize: none;
    height: 100px;
    font-size: 14px;
    color: #333;
    font-family: inherit;
}

.form-textarea::placeholder {
    color: #999;
}

.modal-footer {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

.btn-modal {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-modal-primary {
    background: rgba(141, 49, 118, 1);
    color: #fff;
    border: none;
}

.btn-modal-primary:hover {
    background: rgba(160, 60, 136, 1);
}

.btn-modal-secondary {
    background: #fff;
    color: #1a1919;
    border: 1px solid #1a1919;
}

.btn-modal-secondary:hover {
    background: #f9f9f9;
}

/* ========== CREATE CLIENT PAGE ========== */

.create-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(212, 142, 0, 1);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 8px;
    transition: opacity 0.3s;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-self: flex-start;
}

.create-back-link:hover {
    opacity: 0.7;
}

.create-back-link svg {
    color: rgba(212, 142, 0, 1);
}

.create-client-section {
    padding: 0 24px 24px;
}

.create-client-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    /* box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04); */
    border: 1px solid #F0F0F0;
}

.create-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.create-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.create-form-label {
    font-size: 14px;
    font-weight: 700;
    color: #1a1919;
    text-align: right;
}

.create-form-label-centered {
    text-align: center;
    font-size: 14px;
}

.create-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.create-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(226, 232, 240, 1);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(100, 116, 139, 1);
    background: rgba(248, 250, 251, 1);
    transition: border-color 0.3s;
    font-family: inherit;
}

.create-form-input::placeholder {
    color: rgba(100, 116, 139, 1);
}

.create-form-input:focus {
    border-color: rgba(141, 49, 118, 0.5);
}

.create-input-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: #999;
    pointer-events: none;
}

/* Date input - hide native browser icon */
.create-date-input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.create-date-input::-webkit-datetime-edit-text,
.create-date-input::-webkit-datetime-edit-month-field,
.create-date-input::-webkit-datetime-edit-day-field,
.create-date-input::-webkit-datetime-edit-year-field {
    color: rgba(100, 116, 139, 1);
}

.create-date-input::-webkit-datetime-edit {
    direction: rtl;
}

.create-date-input:valid::-webkit-datetime-edit-text,
.create-date-input:valid::-webkit-datetime-edit-month-field,
.create-date-input:valid::-webkit-datetime-edit-day-field,
.create-date-input:valid::-webkit-datetime-edit-year-field {
    color: rgba(100, 116, 139, 1);
}

/* Phone input with country code */
.create-phone-input {
    text-align: right;
    padding-right: 100px;
}

.create-phone-code {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 14px;
    border-left: 1px solid #E5E5E5;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    border-radius: 0 12px 12px 0;
    background: #fff;
    cursor: pointer;
}

.create-phone-code svg {
    color: #666;
}

/* WhatsApp options row */
.create-whatsapp-row {
    margin-bottom: 28px;
    margin-top: -16px;
}

.create-whatsapp-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.create-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.create-checkbox-label input[type="checkbox"] {
    display: none;
}

.create-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.create-checkbox-label input[type="checkbox"]:checked+.create-checkmark {
    background: rgba(20, 174, 92, 1);
    border-color: rgba(20, 174, 92, 1);
}

.create-checkbox-label input[type="checkbox"]:checked+.create-checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.create-add-whatsapp {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(141, 49, 118, 1);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s;
}

.create-add-whatsapp:hover {
    opacity: 0.7;
}

.create-add-whatsapp svg {
    color: rgba(141, 49, 118, 1);
}

/* Dynamic WhatsApp number rows */
.create-whatsapp-number-row {
    margin-bottom: 16px;
    margin-top: -8px;
}

.create-remove-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #E2001A;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 6px;
    transition: opacity 0.3s;
}

.create-remove-whatsapp:hover {
    opacity: 0.7;
}

.create-remove-whatsapp svg {
    color: #E2001A;
}

/* Select wrapper */
.create-select-wrapper {
    position: relative;
}

.create-form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    font-size: 13px;
    color: #999;
    background: #fff;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.3s;
}

.create-form-select:focus {
    border-color: rgba(141, 49, 118, 0.5);
    outline: none;
}

.create-form-select option {
    color: #333;
}

.create-select-arrow {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #666;
    pointer-events: none;
}

/* Override custom-select-trigger styles for create page */
.create-custom-select .custom-select-trigger {
    background: rgba(248, 250, 251, 1);
    border-color: rgba(226, 232, 240, 1);
    color: rgba(100, 116, 139, 1);
}

/* Saudi radio group */
.create-saudi-row {
    margin-top: 8px;
}

.create-saudi-row .create-form-group {
    align-items: flex-start;
}

.create-full-width {
    grid-column: 1 / -1;
}

.create-radio-group {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: center;
}

.create-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.create-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: rgba(141, 49, 118, 1);
    cursor: pointer;
}

.create-radio-custom {
    display: none;
}

/* Additional info link */
.create-additional-row {
    margin-top: 8px;
    margin-bottom: 0;
}

.create-additional-row .create-form-group {
    align-items: flex-start;
}

.create-additional-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(0, 151, 118, 1);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s;
}

.create-additional-info:hover {
    opacity: 0.7;
}

.create-additional-info svg {
    color: rgba(0, 151, 118, 1);
}

.create-additional-info.active svg line:first-child {
    display: none;
}

/* Extra information section */
.create-extra-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #F0F0F0;
}

.create-extra-info .create-form-row {
    margin-bottom: 24px;
}

/* Form action buttons */
.create-form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    justify-content: flex-end;
}

.create-btn-save {
    padding: 10px 40px;
    background: rgba(141, 49, 118, 1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
}

.create-btn-save:hover {
    background: rgba(160, 60, 136, 1);
}

.create-btn-cancel {
    padding: 10px 30px;
    background: #fff;
    color: #1a1919;
    border: 1px solid #1a1919;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
}

.create-btn-cancel:hover {
    background: #f9f9f9;
}

/* ========== RESPONSIVE – CREATE CLIENT PAGE ========== */
@media (max-width: 768px) {
    .create-client-section {
        padding: 0 12px 12px;
    }

    .create-client-card {
        padding: 24px 16px;
    }

    .create-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .create-whatsapp-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .create-form-actions {
        flex-direction: column-reverse;
    }

    .create-btn-save,
    .create-btn-cancel {
        width: 100%;
        text-align: center;
    }
}

/* ========== RESPONSIVE – CLIENTS PAGE ========== */

/* Tablet landscape & small desktops */
@media (max-width: 1200px) {
    .clients-section {
        padding: 0 20px 20px;
    }

    .clients-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .filters-group {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-select {
        flex: 1;
        min-width: 140px;
    }

    .filter-date {
        flex: 1;
        min-width: 160px;
        width: auto;
    }

    .filter-search {
        flex: 1;
        min-width: 200px;
        width: auto;
    }

    .clients-tabs-actions {
        flex-wrap: wrap;
        gap: 16px;
    }

    .actions-group {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }

    .clients-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .clients-table table {
        min-width: 800px;
    }
}

/* Tablet portrait */
@media (max-width: 992px) {
    .clients-tabs-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .tabs-group {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding-bottom: 10px;
        scrollbar-width: none;
    }

    .tabs-group::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        font-size: 13px;
        padding: 8px 14px 10px;
        white-space: nowrap;
        flex-shrink: 0;
        border-radius: 8px;
        background: #f5f5f5;
    }

    .tab-btn.active {
        background: rgba(141, 49, 118, 0.08);
    }

    .tab-btn.active::after {
        display: none;
    }

    .actions-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        flex-direction: unset;
    }

    .btn-action-outline {
        justify-content: center;
        padding: 10px 12px;
        font-size: 12px;
    }

    .filters-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .filter-select,
    .filter-date,
    .filter-search {
        width: 100%;
        min-width: unset;
    }

    .clients-filters .btn-outline-primary {
        width: 100%;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .clients-table th,
    .clients-table td {
        padding: 12px 14px;
        font-size: 13px;
    }

    .clients-pagination {
        flex-wrap: wrap;
        gap: 6px;
    }

    .modal-content {
        width: 90%;
        padding: 30px 24px;
    }
}

/* Mobile landscape & small tablets */
@media (max-width: 768px) {
    .clients-section {
        padding: 0 12px 12px;
    }

    .clients-filters {
        gap: 10px;
    }

    .filters-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .filter-select,
    .filter-date,
    .filter-search {
        width: 100%;
    }

    .filter-date input,
    .filter-search input {
        width: 100%;
    }

    .actions-group {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-action-outline {
        font-size: 12px;
        padding: 10px 10px;
        gap: 6px;
    }

    .btn-action-outline svg,
    .btn-action-outline img {
        width: 14px;
        height: 14px;
    }

    .tabs-group {
        gap: 4px;
    }

    .tab-btn {
        font-size: 12px;
        padding: 7px 12px 8px;
    }

    .tab-badge {
        font-size: 10px;
        padding: 1px 6px;
    }

    .clients-table table {
        min-width: 650px;
    }

    .clients-table th,
    .clients-table td {
        padding: 10px 10px;
        font-size: 12px;
    }

    .clients-pagination {
        justify-content: center;
    }

    .page-num,
    .page-nav {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 24px 16px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-footer {
        flex-direction: column;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .clients-section {
        padding: 0 8px 8px;
    }

    .actions-group {
        grid-template-columns: 1fr;
    }

    .btn-action-outline {
        width: 100%;
    }

    .tab-btn {
        font-size: 11px;
        padding: 6px 10px 7px;
        gap: 4px;
    }

    .tab-badge {
        font-size: 9px;
    }

    .clients-table table {
        min-width: 550px;
    }

    .clients-table th,
    .clients-table td {
        padding: 8px 8px;
        font-size: 11px;
    }

    .status-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .btn-options svg {
        width: 16px;
        height: 16px;
    }

    .row-options-dropdown {
        min-width: 150px;
    }

    .row-option-item {
        padding: 10px 14px;
        font-size: 13px;
    }

    .modal-content {
        border-radius: 16px;
    }

    .btn-modal {
        font-size: 15px;
        padding: 14px;
    }
}

/* ========== CLIENT DETAILS VIEW ========== */
.client-details-section {
    padding: 0 24px 24px;
}

.client-details-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 20px;
}

/* ========== HEADER ACTIONS: EDIT, CONVERT, DOWNLOAD ========== */
.view-quotation-actions-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.view-q-btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #1a1919;
    color: #1a1919;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-q-btn-edit:hover {
    background: #f8f9fa;
}

.view-q-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #4B318D;
    color: #4B318D;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-q-btn-action svg {
    color: #4B318D;
}

.view-q-btn-action:hover {
    background: rgba(75, 49, 141, 0.05);
}

/* Box shared styles */
.client-box {
    background: rgba(248, 250, 251, 1);
    border-radius: 18px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
}

.client-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.client-box-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1919;
}

/* Client ID Badge */
.client-id-badge {
    font-size: 11.02px;
    font-weight: 600;
    color: #fff;
    background: rgba(146, 152, 164, 1);
    padding: 9.18px;
    border-radius: 13.96px;
}

/* Status Badge */
.client-status-badge {
    display: inline-block;
    padding: 6px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.client-status-active {
    background: rgba(198, 246, 236, 1);
    color: rgba(0, 151, 118, 1);
    font-size: 15.55px;
    font-weight: 700;
    padding: 5.18px 10.37px;
    border-radius: 6.48px;
}

/* Info Grid (2 columns for personal data) */
.client-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}

/* Info Items */
.client-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
}

.client-info-label {
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
}

.client-info-value {
    font-size: 15px;
    font-weight: 500;
    color: #1a1919;
    word-break: break-word;
    line-height: 1.4;
}

/* Centered Info Item for Quotation Details */
.quotation-info-centered {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    flex: 1;
}

.client-info-item-center {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.client-info-item-center .client-info-label {
    font-size: 14px;
    font-weight: 600;
    color: #8E94A3;
}

.client-info-item-center .client-info-value {
    font-size: 24px;
    font-weight: 500;
    color: #1a1919;
}

/* ========== VIEW QUOTATION PRODUCTS ========== */
.view-products-container {
    margin-top: 24px;
}

.view-products-header-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1919;
    margin-bottom: 16px;
    text-align: right;
}

.view-products-table {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.view-products-th {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2.5fr 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 0 24px 8px;
    color: #8E94A3;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.view-products-th>div:first-child {
    text-align: right;
}

.view-product-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2.5fr 1fr 1fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    background: rgba(248, 250, 251, 1);
    border-radius: 12px;
    padding: 10px 16px;
    text-align: center;
}

.view-product-row>.view-product-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.view-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1919;
}

.view-product-code {
    font-size: 13px;
    font-weight: 600;
    color: #8D3176;
}

.view-product-img-wrapper {
    display: flex;
    justify-content: center;
}

.view-product-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.view-product-desc {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    color: #1a1919;
}

.view-product-val {
    font-size: 15px;
    font-weight: 600;
    color: #1a1919;
}

@media (max-width: 1200px) {
    .view-products-container {
        overflow-x: auto;
    }

    .view-products-table {
        min-width: 900px;
    }
}

/* Contact List */
.client-contact-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1;
}

.client-contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* Box Actions */
.client-box-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    padding-top: 32px;
    justify-content: flex-start;
    flex-direction: row-reverse;
}

.client-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: rgba(0, 151, 118, 1);
    color: #fff;
    border-radius: 6.48px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.client-data-actions {
    margin-top: 24px;
    padding-top: 0;
    /* justify-content: flex-end; */
}

.client-data-whatsapp {
    border-radius: 8px;
}

.client-whatsapp-btn:hover {
    background: rgba(0, 130, 100, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 151, 118, 0.3);
}

.client-download-report {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1.5px solid #e0e0e0;
    border-radius: 6.48px;
    background: #fff;
}

.client-download-report:hover {
    border-color: rgba(141, 49, 118, 0.5);
    color: rgba(141, 49, 118, 1);
}

.client-download-report .action-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* --- Responsive rules for View Quotation Details --- */
@media (max-width: 992px) {
    .client-details-grid {
        grid-template-columns: 1fr;
    }

    .client-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .client-contact-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .client-details-section {
        padding: 0 16px 24px;
    }

    .client-box {
        padding: 24px 20px;
    }

    .client-box-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .view-quotation-actions-top {
        flex-direction: column;
        align-items: stretch;
    }

    .view-q-btn-edit,
    .view-q-btn-action {
        width: 100%;
    }

    .client-data-actions {
        justify-content: center;
        width: 100%;
    }

    .client-whatsapp-btn {
        width: 100%;
        justify-content: center;
    }

    .client-box-actions {
        justify-content: center;
        width: 100%;
        gap: 12px;
        flex-direction: column-reverse;
    }

    .client-download-report {
        width: 100%;
        justify-content: center;
    }
}

/* ========== ACTIVITY TIMELINE & MODAL ========== */
.feed-wrapper,
.action-modal-overlay {
    --bg-app: #f4f7fb;
    --surface: #ffffff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border: #e2e8f0;

    /* Activity Theme Colors */
    --color-call: #10b981;
    --bg-call: #d1fae5;

    --color-invoice: #3b82f6;
    --bg-invoice: #dbeafe;

    --color-note: #f59e0b;
    --bg-note: #fef3c7;

    --color-stage: #8B3275;
    /* Brand Purple */
    --bg-stage: #fdf4fa;

    --color-visit: #8b5cf6;
    --bg-visit: #ede9fe;

    --color-meeting: #f43f5e;
    /* Rose */
    --bg-meeting: #ffe4e6;
}

/* --- Expanded Width --- */
.feed-wrapper {
    width: 100%;
    margin-top: 24px;
    background-color: var(--surface);
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* --- Header & Buttons --- */
.feed-header {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 15px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.feed-wrapper .btn,
.action-modal-overlay .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.feed-wrapper .btn-primary,
.action-modal-overlay .btn-primary {
    background-color: var(--color-stage);
    color: #ffffff;
}

.feed-wrapper .btn-primary:hover,
.action-modal-overlay .btn-primary:hover {
    background-color: #70265d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 50, 117, 0.2);
}

.feed-wrapper .btn-outline {
    color: var(--color-invoice);
    background-color: var(--bg-invoice);
}

.feed-wrapper .btn-outline-stage {
    color: var(--color-stage);
    background-color: #fff;
    border: 1.5px solid var(--color-stage);
    font-weight: 500;
    font-size: 16px;
    padding: 8px 24px;
}

.feed-wrapper .btn-outline-stage:hover {
    background-color: rgba(139, 50, 117, 0.04);
}

/* --- Feed Container --- */
.activity-list {
    position: relative;
}

.activity-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 23px;
    width: 2px;
    background-color: var(--border);
    z-index: 0;
}

/* --- Individual Activity Item --- */
.activity-item {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border: 4px solid var(--surface);
}

.icon-box svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

/* --- Wide Card Content Box --- */
.activity-content-box {
    flex-grow: 1;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    transition: all 0.2s;
}

.activity-content-box:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.activity-content-box::before {
    content: '';
    position: absolute;
    top: 18px;
    right: -6px;
    width: 10px;
    height: 10px;
    background-color: inherit;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    transform: rotate(45deg);
}

/* Right Side: Main Details */
.content-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lead-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-gray);
    background-color: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    width: max-content;
    margin-bottom: 4px;
    border: 1px solid var(--border);
}

.lead-badge svg {
    width: 14px;
    height: 14px;
    color: var(--color-stage);
}

.activity-title {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

/* Images Gallery */
.img-gallery {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.img-gallery img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s;
}

.img-gallery img:hover {
    transform: scale(1.05);
    border-color: var(--color-stage);
}

/* NEW: ATTENDANCE ACTION BUTTONS */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.btn-attend {
    background-color: #00c48c;
    /* Exact Green from image */
    color: white;
    border: none;
    padding: 8px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-absent {
    background-color: #c91028;
    /* Exact Red from image */
    color: white;
    border: none;
    padding: 8px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-attend:hover,
.btn-absent:hover {
    opacity: 0.9;
    transform: scale(0.98);
}

/* Left Side: Metadata (User & Time) */
.content-metadata {
    flex-shrink: 0;
    width: 220px;
    border-right: 1px dashed var(--border);
    padding-right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 700;
}

.timeline-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-dark);
    font-size: 0.8rem;
}

/* Types */
.type-stage .icon-box {
    background-color: var(--bg-stage);
    color: var(--color-stage);
}

.timeline-stage-change {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 700;
}

.timeline-stage-pill {
    padding: 6px 14px;
    border-radius: 6px;
    background-color: var(--border);
    color: var(--text-dark);
}

.timeline-stage-pill.new {
    background-color: var(--color-stage);
    color: white;
}

.type-visit .icon-box {
    background-color: var(--bg-visit);
    color: var(--color-visit);
}

.type-meeting .icon-box {
    background-color: var(--bg-meeting);
    color: var(--color-meeting);
}

.type-note .icon-box {
    background-color: var(--bg-note);
    color: var(--color-note);
}

.type-invoice .icon-box {
    background-color: var(--bg-invoice);
    color: var(--color-invoice);
}

.type-call .icon-box {
    background-color: var(--bg-call);
    color: var(--color-call);
}

/* Specific Timeline Item Styles */
.timeline-note-content {
    background-color: #FDF9E9;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-top: 4px;
}

.btn-invoice-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--color-stage);
    color: var(--color-stage);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 8px;
    width: max-content;
    transition: all 0.2s;
    background: transparent;
}

.btn-invoice-link:hover {
    background-color: var(--bg-stage);
}

.timeline-call-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 4px;
}

.call-status-pill {
    background-color: var(--bg-call);
    color: var(--color-call);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* =========================================
   MODAL (POPUP) STYLES
========================================= */
.action-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.action-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.action-modal-box {
    background-color: var(--surface);
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.action-modal-overlay.active .action-modal-box {
    transform: translateY(0) scale(1);
}

.action-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.action-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
}

.action-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-form-group {
    margin-bottom: 24px;
    text-align: right;
}

.action-form-label {
    display: block;
    font-weight: 800;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #1a1a1a;
}


.action-form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: #fff;
    transition: border 0.2s;
    color: #1a1a1a;
    appearance: none;
    resize: vertical;
}

.action-form-control::placeholder {
    color: #94a3b8;
}

.action-form-control:focus {
    outline: none;
    border-color: var(--color-stage);
}

.action-upload-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
    flex-direction: column;
}

.upload-text-content {
    flex: 1;
}

.upload-hint {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.upload-btn-container {
    flex-shrink: 0;
    padding-top: 24px;
}

.action-btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1.5px solid var(--color-stage);
    border-radius: 12px;
    color: var(--color-stage);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.action-btn-upload:hover {
    background: var(--bg-stage);
}

.action-modal-footer {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.action-btn-save {
    flex: 1;
    background-color: var(--color-stage);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.action-btn-save:hover {
    opacity: 0.9;
}

.action-btn-cancel {
    width: 120px;
    background-color: #fff;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    padding: 14px;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.action-btn-cancel:hover {
    background-color: #f1f5f9;
}

@media (max-width: 850px) {
    .activity-content-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .content-metadata {
        width: 100%;
        border-right: none;
        border-top: 1px dashed var(--border);
        padding-right: 0;
        padding-top: 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .action-upload-group {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-btn-container {
        padding-top: 10px;
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .feed-wrapper {
        padding: 24px 16px;
    }

    .feed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .feed-header .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .feed-header .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .activity-item {
        gap: 12px;
    }

    .icon-box {
        width: 40px;
        height: 40px;
    }

    .icon-box svg {
        width: 18px;
        height: 18px;
    }

    .activity-list::before {
        right: 19px;
    }
}

@media (max-width: 480px) {
    .content-metadata {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .activity-content-box {
        padding: 16px;
    }

    .quick-actions {
        flex-direction: column;
        width: 100%;
    }

    .quick-actions .btn-attend,
    .quick-actions .btn-absent {
        width: 100%;
    }
}