/* --- Google Fonts (Poppins) --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- CSS Variables (වර්ණ සහ ප්‍රමාණ සඳහා) --- */
:root {
    /* Login Form Colors */
    --login-bg: #FFFFFF;
    --login-primary-green: #008374;
    --login-gradient-start: #008374;
    --login-gradient-end: #00C6A7;
    --login-text-light: #8A94A6;
    --login-border-color: #DDE2E8;

    /* General Colors */
    --background-color: #F5F7FA;
    --text-color-dark: #343A40;
    --white-color: #FFFFFF;
    --border-color: #EAECEF;

    /* General Sizing */
    --border-radius: 8px;
}

/* --- General Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
}


/* --- Login Page Styles --- */
.login-page-body {
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-form-container {
    background-color: var(--login-bg);
    padding: 50px 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-logo {
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 180px;
}

.login-form .form-group {
    margin-bottom: 25px;
    text-align: left;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color-dark);
}

.login-form .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--login-border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    color: var(--text-color-dark);
}
.login-form .form-group input::placeholder{
    color: var(--login-text-light);
}

.btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--border-radius);
    background: linear-gradient(90deg, var(--login-gradient-start) 0%, var(--login-gradient-end) 100%);
    color: var(--white-color);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-login:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 131, 116, 0.3);
}

.error-message {
    color: #D8000C; 
    background-color: #FFD2D2;
    padding: 10px; 
    border-radius: var(--border-radius); 
    margin-bottom: 20px;
}
/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

/* --- CSS Variables --- */
:root {
    --primary-green: #004D40;
    --secondary-green: #00796B;
    --accent-green: #00BFA5;
    --light-green-bg: #E0F2F1;
    --light-grey-bg: #F5F7FA;
    --border-color: #E0E0E0;
    --text-dark: #212121;
    --text-light: #757575;
    --white: #FFFFFF;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

/* --- General Reset & Body --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-secondary); background-color: var(--light-grey-bg); color: var(--text-dark); }

/* --- Dashboard Layout --- */
.dashboard-wrapper { display: flex; }
.dashboard-sidebar { width: 90px; background-color: var(--primary-green); min-height: 100vh; position: fixed; display: flex; flex-direction: column; align-items: center; padding-top: 20px; }
.dashboard-main { margin-left: 90px; width: calc(100% - 90px); }
.dashboard-header { background: var(--white); display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; border-bottom: 1px solid var(--border-color); }
.dashboard-content { padding: 30px; }

/* --- Sidebar Styles --- */
.sidebar-menu .menu-item { color: var(--light-green-bg); font-size: 1.5rem; padding: 20px; text-decoration: none; display: block; width: 100%; text-align: center; transition: all 0.3s ease; }
.sidebar-menu .menu-item.active, .sidebar-menu .menu-item:hover { background-color: var(--secondary-green); color: var(--white); }

/* --- Header Styles --- */
.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dashboard-logo-img {
    height: 40px; /* ලාංඡනයේ උස (අවශ්‍ය නම් වෙනස් කරන්න) */
    width: auto;
}
.header-logo span { 
    font-family: var(--font-primary);
    font-weight: 400; 
    color: var(--text-light);
    font-size: 1.5rem;
}


.header-logo { font-family: var(--font-primary); font-size: 1.5rem; font-weight: 700; color: var(--text-dark); }
.header-logo span { font-weight: 400; color: var(--text-light); }
.header-user-profile { display: flex; align-items: center; gap: 20px; }
.header-user-profile img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.header-user-profile a { color: var(--text-light); font-size: 1.2rem; text-decoration: none; }

/* --- Form Styles --- */
.form-container-card { background-color: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.form-title { font-family: var(--font-primary); font-size: 1.4rem; font-weight: 600; color: var(--primary-green); margin-bottom: 30px; display: flex; align-items: center; gap: 10px; }
.add-job-form { display: flex; flex-direction: column; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.form-group { display: flex; flex-direction: column; }
.form-group label, .price-row label { font-size: 0.9rem; color: var(--text-light); margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 1rem; font-family: var(--font-secondary); }
.form-group textarea { resize: vertical; }

/* Price Details */
.price-details { border: 1px solid var(--border-color); border-radius: 5px; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid var(--border-color); }
.price-row:last-child { border-bottom: none; }
.price-row.total { background-color: var(--light-green-bg); }
.price-row.total label { font-weight: 700; }
.price-row input { border: none; background: transparent; text-align: right; font-size: 1rem; width: 80%; }
.price-row input[readonly] { color: var(--text-dark); font-weight: 500; }

/* Checkbox Group */
.checkbox-group { display: flex; gap: 20px; align-items: center; }
.checkbox-group label { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--text-dark); }
.checkbox-group input { width: auto; }

/* Form Actions */
.form-actions { display: flex; justify-content: flex-end; gap: 15px; margin-top: 20px; }
.btn { padding: 12px 30px; border: none; border-radius: 5px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.btn-reset { background: none; border: 1px solid var(--secondary-green); color: var(--secondary-green); }
.btn-save { background-color: var(--secondary-green); color: var(--white); }
.btn-invoice { background-color: var(--accent-green); color: var(--white); }
.btn-send-invoice { background-color: lightgray; color: var(--white); }

.radio-group-horizontal {
    display: flex;
    
    align-items: left;
}
.radio-group-horizontal label {
    display: flex;
    gap: 5px;
    font-weight: normal;
}

.customer-search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-green);
    border-radius: 20px;
    padding: 10px 40px 10px 20px;
    color: var(--secondary-green);
    font-size: 1rem;

}
.customer-search-container label {
    font-weight: 500;
    white-space: nowrap;
}


/*
================================
ALL JOBS PAGE STYLES
(සියලුම Jobs පෙන්වන පිටුව සඳහා)
================================
*/

/* පිටුවේ ප්‍රධාන කොටසට gradient පසුබිමක් ලබා දීම */
.all-jobs-page .dashboard-content {
    background: linear-gradient(135deg, #00796B 0%, #004D40 100%);
    padding: 30px;
    border-radius: 8px; /* Optional: adds rounded corners */
}

/* පිටුවේ ඉහල කොටස (Header) */
.jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* පිටුවේ මාතෘකාව ("ALL JOBS") */
.jobs-header .page-title {
    color: var(--primary-green);
    margin-bottom: 0;
}

/* Search bar එක සඳහා */
.search-container {
    position: relative;
}

.search-container input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-color: var(--accent-green);
    border-radius: 20px;
    padding: 10px 40px 10px 20px;
    color: var(--secondary-green);
    width: 300px;
    font-size: 1rem;
}

.search-container input::placeholder {
    color: var(--secondary-green);
}

.search-container .fa-magnifying-glass {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-green);
}

/* Table එක සඳහා */
.table-container {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.jobs-table th,
.jobs-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.jobs-table th {
    background-color: #F8F9FA;
    font-weight: 600;
}

.jobs-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.jobs-table tbody tr:hover {
    background-color: var(--light-green-bg);
}

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

/* Job Status එක පෙන්වන badge එක සඳහා */
.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-paid, .status-done {
    background-color: #28a745;
}

.status-unpaid, .status-pending {
    background-color: #ffc107;
    color: var(--text-dark);
}

.status-cancelled, .status-non-open {
    background-color: #6c757d;
}
.status-non {
    background-color: lightgray;
}

.status-active {
    background-color: #17a2b8;
}

/*
================================
JOB DETAILS PAGE STYLES
(Job Details පිටුව සඳහා පමණි)
================================
*/

/* පිටුවේ ප්‍රධාන Grid ව්‍යුහය */
.details-grid {
    display: grid;
    /* තිරයේ ප්‍රමාණය අනුව columns සකස් වීම */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

/* විස්තර පෙන්වන කාඩ්පත් */
.details-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* කාඩ්පත් වල මාතෘකාව */
.card-title {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.2rem;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Form එකේ ඇති input fields */
.details-form .form-group {
    margin-bottom: 15px;
}

/* Radio buttons සඳහා */
.details-form .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* කොටස් වෙන් කරන ඉර */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 25px 0;
}

/* Services පෙන්වන table එක */
.services-table {
    width: 100%;
    border-collapse: collapse;
}

.services-table th, 
.services-table td {
    padding: 12px 5px;
    border-bottom: 1px solid var(--border-color);
}

.services-table th {
    text-align: left;
    color: var(--text-light);
}

.services-table td:nth-child(2) {
    text-align: right;
    font-weight: 500;
}

.services-table td:nth-child(3) {
    text-align: right;
}

/* Service එකක් මකා දැමීමේ බොත්තම */
.btn-delete-item {
    background: none;
    border: none;
    color: var(--danger-red, #D32F2F); /* Fallback color */
    cursor: pointer;
    font-size: 1.1rem;
}

/* Invoice එකේ මුළු මුදල */
.invoice-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 20px;
}

/* ප්‍රධාන ක්‍රියාකාරී බොත්තම් (UPDATE, DELETE) */
.main-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-delete {
    background-color: var(--danger-red, #D32F2F);
    color: var(--white);
}

/* සාර්ථක/අසාර්ථක පණිවිඩ සඳහා */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid transparent;
}

.message.success {
    background-color: var(--light-green-bg, #E0F2F1);
    color: var(--primary-green, #004D40);
    border-color: var(--secondary-green, #00796B);
}

.message.error {
    background-color: #FFEBEE;
    color: var(--danger-red, #D32F2F);
    border-color: var(--danger-red, #D32F2F);
}

/*
================================
MODAL STYLES (for Pop-ups)
(යාවත්කාලීන කරන ලදී)
================================
*/
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* Darker overlay */
    padding-top: 60px; /* Add some padding at the top */
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: modalopen 0.4s;
    text-align: left; /* Center align text */
}

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

.close-button {
    color: #aaa;
    position: absolute; /* Position relative to modal-content */
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-family: var(--font-primary);
    font-size: 1.4rem;
}

.modal-content p {
    margin-bottom: 25px;
    line-height: 1.6;
    color: var(--text-light);
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: center; /* Center buttons */
    gap: 15px;
}

.modal-actions .btn {
    padding: 10px 25px;
    font-size: 1rem;
}
.modal-footer {
    padding: 10px;
    text-align: center;

}


/* Services Table */
.services-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px; /* Add space below the table */
}
.services-table th, 
.services-table td {
    padding: 12px 5px;
    border-bottom: 1px solid var(--border-color);
}
.services-table th {
    text-align: left;
    color: var(--text-light);
    font-weight: 600;
}
.services-table td:nth-child(2) {
    text-align: right;
    font-weight: 500;
}
.services-table td:nth-child(3) {
    text-align: right;
    width: 5%;
}
.btn-delete-item {
    background: none;
    border: none;
    color: var(--danger-red, #D32F2F);
    cursor: pointer;
    font-size: 1.1rem;
}


/* Payment Details Section (Subtotal, Advance, Balance) */
.payment-details {
    margin-left: auto; /* Push to the right */
    width: 100%;
    max-width: 350px; /* Set a max-width */
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    font-size: 1rem;
}

.payment-row label {
    font-weight: 500;
    color: var(--text-light);
}

.payment-row input[type="number"] {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 8px;
    text-align: right;
    width: 130px; /* Adjust width */
    font-size: 1rem;
}

.payment-row.balance {
    font-size: 1.3rem;
    border-top: 2px solid var(--text-dark);
    margin-top: 10px;
    padding-top: 10px;
}
.payment-row.balance strong {
    color: var(--primary-green);
}


/* Job Meta Info (Created by) */
.job-meta {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}


/* Close Invoice & Paid Badge Section */
.close-invoice-section {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-green-bg);
    border-radius: 5px;
    text-align: center;
}
.close-invoice-section p {
    margin-bottom: 15px;
    color: var(--primary-green);
}
.close-invoice-section .btn-save {
    background-color: var(--secondary-green);
}

.invoice-paid-badge {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--secondary-green);
    color: var(--white);
    text-align: center;
    font-weight: 600;
    border-radius: 5px;
}
.invoice-paid-badge i {
    margin-right: 8px;
}

/* Services Table */
.services-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px; /* Add space below the table */
}
.services-table th, 
.services-table td {
    padding: 12px 5px;
    border-bottom: 1px solid var(--border-color);
}
.services-table th {
    text-align: left;
    color: var(--text-light);
    font-weight: 600;
}
.services-table td:nth-child(2) {
    text-align: right;
    font-weight: 500;
}
.services-table td:nth-child(3) {
    text-align: right;
    width: 5%;
}
.btn-delete-item {
    background: none;
    border: none;
    color: var(--danger-red, #D32F2F);
    cursor: pointer;
    font-size: 1.1rem;
}


/* Payment Details Section (Subtotal, Advance, Balance) */
.payment-details {
    margin-left: auto; /* Push to the right */
    width: 100%;
    max-width: 350px; /* Set a max-width */
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    font-size: 1rem;
}

.payment-row label {
    font-weight: 500;
    color: var(--text-light);
}

.payment-row input[type="number"] {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 8px;
    text-align: right;
    width: 130px; /* Adjust width */
    font-size: 1rem;
}

.payment-row.balance {
    font-size: 1.3rem;
    border-top: 2px solid var(--text-dark);
    margin-top: 10px;
    padding-top: 10px;
}
.payment-row.balance strong {
    color: var(--primary-green);
}


/* Job Meta Info (Created by) */
.job-meta {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}


/* Close Invoice & Paid Badge Section */
.close-invoice-section {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-green-bg);
    border-radius: 5px;
    text-align: center;
}
.close-invoice-section p {
    margin-bottom: 15px;
    color: var(--primary-green);
}
.close-invoice-section .btn-save {
    background-color: var(--secondary-green);
}

.invoice-paid-badge {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--secondary-green);
    color: var(--white);
    text-align: center;
    font-weight: 600;
    border-radius: 5px;
}
.invoice-paid-badge i {
    margin-right: 8px;
}



/*
================================
MANAGE SERVICES PAGE STYLES (UPDATED)
(යාවත්කාලීන කරන ලද)
================================
*/
.all-services-page .dashboard-content {
    background-color: transparent;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 15px; /* "SERVICES" සහ "ADD NEW" අතර පරතරයක් ලබා දීම */
    margin-bottom: 20px;
}

.page-header .page-title {
    /*font-size: 1.5rem;
    font-weight: 700;*/
    color: var(--primary-green);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-add-new {
    background-color: var(--secondary-green);
    color: var(--white);
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.list-container-card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.service-list {
    list-style-type: none;
    padding: 0;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    border-bottom: 1px solid var(--border-color);
}
.service-item-empty {
    padding: 20px 10px;
    color: var(--text-light);
}

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

.service-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.service-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-green);
    padding-top: 2px;
}

.service-text-content {
    display: flex;
    flex-direction: column;
}

.service-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.service-description-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.desc-tag {
    background-color: #e0e0e0;
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}
/* Different colors for tags */
.desc-tag:nth-child(3n+1) { background-color: #E0F2F1; color: #00796B; }
.desc-tag:nth-child(3n+2) { background-color: #FFF3E0; color: #F57C00; }
.desc-tag:nth-child(3n+3) { background-color: #E3F2FD; color: #1976D2; }


.service-price-and-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.service-price {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    min-width: 120px;
    text-align: right;
}

.service-actions {
    display: flex;
    gap: 10px;
}

.service-actions .btn-action {
    padding: 6px 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--white);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.service-actions .btn-edit {
    background-color: #00BFA5; /* Accent color from design */
}

.service-actions .btn-delete {
    background-color: #EF5350; /* A soft red */
}

.delete-form {
    display: inline;
}


/*
================================
MANAGE USERS PAGE STYLES (UPDATED)
================================
*/

/* Data Table සඳහා ප්‍රධාන මෝස්තර */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-radius: 8px;
    overflow: hidden; /* Ensures border-radius is applied to corners */
}

/* Table Header (thead) සඳහා මෝස්තර */
.data-table thead th {
    background-color: #F8F9FA;
    padding: 15px;
    text-align: left;
    /* --- වෙනස් කිරීම 1: font-weight එක වැඩි කරන ලදී --- */
    font-weight: 700; /* Bold */
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--border-color);
}

/* Table Body (tbody) හි ඇති rows සඳහා */
.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: var(--light-green-bg);
}

.data-table tbody tr:nth-of-type(even) {
    background-color: #FDFDFD;
}
.data-table tbody tr:nth-of-type(even):hover {
     background-color: var(--light-green-bg);
}


/* Table cells (td) සඳහා මෝස්තර */
.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    vertical-align: middle;
}

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


/* Status Badge (Active/Suspended) */
.data-table .status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    white-space: nowrap;
}
.data-table .status-badge.status-active {
    background-color: var(--secondary-green);
}
.data-table .status-badge.status-suspended {
    background-color: var(--text-light);
}

/* Action Buttons (Edit, Suspend) */
.data-table .action-buttons {
    text-align: right;
    display: flex;
    gap: 10px;
    /*justify-content: flex-end;*/
    /* --- වෙනස් කිරීම 2: Icons සිරස් අතට align කරන ලදී --- */
    align-items: center;
}
.data-table .btn-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem; /* Icon size */
    padding: 8px;
    border-radius: 5px;
    line-height: 1;
    transition: color 0.2s ease;
}
.data-table .btn-action.btn-edit { color: var(--secondary-green); }
.data-table .btn-action.btn-suspend { color: #f57c00; }
.data-table .btn-action.btn-activate { color: #28a745; }
.data-table .btn-action:hover {
    color: var(--primary-green);
}


/* --- වෙනස් කිරීම 3: Form එක align කිරීම සඳහා --- */
.inline-form {
    margin: 0;
    padding: 0;
    line-height එක 0 කිරීමෙන් අනවශ්‍ය ඉඩ ඉවත් වේ */
    line-height: 0; 
}

/* For grouping page title and action buttons together */
.page-title-group {
    display: flex;
    align-items: center;
    gap: 20px; /* මාතෘකාව සහ බොත්තම අතර පරතරයක් සෑදීමට */
}

/*
================================
PROFILE PAGE STYLES
(පැතිකඩ පිටුව සඳහා)
================================
*/
.profile-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: flex-start;
}

.profile-pic-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    padding-top: 40px;
}
.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}
.profile-role {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.file-upload-input {
    display: none;
}
.file-upload-label {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-green);

    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    transition: background-color 0.3s ease;
}
.file-upload-label:hover {
    background-color: var(--primary-green);
    color: white;
}


.profile-forms {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.details-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-title {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.2rem;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}


.form-actions-right {
    text-align: right;
    margin-top: 20px;
}
.btn-save {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    background-color: var(--secondary-green);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
}

/* My Information Section */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* columns දෙකක් සඳහා */
    gap: 25px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.info-item span {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
    word-break: break-all;
}


/* Responsive adjustments for profile page */
@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .info-grid {
        grid-template-columns: 1fr; /* කුඩා තිර සඳහා column එකක් */
    }
}


/*
================================
LOGIN ACTIVITY CALENDAR STYLES
(Login ක්‍රියාකාරකම් දින දර්ශනය සඳහා)
================================
*/
#login-calendar {
    margin-top: 15px;
}

/* FullCalendar library එක සඳහා වන මෝස්තර */
.fc {
    font-family: var(--font-secondary);
}
.fc .fc-toolbar-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}
.fc .fc-button-primary {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
    text-transform: capitalize;
    font-weight: 500;
}
.fc .fc-button-primary:hover {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}
.fc .fc-button-primary:focus {
    box-shadow: none;
}

/* දින දර්ශනයේ ඇති events සඳහා */
.fc-event {
    border: none !important;
    font-weight: 500;
    cursor: pointer;
}
.fc-daygrid-event {
    padding: 3px 5px;
    border-radius: 4px;
}

/*
================================
REPORTS PAGE STYLES

================================
*/
.reports-page .page-title {
    color: var(--primary-green);
    margin-bottom: 25px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.kpi-card h4 {
    margin-top: 0;
    font-size: 1rem;
    color: #555;
}

.kpi-card p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-green);
    margin-bottom: 0;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.report-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.report-card h3 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

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

.data-table th,
.data-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    font-weight: bold;
    background-color: #f9f9f9;
}

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

/* Style for the new date filter form on reports page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}
.page-header .page-title {
    margin-bottom: 0;
}
.date-filter-form form {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    color: var(--primary-green);
    padding: 10px;
    border-radius: 8px;
}
.date-filter-form label {
    font-weight: bold;
}
.date-filter-form input[type="date"] {
    padding: 8px;
    border: 1px solid var(--accent-green);
    color: var(--primary-green);
    border-radius: 4px;

}
.btn-filter {
    padding: 9px 15px;
    background-color:var(--primary-green);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.btn-filter:hover {
    background-color: var(--accent-green);
}

/* Sidebar එකේ පහළින්ම ඇති ලින්ක් එක සඳහා වන styles */
.sidebar-footer-link {
    position: absolute; /* Sidebar එකට සාපේක්ෂව ස්ථානගත කිරීම */
    bottom: 20px;       /* පහළ සිට 20px ඉහළින් */
    left: 50%;          /* වම් පසින් 50%ක් දුරින් */
    transform: translateX(-50%); /* Icon එක හරියටම මැදට ගෙන ඒමට */
    
    font-size: 1.4rem; /* Icon එකේ ප්‍රමාණය */
    color: var(--light-green-bg); /* Icon එකේ වර්ණය */
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Hover Effect එක ඉවත් කර, click කළ හැකි බව පෙන්වීමට cursor එක පමණක් වෙනස් කිරීම */
.sidebar-footer-link:hover {
    color: var(--accent-green); /* ඔබට අවශ්‍ය නම් hover වර්ණය වෙනස් කළ හැක */
    cursor: pointer;
}



/* Style for the welcome message in the header */
.welcome-message {
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-right: 15px; /* පින්තූරය සහ පණිවිඩය අතර පරතරයක් සෑදීමට */
    white-space: nowrap; /* පණිවිඩය එකම පේළියේ තබා ගැනීමට */
}

.welcome-message strong {
    font-weight: 600; /* නම තද පැහැයෙන් පෙන්වීමට */
    color: var(--primary-color);
}

/* header-user-profile එකේ අංග නිවැරදිව align කිරීමට */
.header-user-profile {
    display: flex;
    align-items: center;
}