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

:root {
    --bg-color: #F9FAFB;       
    --card-bg: #FFFFFF;        
    --text-primary: #111827;   
    --text-secondary: #6B7280; 
    --accent-color: #4F46E5;   
    --accent-hover: #4338CA;   
    --border-color: #E5E7EB;   
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

header{
    position: static;
}
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased; 
    overflow-x: hidden; 
}
.navbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.dashboard-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 5%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.page-header h1 {
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.025em;
}

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}



.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
    line-height: 1;
}

.text-accent {
    color: var(--accent-color);
}

.stat-trend {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: auto;
}

.stat-trend.positive {
    color: #059669; 
    background-color: #D1FAE5;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.table-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    width: 100%;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.search-input {
    padding: 10px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    width: 100%; 
    max-width: 280px; 
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; 
}

.client-table {
    width: 100%;
    min-width: 800px; 
    border-collapse: collapse;
    text-align: left;
}

.client-table th {
    background-color: #F9FAFB;
    padding: 14px 24px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.client-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-primary);
    vertical-align: middle;
}



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

.client-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.avatar-small {
    width: 32px;
    height: 32px;
    background-color: #E0E7FF;
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.Ongoing {
    background-color: #DEF7EC;
    color: #03543F;
}

.status-badge.Completed {
    background-color: #F3F4F6;
    color: #4B5563;
}

.session-badge {
    white-space: nowrap;
}

.session-badge.warning {
    color: #B45309;
    background-color: #FEF3C7;
    padding: 4px 8px;
    border-radius: 12px;
}

.action-link {
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    padding-inline: 1em;
    padding-block: 0.5em;
    border-radius: 10px;
}
.fa-pencil{
    font-size: 1.25em;
    cursor: pointer;
    color: rgb(212, 148, 19);
}
.fa-trash{
    font-size: 1.25em;
    cursor: pointer;

    color: rgb(237, 55, 9);;
}
.dont-delete{
    border:none;
    background:none;
}
.fa-times{
    color:red;
    cursor:pointer;
    font-size: 1.25em;
}
.fa-check{
    color:rgb(78, 192, 78);
    background:none;
    padding:0;
    font-size: 1.25em;
}



.modal-overlay {
    width: 100%;
    height: 100%;
    display: flex; 
    align-items: center;
    justify-content: center;
}

.modal-box {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 80%; 
    height:100%;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background-color: #F9FAFB; 
    border-radius: 0 0 16px 16px;
}
form{
    width: 100%;
}

.modal-body {
    width: 100%;
    padding: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px;
}


.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--text-primary);
    background-color: #FFFFFF;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Fixes textarea resizing */
.form-control[rows] {
    resize: vertical;
    min-height: 80px;
}

.full-width {
    grid-column: 1 / -1; /* Spans across both columns */
}

.mt-4 {
    margin-top: 20px;
}
.bt-4 {
    margin-bottom: 10px;
}

/* Secondary Button styling (Cancel button) */
.btn-secondary {
    background-color: #FFFFFF;
    color: var(--text-primary);
    border: 1px solid #D1D5DB;
}

.btn-secondary:hover {
    background-color: #F3F4F6;
}

input:disabled{
    background-color: #E5E7EB;
    color: grey;
}

/* Responsive adjustments for phones */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr; /* Stacks to 1 column on small screens */
    }
    .modal-overlay {
        top:50%;
        height: 100%;
        border-radius: 0;
        box-sizing: border-box;
    }
    .modal-box{
        max-width: 90%;

    }
    form{
        margin:0;
    }
   
    .modal-footer {
        border-radius: 0;
    }
}

.delete-modal{
    position: absolute;
    top: 0;
    left:0;
    height: 100vh;
    width: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.273);
}
.delete-modal-card{
    background-color: white;
    border-radius: 5px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    padding:1em;
}
.client-btn-groups{
    margin-top: 1em;
    display: flex;
    gap:1em;
}
.client-btn-groups button{
    width:100%;
    border-radius: 5px;
    margin: 0;
    padding-block: 0.5em;
    cursor: pointer;
}
.alert-danger{
    background-color: red;
    color:white;
    border: none;
    text-align: center;
}

.alert-success{
    background-color: rgb(255, 255, 255);
    color: black;
    border: 1px solid rgb(154, 154, 154);
}
.alert-danger:hover{
    background-color: rgb(255, 60, 60);
}
.alert-success:hover{
    background-color:rgb(238, 237, 237) ;
}
