:root {
    --primary-color: #4F46E5; 
    --success-color: #16A34A;
    --danger-color: #DC2626;
    --primary-text: #111827;
    --secondary-text: #6B7280;
    --border-color: #E5E7EB;
    --background-color: #F9FAFB;
    --card-background: #FFFFFF;
    --font-family: 'Roboto', sans-serif;
    --blue-light-bg: #E0F2FE;
    --blue-dark-text: #0284C7;
    --green-light-bg: #F0FDF4;
    --green-dark-text: #15803D;
    --red-light-bg: #FEF2F2;
    --red-dark-text: #C38383;
    --warning-color: #F59E0B;
	 
    --blue-text: #0284C7; 
    --green-text: #15803D;
    --sheet-background: #FFFFFF;
}




.customer-list-container {
    max-width: 450px; /* Ideal for mobile view, limits width on desktop */
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 16px; /* Space between cards */
	padding-left: 20px;
	padding-right: 20px;
	position: relative;
}


.customer-list-container .chenar_more
{
position: absolute;
	top: 20px;
	right: 40px;
	z-index: 100000;
	white-space: nowrap;
}

.customer-list-container .chenar_more i
{
	font-size: 20px;
	color: #666666;
}

.customer-list-container .chenar_more .chenar_more_sub
{

	position: absolute;
	top: 19px;
	right: 0;
	width: 270px;
	min-height: 20px;
	background: #ffffff;
	padding: 10px; 
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	display: none;
	text-align: center;
}

.customer-list-container .chenar_more .chenar_more_sub input[type=text]
{
    width: 110px !important;
	padding: 5px !important; 
	text-align: center !important;
    font-size: 0.9rem !important;
	font-family: "Roboto" !important;
    box-sizing: border-box;
    margin: 0;
}

.customer-list-container .chenar_more:hover .chenar_more_sub
{
	display: block;
}


/* --- Customer Card Styling --- */
.customer-card {
    background-color: var(--card-background);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align to the top */
    margin-bottom: 16px;
}

.customer-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-right: 16px; /* Space between name and button */
}

.btn-edit {
    flex-shrink: 0; /* Prevents the button from shrinking */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--green-light-bg);
    color: var(--green-text);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-edit:hover {
    background-color: #DCFCE7;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.balance-info {
    text-align: left;
}

.balance-info .label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-text);
}

.balance-amount {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--green-text);
}

/* Example of a positive balance color */
.balance-amount.balance-positive {
    color: #B91C1C; /* A red color for positive balance */
}

.btn-invoice {
    background-color: var(--blue-light-bg);
    color: var(--blue-text);
    padding: 12px 24px;
    border-radius: 99px; /* Pill shape */
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-invoice:hover {
    background-color: #BAE6FD;
}

.btn-invoice-m {
	   padding: 8px 14px; 
    font-size: .9rem;
    background-color: var(--green-light-bg);
    color: var(--green-text);
}

.card-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.card-details {
    display: grid;
    grid-template-columns: 80px 1fr; /* Fixed width for label, flexible for value */
    gap: 12px;
}

.detail-item .label {
    font-size: 0.9rem;
    color: var(--secondary-text);
    font-weight: 500;
}

.detail-item .value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-text);
	overflow-x: auto;
}
.client-form
{
	padding: 20px;
	padding-left: 10px;
	padding-right: 10px;
}

/* --- Form Elements --- */
.form-groupc {
    margin-bottom: 20px;
}
.form-groupc label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary-text);
    margin-bottom: 8px;
}
.form-groupc input, .form-groupc select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--sheet-background);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-groupc input:focus, .form-groupc select:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

/* --- Section Divider --- */
.section-divider {
    border-top: 1px solid var(--border-color);
    margin: 40px 0 0;
    position: relative;
    text-align: center;
	bottom: -20px;
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-text);
    background-color: var(--sheet-background);
    padding: 0 12px;
    /* This centers the title on top of the line */
    position: relative;
    top: -30px;
    display: inline-block;
}

.btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    padding: 10px 16px;
    margin-top: 12px;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    background-color: var(--green-light-bg);
    color: var(--green-text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}


.selected
{ 
    padding: 12px 16px;
    font-size: 1rem; 
    border: 1px #666666;
    border-radius: 10px;
    background-color: #EEEEEE;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
	margin-top: 10px;
	margin-bottom: 10px;
	display: inline-block;
}

.invoice-wrapper { 
    margin: auto;
    padding: 20px;
	padding-top: 0;
}

.invoice-id {
    font-size: 0.9rem;
    color: var(--secondary-text);
}


.card .delete-item
{
   position: absolute;
    top: 5px;
    right: 5px;
    border-radius: 8px;
    width: 32px !important;
    height: 32px;
    background-color: #FFE6E7;
    color: #EF191D;
    border: 0;	
}

/* --- Card Base Style --- */
.card, .total-highlight-card {
    background-color: var(--card-background);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
	position: relative;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
	padding-top: 0;
	margin-top: 0;
    border-bottom: 1px solid var(--border-color);
}

.card_mic
{
	font-size: 14px;
}

/* --- Total Highlight Card --- */
.total-highlight-card {
    text-align: center;
    padding: 24px;
}
.total-label {
    font-size: 1rem;
    color: var(--secondary-text);
}
.total-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 4px 0 12px 0;
}
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}
.status.status-paid {
    background-color: #D1FAE5;
    color: #065F46;
}
.status.status-paid i { color: #10B981; }

/* --- Invoice Details Card --- */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.detail-label {
    color: var(--secondary-text);
}
.detail-value {
    font-weight: 600;
	margin-left: 10px;
	text-align: right;
} 

._nor
{ 
    font-weight: 400;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
}

/* --- Line Items Card --- */
.line-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
}
.item-description {
    display: flex;
    flex-direction: column;
    margin-right: 16px;
}
.item-name {
    font-weight: 600;
    line-height: 1.4;
}
.item-meta {
    font-size: 0.85rem;
    color: var(--secondary-text);
}
.item-total {
    font-weight: 600;
    white-space: nowrap;
}

.line-item-totals {  
    padding-top: 16px;
}
.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--secondary-text);
}
.total-row.grand-total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-text);
    margin-top: 12px;
}

/* --- Payments Card --- */
.payment-item {
    display: flex;
    align-items: center;
    gap: 16px;
	position: relative;
	margin-bottom: 20px;
}
.payment-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #D1FAE5;
    color: #09AA7D;
    display: flex;
    justify-content: center;
    align-items: center;
	vertical-align: top;
}
.del-payment-icon {
    flex-shrink: 0;
    width: 40px;
    height: 20px; 
    color: #E60202;
    display: flex;
    justify-content: right;
    align-items: right; 
	margin-bottom: 10px;
	width: 72px;
}
.payment-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.payment-amount {
    font-weight: 600;
}
.payment-meta {
    font-size: 0.85rem;
    color: var(--secondary-text);
}


.payment-actions { 
	
    display: flex;
    align-items: right;
    gap: 8px;
    flex-shrink: 0; 

}

.action-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.action-buttons .btn {
flex: 1;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
	margin-top: 5px;
}

.action-buttons  .btn-primary {     background-color: #E0F2FE;
    color: #0284C7; } 
.action-buttons  .btn-secondary { background-color: #FEF3C7;
    color: #B45309; } 
.action-buttons  .btn-danger { background-color: #FEE2E2;
    color: var(--danger-color); } 

.btn-details {
    background-color: #F3F4F6;
    color: var(--primary-text);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-delete {
    background-color: transparent;
    border: none;
    width: 17px;
    height: 36px;
    border-radius: 8px;
    color: var(--secondary-text); /* Default color is subtle gray */
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}


.form-container {
    padding: 24px;
}

/* --- Form Section Styling --- */
.form-section {
    margin-bottom: 28px;
}

.section-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-text);
    margin-bottom: 12px;
}

.supplier-info .supplier-name {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* --- Tag-like Button --- */
.btn.btn-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 99px; /* Fully rounded pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-tag i {
    font-size: 0.9em;
}

.btn-green {
    background-color: var(--green-light-bg);
    color: var(--green-dark-text);
}
.btn-green:hover { background-color: #DCFCE7; }


/* --- Full-Width Action Buttons --- */
.btn.btn-fullwidth {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-green-light {
    background-color: var(--green-light-bg);
    color: var(--green-icon);
}
.btn-green-light:hover { background-color: #DCFCE7; }

.btn-blue-light {
    background-color: var(--blue-light-bg);
    color: var(--blue-dark-text);
}
.btn-blue-light:hover { background-color: #E0F2FE; }


/* --- Form Grid & Input Styling --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
	width: 100%;
}

.form-grid-block {
    display: block; 
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary-text);
    margin-bottom: 8px;
}

/* Base style for inputs and select */
.form-group input, .form-group select, .form-group textarea {
    width: calc(100% - 2em) !important;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
	position: relative;
}
 


.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #A5B4FC;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* --- Sticky Footer --- */
.form-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
	text-align: center;
}

.btn-save {
   
    width: calc(100% - 2em);
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    background-color: var(--warning-color);
    color: #000000;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
	display: inline-block;
}



/* --- Date Input with Icon --- */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon input {
    padding-right: 40px; /* Make space for the icon */
}
/* Hide the default browser calendar icon */
.input-with-icon input::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}
.input-with-icon .icon {
    position: absolute;
    right: 14px;
    color: var(--secondary-text);
    pointer-events: none; /* Allows clicks to pass through to the input */
}

/* --- Product Item List --- */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-item {
   border-radius: 16px;
    padding: 10px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}
.product-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.product-name {
    font-size: 1rem;
    font-weight: 800;
}
.btn-delete {
    background-color: var(--red-light-bg);
    color: var(--red-dark-text);
    border: none;
    border-radius: 8px;
    width: 32px !important;
    height: 32px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-delete:hover { background-color: #FECACA; }

.product-details {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-size: 0.85rem;
    color: var(--secondary-text);
    margin-bottom: 8px;
}

/* --- Custom Number Input --- */
.quantity-group { 
    flex-shrink: 0; /* Prevents it from shrinking too much */
} /* Give quantity more space */
.price-group { flex-grow: 1;  }

.number-input, .price-input {
    display: flex;
    align-items: center;
}
.number-input input, .price-input input {
    width: 100% !important;
    text-align: center;
    border: 1px solid var(--border-color);
    background-color: var(--card-background);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.9rem;
    font-family: inherit;
    padding: 10px;
    -moz-appearance: textfield; /* Hide arrows in Firefox */ 
	height: 22px;
}
.number-input input::-webkit-outer-spin-button,
.number-input input::-webkit-inner-spin-button {
  -webkit-appearance: none; /* Hide arrows in Chrome/Safari */
  margin: 0;
}

.stepper-btn {
    width: 20px;
    height: 42px; 
    line-height: 42px;
	text-align: center;
    border: 1px solid var(--border-color);
    background-color: var(--green-light-bg);
    color: var(--green-dark-text);
    font-size: 1.5rem;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s;
}
.stepper-btn.plus { border-radius: 0 10px 10px 0; }
.stepper-btn.minus { border-radius: 10px 0 0 10px; }
.stepper-btn:hover { background-color: #BBF7D0; }
.number-input input {
    border-left: none !important;
    border-right: none !important;
	border-radius: 0 !important;
}

.price-input input {
    border-radius: 10px;
    text-align: right;
    padding-right: 12px; /* Add some padding to the right */
}
.price-input span {
    margin-left: 8px;
    color: var(--secondary-text);
}

.product-total {
    text-align: right;
    font-size: 1.1rem;
}
.product-total strong {
    font-weight: 700;
    margin-left: 8px;
	font-family: Roboto;
}




/* --- Custom Select Dropdown Arrow --- */
.form-group select {
    appearance: none;
    -webkit-appearance: none; 
    background-position: right 0.7rem center;
    background-repeat: no-repeat;
    background-size: 1.2em 1.2em;
    padding-right: 2.5rem;
	width: calc(100%) !important;
}


/* --- Tag-like Buttons --- */
.btn.btn-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-tag i {
    font-size: 0.9em;
}

.btn-green {
    background-color: #D1FAE5;
    color: #065F46;
} 

.btn-green-light {
    background-color: #D1FAE5;
    color: #15803D;
    border: 1px solid #BBF7D0;
    width: 100%;
    justify-content: center;
} 

.btn-blue-light {
    background-color:#D2EDFF;
    color: #0284C7;
    border: 1px solid #BAE6FD;
    width: 100%;
    justify-content: center;
}
.btn-blue-light:hover { background-color: #E0F2FE; }





/* --- Footer Actions --- */
.invoice-actions {
	display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 0 20px 20px 20px; /* Add padding to the wrapper now */
}
.btn {
	 
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
	
flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn i { margin-right: 8px; }

.btn-secondary {
    background-color: #E0E7FF;
    color: #3730A3;
    border-color: #C7D2FE;  
} 

.btn-primary {
    background-color: var(--primary-color);
    color: white;    
	flex-grow: 1.5;
} 
 

 .btn-more-actions {

    flex-grow: 0;
    flex-shrink: 0;
    width: 54px; /* Fixed width for the icon button */
    padding: 16px;
    background-color: #F3F4F6; /* Light gray */
    color: var(--secondary-text);
    border: 1px solid var(--border-color);
}

  
.btn-more-actions {
    flex-grow: 0;
    flex-shrink: 0;
    width: 54px; /* Fixed width for the icon button */
    padding: 16px;
    background-color: #F3F4F6; /* Light gray */
    color: var(--secondary-text);
    border: 1px solid var(--border-color);
} 

.actions-menu {
    position: relative;  
    padding: 16px 16px 32px 16px; 
}

.actions-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}



.actions-menu ul li a {
    display: flex;
    align-items: center;
    padding: 16px 12px;
    text-decoration: none;
    color: var(--primary-text);
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    transition: background-color 0.2s;
}
 
.actions-menu ul li i {
    width: 40px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary-text);
    margin-right: 8px;
}



/* --- Accordion Card Styles --- */
.accordion-card {
    background-color: var(--card-background);
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
	padding-top: 0;
	padding-bottom: 0;
}

.accordion-card-title { font-size: 1.1rem; font-weight: 600; }


.accordion-header i {
    color: var(--secondary-text);
    transition: transform 0.3s ease;
}
.accordion-header.active i {
    transform: rotate(180deg);
}
.accordion-content {  
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
	display: none;
}
.more-link {
    display: block; text-align: center; margin: 8px 0 20px;
    color: var(--primary-color); font-weight: 600; text-decoration: none;
}

/* --- Message Log (inside Accordion) --- */
.message-log {
    list-style: none; padding: 0; display: flex; flex-direction: column; gap: 16px;
    border-top: 1px solid var(--border-color); padding-top: 16px;
}
.message-log li {
    font-size: 0.9rem; color: var(--secondary-text); line-height: 1.5;
    display: flex; align-items: flex-start; gap: 12px;
}
.log-date { display: block; font-weight: 500; color: var(--primary-text); }
.message-log li.success i { color: var(--success-color); }
.message-log li.danger i { color: var(--danger-color); }
.message-log i { margin-top: 4px; }

