* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background-color: #383b3f;
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar img {
    height: 50px;
    width: auto;
}

.navbar-logout {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.navbar-logout:hover {
    background-color: rgba(255, 255, 255, 0.22);
    text-decoration: none;
}

/* Login page layout */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 70px);
    padding: 20px;
}

.login-container {
    background: #ffffff;
    padding: 40px 35px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 380px;
}

.login-container h2 {
    margin-bottom: 24px;
    color: #0d3b8c;
    text-align: center;
    font-size: 22px;
}

.login-container label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #444;
    font-weight: 500;
}

.login-container input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 18px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.login-container input:focus {
    outline: none;
    border-color: #f5a623;
}

.login-container button {
    width: 100%;
    padding: 11px;
    background-color: #f5a623;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-container button:hover {
    background-color: #e0941a;
}

.error-message {
    color: #dc2626;
    font-size: 13px;
    margin-bottom: 14px;
    text-align: center;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .navbar {
        padding: 0 16px;
        height: 60px;
    }

    .navbar img {
        height: 36px;
    }

    .navbar-logout {
        padding: 6px 12px;
        font-size: 13px;
    }

    .login-wrapper {
        padding: 16px;
    }

    .login-container {
        padding: 28px 22px;
    }

    .login-container h2 {
        font-size: 19px;
    }
}

/* base */
/* Shared page layout (non-login pages) */
.page-content {
    padding: 30px 40px;
}

.page-content h2 {
    color: #ffffff;
    margin-bottom: 20px;
}

.page-content h3 {
    color: #0d3b8c;
    margin-top: 24px;
    margin-bottom: 10px;
}

.page-content h4 {
    color: #1565c0;
    margin-top: 16px;
    margin-bottom: 8px;
}

.page-content a {
    color: #0d3b8c;
    text-decoration: none;
    font-weight: 500;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content ul {
    list-style: none;
}

.page-content li {
    background: #ffffff;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.btn {
    display: inline-block;
    padding: 9px 18px;
    background-color: #f5a623;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #e0941a;
    text-decoration: none;
}

/* ============================= */
/* Home page                     */
/* ============================= */
.home-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.home-header h1 {
    color: #ffffff;
    font-size: 26px;
}

.role-badge {
    background-color: #f5a623;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.home-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 26px 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #222;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.card-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.home-card h3 {
    color: #0d3b8c;
    font-size: 17px;
    margin-bottom: 6px;
}

.home-card p {
    font-size: 13px;
    color: #666;
}

/* Home page mobile */
@media (max-width: 480px) {
    .home-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================= */
/* Management dashboard          */
/* ============================= */
.dashboard-welcome {
    color: #ffffff;
    margin-bottom: 14px;
    opacity: 0.9;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 26px;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #0d3b8c;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================= */
/* Task status page              */
/* ============================= */
.task-status-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 24px;
}

.dept-block {
    margin-bottom: 28px;
}

.dept-block:last-child {
    margin-bottom: 0;
}

h3.dept-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #f5a623;
}

.table-wrapper {
    background: #ffffff;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    padding: 4px;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.task-table th {
    background-color: #0d3b8c;
    color: #ffffff;
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.task-table th:first-child {
    border-top-left-radius: 8px;
}

.task-table th:last-child {
    border-top-right-radius: 8px;
}

.task-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.task-table tr:last-child td {
    border-bottom: none;
}

.task-table tr:hover td {
    background-color: #f7f9fc;
}

.task-link {
    color: #0d3b8c;
    font-weight: 600;
}

.muted {
    color: #999;
    font-style: italic;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-pending {
    background-color: #fff3cd;
    color: #92680b;
}

.status-accepted {
    background-color: #d4edda;
    color: #1a6f2f;
}

.status-completed {
    background-color: #d1e7ff;
    color: #0d47a1;
}

.status-reassigned {
    background-color: #e2d9f3;
    color: #5b2a86;
}

.status-overdue {
    background-color: #f8d7da;
    color: #b02a37;
}

.empty-message {
    background: #ffffff;
    color: #666;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.page-footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.28);
    text-decoration: none;
}

@media (max-width: 480px) {
    .task-table {
        font-size: 13px;
    }

    .task-table th,
    .task-table td {
        padding: 10px 12px;
    }

    .page-footer-actions {
        justify-content: stretch;
    }

    .page-footer-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================= */
/* Department list page          */
/* ============================= */

.dept-list-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dept-row {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dept-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.dept-row-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #222;
}

.dept-icon {
    font-size: 20px;
}

/* NEW */
.dept-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.btn-small {
    padding: 7px 14px;
    font-size: 13px;
}

/* ============================= */
/* Mobile Responsive             */
/* ============================= */

@media (max-width: 768px) {

    .dept-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .dept-row-info {
        justify-content: center;
        text-align: center;
    }

    .dept-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .dept-actions .btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

}

/* ============================= */
/* Employee list page             */
/* ============================= */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
}

.search-bar input:focus {
    outline: 2px solid #f5a623;
}

.action-cell {
    white-space: nowrap;
}

.action-link {
    display: inline-block;
    color: #0d3b8c;
    font-size: 13px;
    font-weight: 600;
    margin-right: 12px;
}

.action-link:last-child {
    margin-right: 0;
}

.action-link:hover {
    text-decoration: underline;
}

.action-edit {
    color: #b06a00;
}

.empty-cell {
    text-align: center;
    color: #999;
    padding: 24px;
}

@media (max-width: 480px) {
    .search-bar {
        flex-direction: column;
    }

    .search-bar input,
    .search-bar .btn {
        width: 100%;
        text-align: center;
    }

    .action-cell {
        white-space: normal;
    }

    .action-link {
        display: block;
        margin: 4px 0;
    }
}

/* ============================= */
/* Customer list page             */
/* ============================= */
.page-actions-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.action-delete {
    color: #b02a37;
}


/* ============================= */
/* Styled forms (create task etc)*/
/* ============================= */
.form-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    max-width: 640px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.styled-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    margin-top: 18px;
}

.styled-form label:first-child {
    margin-top: 0;
}

.styled-form input[type="text"],
.styled-form input[type="datetime-local"],
.styled-form textarea,
.styled-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
}

.styled-form input:focus,
.styled-form textarea:focus,
.styled-form select:focus {
    outline: none;
    border-color: #f5a623;
}

.styled-form textarea {
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-col {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 480px) {
    .form-container {
        padding: 22px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Activity list inside table cell */
.task-table .activity-list {
    list-style: none;
    max-width: 260px;
}

.task-table .activity-list li {
    font-size: 12px;
    color: #444;
    padding: 4px 0 4px 10px;
    border-left: 2px solid #e0e4eb;
    margin-bottom: 4px;
}

.task-table .activity-actor {
    font-weight: 600;
    color: #0d3b8c;
}

.task-table .activity-time {
    display: block;
    font-size: 11px;
    color: #999;
}

/* Form section dividers (add employee, etc) */
.form-section-title {
    color: #0d3b8c;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    margin-top: 26px;
    margin-bottom: 4px;
}

.form-section-title:first-child {
    margin-top: 0;
}

/* ============================= */
/* My Tasks (employee) page      */
/* ============================= */
.my-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.task-card-overdue {
    border-left: 4px solid #dc2626;
}

.task-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.btn-secondary-solid {
    background-color: #6b7280;
}

.btn-secondary-solid:hover {
    background-color: #565d69;
}

@media (max-width: 480px) {
    .task-card-actions {
        flex-direction: column;
    }

    .task-card-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================= */
/* Employee profile page          */
/* ============================= */
.profile-info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 26px;
    display: flex;
    gap: 24px;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    margin-bottom: 28px;
}

.profile-avatar {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #0d3b8c;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px 24px;
    flex: 1;
}

.profile-info-grid div {
    font-size: 14px;
    color: #222;
}

.info-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #999;
    margin-bottom: 2px;
}

.section-heading {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 14px;
    margin-top: 8px;
}

@media (max-width: 480px) {
    .profile-info-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-info-grid {
        text-align: left;
    }
}

/* ============================= */
/* Customer detail page            */
/* ============================= */
.stat-card-pending .stat-number {
    color: #b02a37;
}

.page-footer-actions-split {
    justify-content: space-between;
}

@media (max-width: 480px) {
    .page-footer-actions-split {
        flex-direction: column-reverse;
    }

    .page-footer-actions-split .btn {
        width: 100%;
        text-align: center;
    }
}


/* ============================= */
/* Delete confirmation page       */
/* ============================= */
.confirm-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.confirm-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.confirm-text {
    font-size: 16px;
    color: #222;
    margin-bottom: 6px;
}

.confirm-subtext {
    font-size: 13px;
    color: #999;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn-danger {
    background-color: #dc2626;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

@media (max-width: 480px) {
    .confirm-card {
        padding: 28px 22px;
    }

    .confirm-actions {
        flex-direction: column;
    }

    .confirm-actions .btn {
        width: 100%;
        text-align: center;
    }
}

.employee-row-email {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}

/* Task detail page */
.task-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.task-info-full {
    grid-column: 1 / -1;
}


html {
    scroll-behavior: smooth;
}

/* ============================= */
/* Reports page                   */
/* ============================= */
.period-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.btn-active {
    background-color: #f5a623;
    color: #ffffff;
}

@media (max-width: 480px) {
    .period-filter {
        flex-wrap: wrap;
    }

    .period-filter .btn {
        flex: 1;
        text-align: center;
    }
}


.btn-active {
    background-color: #f5a623;
    color: #ffffff;
}


.error-message{
    background:#ffe5e5;
    color:#b30000;
    border:1px solid #ffb3b3;
    padding:12px;
    border-radius:8px;
    margin-bottom:15px;
    font-weight:600;
}

.dept-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#fff;
    padding:18px 22px;
    margin-bottom:15px;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(0,0,0,.1);
}

.dept-row-info{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:18px;
}

.dept-actions{
    display:flex;
    gap:10px;
}

.btn-edit{
    background:#ffc107;
    color:#000;
}

.btn-edit:hover{
    background:#e0a800;
}

.btn-delete{
    background:#dc3545;
    color:#fff;
}

.btn-delete:hover{
    background:#bb2d3b;
}

.status-on_hold {
    background-color: #dbeafe;
    color: #1e40af;
}

.employee-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.employee-header h1{
    margin: 0;
}

.employee-header .btn{
    padding: 10px 20px;
}

.department-row td{
    background: #eef4ff;
    font-weight: bold;
    color: #1e40af;
    font-size: 16px;
    padding: 12px;
    border-top: 2px solid #dbeafe;
}

.profile-card{
    background:#fff;
    border-radius:10px;
    padding:25px;
    margin:25px 0;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.profile-table{
    width:100%;
    border-collapse:collapse;
}

.profile-table th{
    width:220px;
    text-align:left;
    padding:12px;
    background:#f5f7fb;
    font-weight:600;
}

.profile-table td{
    padding:12px;
    border-bottom:1px solid #eee;
}

.priority-hot {
    background: #fde2e2;
    color: #c62828;
}

.priority-warm {
    background: #ffe8cc;
    color: #ef6c00;
}

.priority-cool {
    background: #d8f5d0;
    color: #2e7d32;
}
.btn-sm{
    display:inline-block;
    padding:6px 14px;
    background:#1f5fbf;
    color:#fff;
    border-radius:6px;
    text-decoration:none;
    font-size:13px;
    font-weight:600;
}

.btn-sm:hover{
    background:#174d99;
    color:#fff;
}

/* /* Action Dropdown* */

.action-dropdown{
    width:170px;
    padding:10px 14px;
    border:none;
    border-radius:8px;
    background:#f39c12;
    color:#fff;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.action-dropdown:hover{
    background:#e67e22;
}

.action-dropdown:focus{
    outline:none;
}

.action-dropdown option{
    background:#fff;
    color:#333;
} 

.multi-select{
    width:100%;
    min-height:140px;
    padding:10px;
    border:1px solid #dcdcdc;
    border-radius:8px;
    font-size:15px;
    background:#fff;
}

.multi-select option{
    padding:8px;
}

/* Multiple department checkboxes */

.checkbox-group{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:10px;
}

.checkbox-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 14px;
    background:#f8f9fa;
    border:1px solid #ddd;
    border-radius:8px;
    cursor:pointer;
    transition:0.2s;
}

.checkbox-item:hover{
    background:#eef4ff;
    border-color:#4a90e2;
}

.checkbox-item input[type="checkbox"]{
    width:18px;
    height:18px;
    cursor:pointer;
}

.filter-bar{
    display:flex;
    gap:10px;
    margin-bottom:18px;
    flex-wrap:wrap;
}