/* ========================================

   MODERN UNIFIED STYLESHEET

   Background: #912C7C

   ======================================== */



:root {

    --primary: #4CAF50;

    --primary-dark: #45a049;

    --secondary: #757575;

    --danger: #f44336;

    --warning: #ff9800;

    --success: #4CAF50;

    --info: #2196F3;

    --light-bg: #912C7C;

    --body-bg: #912C7C;

    --card-bg: #ffffff;

    --border: #912c7c;

    --text-dark: #333333;

    --text-light: #666666;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);

    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);

    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

    --radius: 8px;

    --radius-lg: 12px;

}

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



html, body {

    width: 100%;

    height: 100%;

}



body {

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    background: var(--light-bg);

    color: black;

    line-height: 1.6;

    font-size: 16px;

}



img {

    max-width: 100%;

    height: auto;

    display: block;

}



/* ========================================

   PAGE CONTAINER & LAYOUT

   ======================================== */



.page-container {

    display: flex;

    flex-direction: column;

    min-height: 100vh;

    width: 100%;

}



/* ========================================

   HEADER

   ======================================== */



.main-header {

    background: var(--body-bg);

    border-bottom: 1px solid var(--border);

    box-shadow: var(--shadow-sm);

    padding: 1rem 1.5rem;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 1rem;

    flex-wrap: wrap;

    position: sticky;

    top: 0;

    z-index: 100;

}



.header-brand {

    display: flex;

    align-items: center;

    gap: 1rem;

    flex: 1;

    min-width: 200px;

}



.header-logo {

    max-height: 80px;

    width: auto;

    max-width: 250px;

    object-fit: contain;

}



.header-title {

    font-size: 1.5rem;

    font-weight: 700;

    color: white;

    margin: 0;

}



.header-user {

    display: flex;

    align-items: center;

    gap: 1rem;

    margin-left: auto;

}



.user-info {

    font-size: 0.95rem;

    color: white;

}



.user-info strong {

    color: black;

}



/* Mobile Header */

@media (max-width: 768px) {

    .main-header {

        flex-direction: column;

        align-items: center;

        padding: 1rem;

        text-align: center;

        position: static;

    }



    .header-brand {

        width: 100%;

        flex-direction: column;

        align-items: center;

    }



    .header-logo {

        max-height: 90px;

        width: auto;

        max-width: 180px;

    }



    .header-title {

        font-size: 1.3rem;

    }



    .header-user {

        width: 100%;

        margin-left: 0;

        flex-direction: column;

        align-items: center;

        text-align: center;

    }



    .user-info {

        font-size: 0.9rem;

    }

}



/* ========================================

   NAVIGATION MENU

   ======================================== */



.main-nav {

    background: var(--card-bg);

    border-bottom: 2px solid var(--primary);

    padding: 0 1.5rem;

    display: flex;

    flex-wrap: wrap;

    gap: 0;

    margin-bottom: 1rem;

    overflow: visible;

    position: sticky;

    top: 80px;

    z-index: 99;

}



.nav-item {

    padding: 0.6rem 1.5rem;

    border: none;

    background: transparent;

    cursor: pointer;

    font-size: 0.95rem;

    font-weight: 500;

    color: var(--text-light);

    white-space: nowrap;

    border-bottom: 3px solid transparent;

    transition: all 0.3s ease;

    flex: 0 1 auto;

    border-radius: 8px 8px 0 0;

    margin-right: 0.25rem;

}



.nav-item:not([style*="color"]):hover {

    color: var(--primary);

    background: #912c7c;

}



.nav-item:not([style*="color"]).active {

    color: white !important;

    background: #912c7c;

    border-bottom-color: transparent;

}



.nav-item a {

    text-decoration: none;

    color: inherit;

    display: block;

}



/* Logout button styling */

.nav-item[style*="color: var(--danger)"] {

    background: var(--danger);

    color: white !important;

    border-radius: 8px 8px 0 0;

    margin-left: auto;

}



.nav-item[style*="color: var(--danger)"]:hover {

    background: #d32f2f;

    color: white;

}



@media (max-width: 768px) {

    .main-nav {

        padding: 0 1rem;

        margin-bottom: 0;

        flex-wrap: wrap;

        position: static;

    }



    .nav-item {

        padding: 0.5rem 1rem;

        font-size: 0.9rem;

        flex: 1 1 auto;

        min-width: 120px;

        text-align: center;

        border-bottom: 2px solid transparent;

        border-right: 1px solid var(--border);

        border-radius: 8px 8px 0 0;

        margin-right: 0;

    }



    .nav-item:last-child {

        border-right: none;

    }



    .nav-item:not([style*="color"]).active {

        background: var(--primary);

        color: white;

    }

}



@media (max-width: 480px) {

    .main-nav {

        padding: 0;

    }



    .nav-item {

        padding: 0.5rem 0.8rem;

        font-size: 0.85rem;

        flex: 1 1 50%;

        border-right: 1px solid var(--border);

        border-bottom: 1px solid var(--border);

        border-radius: 8px 8px 0 0;

        margin-right: 0;

    }



    .nav-item:nth-child(odd) {

        border-right: 1px solid var(--border);

    }



    .nav-item:nth-child(even) {

        border-right: none;

    }



    .nav-item:not([style*="color"]).active {

        background: var(--primary);

        color: white;

    }

}



/* ========================================

   MAIN CONTENT

   ======================================== */



.main-content {

    flex: 1;

    padding: 2rem 1.5rem;

    max-width: 1200px;

    margin: 0 auto;

    width: 100%;

}



@media (max-width: 768px) {

    .main-content {

        padding: 1.5rem 1rem;

    }

}



/* Responsive Grid for Lists and Details */

.main-content > div[style*="display: grid"] {

    display: grid !important;

    grid-template-columns: 300px 1fr;

    gap: 2rem;

}



@media (max-width: 1024px) {

    .main-content > div[style*="display: grid"] {

        grid-template-columns: 250px 1fr;

        gap: 1.5rem;

    }

}



@media (max-width: 768px) {

    .main-content > div[style*="display: grid"] {

        grid-template-columns: 1fr;

        gap: 1.5rem;

    }

}



/* ========================================

   FOOTER

   ======================================== */



.main-footer {

    background: var(--card-bg);

    border-top: 1px solid var(--border);

    padding: 1.5rem 1.5rem;

    text-align: center;

    color: var(--text-light);

    font-size: 0.9rem;

    margin-top: auto;

}



/* ========================================

   BUTTONS

   ======================================== */



.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 0.75rem 1.5rem;

    font-size: 0.95rem;

    font-weight: 600;

    border: none;

    border-radius: var(--radius);

    cursor: pointer;

    transition: all 0.3s ease;

    text-decoration: none;

    gap: 0.5rem;

    white-space: nowrap;

    min-height: 44px;

}



.btn:hover {

    transform: translateY(-2px);

    box-shadow: var(--shadow-md);

}



.btn-primary {

    background: var(--primary);

    color: white;

}



.btn-primary:hover {

    background: var(--primary-dark);

}



.btn-secondary {

    background: var(--secondary);

    color: white;

}



.btn-secondary:hover {

    background: #616161;

}



.btn-danger {

    background: var(--danger);

    color: white;

}



.btn-danger:hover {

    background: #d32f2f;

}



.btn-success {

    background: var(--success);

    color: white;

}



.btn-info {

    background: var(--info);

    color: white;

}



.btn-warning {

    background: var(--warning);

    color: white;

}



.btn-outline {

    background: transparent;

    color: var(--primary);

    border: 2px solid var(--primary);

}



.btn-outline:hover {

    background: rgba(76, 175, 80, 0.1);

}



.btn-sm {

    padding: 0.5rem 1rem;

    font-size: 0.9rem;

    min-height: 36px;

}



.btn-lg {

    padding: 1rem 2rem;

    font-size: 1rem;

    min-height: 48px;

}



@media (max-width: 768px) {

    .btn {

        padding: 0.65rem 1.2rem;

        font-size: 0.9rem;

        min-height: 40px;

    }



    .btn-sm {

        padding: 0.5rem 0.8rem;

        font-size: 0.85rem;

    }

}



/* ========================================

   FORMS

   ======================================== */



.form-group {

    margin-bottom: 1.5rem;

}



.form-group label {

    display: block;

    margin-bottom: 0.5rem;

    font-weight: 600;

    color: var(--text-dark);

    font-size: 0.95rem;

}



.form-group input,

.form-group select,

.form-group textarea {

    width: 100%;

    padding: 0.75rem 1rem;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    font-size: 0.95rem;

    font-family: inherit;

    transition: all 0.3s ease;

    background: var(--card-bg);

}



.form-group input:focus,

.form-group select:focus,

.form-group textarea:focus {

    outline: none;

    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);

}



.form-group textarea {

    min-height: 120px;

    resize: vertical;

}



.form-group.inline-group {

    display: flex;

    gap: 1rem;

    align-items: flex-end;

}



.form-group.inline-group label {

    margin-bottom: 0;

}



.form-group.inline-group input {

    flex: 1;

}



.required::after {

    content: " *";

    color: var(--danger);

}



.form-row {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: 1.5rem;

}



@media (max-width: 768px) {

    .form-row {

        grid-template-columns: 1fr;

    }



    .form-group.inline-group {

        flex-direction: column;

        align-items: stretch;

    }



    .form-group.inline-group label {

        margin-bottom: 0.5rem;

    }



    .form-group input,

    .form-group select,

    .form-group textarea {

        padding: 0.7rem 0.9rem;

        font-size: 0.9rem;

    }

}



/* ========================================

   CARDS & CONTAINERS

   ======================================== */



.card {

    background: var(--card-bg);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    padding: 1.5rem;

    box-shadow: var(--shadow-sm);

    transition: all 0.3s ease;

}



.card:hover {

    box-shadow: var(--shadow-md);

}



.card-header {

    border-bottom: 1px solid var(--border);

    margin: -1.5rem -1.5rem 1.5rem -1.5rem;

    padding: 1.5rem 1.5rem 1rem 1.5rem;

}



.card-title {

    font-size: 1.3rem;

    font-weight: 700;

    color: var(--text-dark);

    margin: 0;

}



.card-body {

    padding: 1.5rem 0;

}



.card-footer {

    border-top: 1px solid var(--border);

    margin: 1.5rem -1.5rem -1.5rem -1.5rem;

    padding: 1rem 1.5rem;

    display: flex;

    gap: 1rem;

    justify-content: flex-end;

    flex-wrap: wrap;

}



@media (max-width: 768px) {

    .card {

        padding: 1.2rem;

    }



    .card-header {

        margin: -1.2rem -1.2rem 1.2rem -1.2rem;

        padding: 1.2rem 1.2rem 0.8rem 1.2rem;

    }



    .card-title {

        font-size: 1.1rem;

    }



    .card-footer {

        margin: 1.2rem -1.2rem -1.2rem -1.2rem;

        padding: 0.8rem 1.2rem;

        flex-direction: column;

        justify-content: stretch;

    }



    .card-footer .btn {

        width: 100%;

    }

}



/* ========================================

   TABLES

   ======================================== */



.table {

    width: 100%;

    border-collapse: collapse;

    background: var(--card-bg);

    border-radius: var(--radius);

    overflow: hidden;

    box-shadow: var(--shadow-sm);

}



.table thead {

    background: var(--light-bg);

    border-bottom: 2px solid var(--border);

}



.table th {

    padding: 1rem 1.5rem;

    text-align: left;

    font-weight: 600;

    color: white;

    font-size: 0.95rem;

}



.table td {

    padding: 1rem 1.5rem;

    border-bottom: 1px solid var(--border);

}



.table tbody tr:hover {

    background: rgba(76, 175, 80, 0.05);

}



.table tbody tr:last-child td {

    border-bottom: none;

}



.table-responsive {

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;

}



@media (max-width: 768px) {

    .table {

        font-size: 0.9rem;

    }



    .table th,

    .table td {

        padding: 0.75rem 1rem;

    }

}



/* ========================================

   MODALS

   ======================================== */



.modal {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.5);

    align-items: center;

    justify-content: center;

    z-index: 1000;

    padding: 1rem;

}



.modal.show {

    display: flex;

}



.modal-content {

    background: var(--card-bg);

    border-radius: var(--radius-lg);

    padding: 2rem;

    width: 100%;

    max-width: 600px;

    max-height: 90vh;

    overflow-y: auto;

    box-shadow: var(--shadow-lg);

    animation: slideUp 0.3s ease;

}



@keyframes slideUp {

    from {

        transform: translateY(20px);

        opacity: 0;

    }

    to {

        transform: translateY(0);

        opacity: 1;

    }

}



.modal-header {

    margin: -2rem -2rem 1.5rem -2rem;

    padding: 1.5rem 2rem;

    border-bottom: 1px solid var(--border);

}



.modal-title {

    font-size: 1.3rem;

    font-weight: 700;

    color: var(--text-dark);

    margin: 0;

}



.modal-body {

    padding: 1.5rem 0;

}



.modal-footer {

    margin: 1.5rem -2rem -2rem -2rem;

    padding: 1rem 2rem;

    border-top: 1px solid var(--border);

    display: flex;

    gap: 1rem;

    justify-content: flex-end;

    flex-wrap: wrap;

}



@media (max-width: 768px) {

    .modal-content {

        padding: 1.5rem;

    }



    .modal-header {

        margin: -1.5rem -1.5rem 1rem -1.5rem;

        padding: 1rem 1.5rem;

    }



    .modal-title {

        font-size: 1.1rem;

    }



    .modal-footer {

        margin: 1rem -1.5rem -1.5rem -1.5rem;

        padding: 0.8rem 1.5rem;

        flex-direction: column;

    }



    .modal-footer .btn {

        width: 100%;

    }

}



/* ========================================

   ALERTS & MESSAGES

   ======================================== */



.alert {

    padding: 1rem 1.5rem;

    border-radius: var(--radius);

    margin-bottom: 1.5rem;

    border-left: 4px solid;

}



.alert-success {

    background: rgba(76, 175, 80, 0.1);

    border-color: var(--success);

    color: #2e7d32;

}



.alert-danger {

    background: rgba(244, 67, 54, 0.1);

    border-color: var(--danger);

    color: #c62828;

}



.alert-warning {

    background: rgba(255, 152, 0, 0.1);

    border-color: var(--warning);

    color: #e65100;

}



.alert-info {

    background: rgba(33, 150, 243, 0.1);

    border-color: var(--info);

    color: #0d47a1;

}



/* ========================================

   LISTS

   ======================================== */



.list-items {

    list-style: none;

    padding: 0;

    margin: 0;

}



.list-items li {

    padding: 1rem 1.5rem;

    border-bottom: 1px solid var(--border);

    cursor: pointer;

    transition: all 0.3s ease;

}



.list-items li:hover {

    background: rgba(76, 175, 80, 0.05);

    padding-left: 2rem;

}



.list-items li.active {

    background: rgba(76, 175, 80, 0.1);

    border-left: 4px solid var(--primary);

    padding-left: 1.25rem;

    color: var(--primary);

    font-weight: 600;

}



@media (max-width: 768px) {

    .list-items li {

        padding: 0.8rem 1rem;

    }



    .list-items li:hover {

        padding-left: 1rem;

    }



    .list-items li.active {

        padding-left: 0.75rem;

    }

}



/* ========================================

   LOGIN PAGE

   ======================================== */



body.login-page {

    background: linear-gradient(135deg, #912C7C 0%, #e8dff5 100%);

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 100vh;

    padding: 1rem;

}



.login-wrapper {

    width: 100%;

    max-width: 500px;

}



.login-container {

    background: var(--card-bg);

    border-radius: var(--radius-lg);

    padding: 3rem 2.5rem;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);

    animation: slideUpLogin 0.5s ease;

}



@keyframes slideUpLogin {

    from {

        transform: translateY(30px);

        opacity: 0;

    }

    to {

        transform: translateY(0);

        opacity: 1;

    }

}



.login-header {

    text-align: center;

    margin-bottom: 2.5rem;

}



.login-logo {

    max-height: 100px;

    max-width: 100%;

    margin: 0 auto 1.5rem;

    display: block;

    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));

}



.login-title {

    font-size: 2rem;

    font-weight: 800;

    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;

    background-clip: text;

    margin: 0 0 0.5rem 0;

}



.login-subtitle {

    font-size: 0.95rem;

    color: var(--text-light);

    margin: 0;

}



.login-form {

    margin-top: 2rem;

}



.login-form .form-group {

    margin-bottom: 1.5rem;

}



.login-form .form-group label {

    display: block;

    margin-bottom: 0.6rem;

    font-weight: 600;

    color: white;

    font-size: 0.95rem;

}



.login-form .form-group input {

    width: 100%;

    padding: 0.85rem 1.2rem;

    border: 2px solid var(--border);

    border-radius: 8px;

    font-size: 0.95rem;

    font-family: inherit;

    transition: all 0.3s ease;

    background: #fafafa;

}



.login-form .form-group input:focus {

    outline: none;

    border-color: var(--primary);

    background: white;

    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);

}



.login-form .form-group input::placeholder {

    color: white;

}



.login-form .btn {

    width: 100%;

    padding: 1rem;

    font-size: 1rem;

    font-weight: 700;

    margin-top: 1rem;

    border: none;

    border-radius: 8px;

    cursor: pointer;

    transition: all 0.3s ease;

    min-height: auto;

}



.login-form .btn-primary {

    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);

    color: white;

    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);

}



.login-form .btn-primary:hover {

    transform: translateY(-2px);

    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);

}



.login-form .btn-primary:active {

    transform: translateY(0);

}



.login-loading {

    display: none;

    text-align: center;

    color: var(--primary);

    font-size: 0.9rem;

    margin-top: 1rem;

}



.form-help {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin: 1rem 0;

    font-size: 0.9rem;

}



.form-help a {

    color: var(--primary);

    text-decoration: none;

}



.form-help a:hover {

    text-decoration: underline;

}



.login-footer {

    text-align: center;

    margin-top: 2rem;

    padding-top: 1.5rem;

    border-top: 1px solid var(--border);

    color: white;

    font-size: 0.9rem;

}



.login-footer a {

    color: #ffffff;

    text-decoration: none;

    font-weight: 600;

}



.login-footer a:hover {

    text-decoration: underline;

}



@media (max-width: 480px) {

    .login-container {

        padding: 2rem 1.5rem;

    }



    .login-title {

        font-size: 1.6rem;

    }



    .login-subtitle {

        font-size: 0.9rem;

    }



    .login-form .form-group input {

        padding: 0.75rem 1rem;

    }

}



/* ========================================

   FEATURE MANAGEMENT STYLES

   ======================================== */



.table-responsive {

    overflow-x: auto;

}



input[type="checkbox"]:disabled {

    opacity: 0.5;

    cursor: not-allowed;

}



/* ========================================

   UTILITY CLASSES

   ======================================== */



.text-center {

    text-align: center;

}



.text-right {

    text-align: right;

}



.text-muted {

    color: var(--text-light);

}



.mt-1 { margin-top: 0.5rem; }

.mt-2 { margin-top: 1rem; }

.mt-3 { margin-top: 1.5rem; }

.mt-4 { margin-top: 2rem; }



.mb-1 { margin-bottom: 0.5rem; }

.mb-2 { margin-bottom: 1rem; }

.mb-3 { margin-bottom: 1.5rem; }

.mb-4 { margin-bottom: 2rem; }



.pt-2 { padding-top: 1rem; }

.pt-4 { padding-top: 2rem; }

.pb-2 { padding-bottom: 1rem; }

.pb-4 { padding-bottom: 2rem; }



.hidden {

    display: none !important;

}



.flex {

    display: flex;

}



.flex-between {

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.gap-1 { gap: 0.5rem; }

.gap-2 { gap: 1rem; }

.gap-3 { gap: 1.5rem; }



.w-full {

    width: 100%;

}



hr {

    border: none;

    border-top: 1px solid var(--border);

    margin: 2rem 0;

}



.divider {

    height: 1px;

    background: var(--border);

    margin: 1.5rem 0;

}



small {

    font-size: 0.85rem;

    color: var(--text-light);

}



@media (max-width: 768px) {

    .flex {

        flex-direction: column;

    }



    .flex-between {

        flex-direction: column;

        align-items: stretch;

        gap: 1rem;

    }

}



/* ========================================

   RESPONSIVE CONTAINERS FOR LISTS & DETAILS

   ======================================== */



.clients-container,

.users-container,

.workers-container {

    display: grid;

    grid-template-columns: 300px 1fr;

    gap: 2rem;

}



.clients-list,

.users-list,

.workers-list {

    min-width: 0;

}



.clients-details,

.users-details,

.workers-details {

    min-width: 0;

}



@media (max-width: 1024px) {

    .clients-container,

    .users-container,

    .workers-container {

        grid-template-columns: 250px 1fr;

        gap: 1.5rem;

    }

}



@media (max-width: 768px) {

    .clients-container,

    .users-container,

    .workers-container {

        grid-template-columns: 1fr;

        gap: 1.5rem;

    }

}



/* ========================================

   FILE INPUT STYLING

   ======================================== */



input[type="file"] {

    display: none;

}



.file-input-wrapper {

    position: relative;

    display: inline-block;

}



.file-input-label {

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 0 1.5rem;

    font-size: 0.95rem;

    font-weight: 600;

    border: none;

    border-radius: var(--radius);

    cursor: pointer;

    transition: all 0.3s ease;

    text-decoration: none;

    gap: 0.5rem;

    white-space: nowrap;

    height: 44px;

    line-height: 44px;

    background: var(--warning);

    color: white;

}



.file-input-label:hover {

    background: #f57c00;

    transform: translateY(-2px);

    box-shadow: var(--shadow-md);

}



.file-input-label:active {

    transform: translateY(0);

}



@media (max-width: 768px) {

    .file-input-label {

        padding: 0 1.2rem;

        font-size: 0.9rem;

        height: 40px;

        line-height: 40px;

    }

}