@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --accent-orange: #e67e22;
    --accent-red: #e74c3c;
    --dark-bg: #2c3e50;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
}

*::-webkit-scrollbar {
    display: none;
}

body {
    font-family: "Roboto", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 32px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 5fr;
    gap: 32px;
    min-height: 99vh;
}

/* sidebar */

.sidebar {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0px 4px 20px var(--shadow);
    position: sticky;
    top: 32px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.sidebar_header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--light-bg);
    margin-bottom: 24px;
}

.sidebar_header img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    margin-bottom: 8px;
}

.tagline {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}


.toolbar {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.toolbar h2 {
    font-size: 24px;
    color: var(--dark-bg);
    font-weight: 700;
    margin: 0;
}

.toolbar button {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.toolbar button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

/* employees list */

.unassigned-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 8px;
    overflow-y: scroll;
}

.unassigned-list::-webkit-scrollbar {
    width: 6px;
}

.unassigned-list::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 8px;
}

.unassigned-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 8px;
}

.employee-card {
    display: flex;
    gap: 16px;
    border: solid 2px #bdc3c7;
    padding: 16px;
    align-items: center;
    border-radius: 16px;
}

.employee-card img {
    width: 50px;
    height: 50px;
    border-radius: 100%;
    object-fit: cover;
    border: solid 2px #bdc3c7;
}

.employee-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.employee-role {
    font-size: 14px;
    color: var(--text-light);
}

.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
}

.badge-manager {
    background: var(--primary-color);
}

.badge-it_technician {
    background-color: var(--secondary-color);
    color: white;
}

.badge-receptionist {
    background-color: var(--accent-orange);
    color: white;
}

.badge-security {
    background-color: var(--dark-bg);
    color: white;
}

.badge-cleaner {
    background-color: #16a085;
    color: white;
}

.employee-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    transform: translateY(-3px);
}

.btn-info:hover {
    color: var(--primary-color);
    background-color: rgba(46, 204, 113, 0.15);
}

.btn-edit:hover {
    color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.15);
}

.btn-delete:hover {
    color: var(--accent-red);
    background-color: rgba(231, 76, 60, 0.15);
}

.cenference-room {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 1/2;
    grid-row: 1/2;
}

.reception-room {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 1/2;
    grid-row: 2/4;
}

.archive-room {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 3/4;
    grid-row: 1/2;
}

.security-room {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 4/5;
    grid-row: 1/2;
}

.servers-room {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 3/4;
    grid-row: 3/4;
}

.staff-room {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-column: 4/5;
    grid-row: 3/4;
}

/* Employee modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}


.modal-overlay.hidden {
    display: none;
    opacity: 0;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

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

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-dark);
}

.btn-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.btn-close:hover {
    color: var(--accent-red);
}

.modal-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.photo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.photo-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-bg);
}

.photo-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.photo-input-group small {
    color: var(--text-light);
    font-size: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-overlay label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-overlay input,
.modal-overlay select {
    padding: 10px 12px;
    border: 1.5px solid #bdc3c7;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.modal-overlay input:focus,
.modal-overlay select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.divider {
    border: none;
    border-top: 1px solid var(--light-bg);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.exp-header-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: var(--light-bg);
    color: var(--text-dark);
}

.exp-header-btn:hover {
    background: #dfe6e9;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 6px;
}

.experience-item {
    background: #f7f9fa;
    border: 1px solid var(--light-bg);
    border-radius: 12px;
    padding: 25px;
    position: relative;
}

.exp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-remove-exp {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-remove-exp:hover {
    background: #ffe0e0;
    color: var(--accent-red);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.btn-cancel,
.btn-save,
.btn-unassign {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.btn-cancel {
    background: #ffe0e0;
    color: var(--accent-red);
}

.btn-cancel:hover {
    background: #ffcccc;
}

.btn-unassign {
    background-color: #fef3c7;
    color: #d97706;
}

.btn-unassign:hover {
    background-color: #fde68a;
}

.btn-save {
    background: var(--primary-color);
    color: var(--white);
}

.btn-save:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* warning msg */
.warning-message {
    background-color: #dd2d4a;
    color: #fff0f3;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e74c3c;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    display: none;
}

#noEmployee {
    background-color: #fee2e2;
    color: #854d0e;
    border-color: #f09a1a;
}

/* Assign Modal */
.modal-small {
    max-width: 450px;
    height: auto;
    max-height: 80vh;
}

.modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: hidden;
}

.assign-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 5px;
}

.assign-list::-webkit-scrollbar {
    width: 5px;
}

.assign-list::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.assign-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: solid 2px #bdc3c7;
    border-radius: 10px;
    background: var(--white);
}

.assign-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assign-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.text-group {
    display: flex;
    flex-direction: column;
}

.text-group .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.text-group .role {
    font-size: 12px;
    color: var(--text-light);
}

.btn-assign-action {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-assign-action:hover {
    background-color: var(--primary-dark);
}




.workspace {
    background: var(--white);
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    position: sticky;
    top: 32px;
    padding: 24px;
    height: 85vh;

    /* rooms grid */
    box-sizing: content-box;
    display: grid;
    grid-template-columns: 8fr 3fr 5fr 5fr;
    grid-template-rows: 3fr 2fr 3fr;
}

.btn-add {
    position: absolute;
    top: 30px;
    left: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.4);
}

.btn-add:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.room-zone {
    position: relative;
    padding: 25px;
    margin: 4px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    background: var(--light-bg);
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.room-header {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--dark-bg);
    background: var(--white);
    padding: 4px 8px;
    border-radius: 0 0 10px 10px;
}


.avatar-group {
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.mini-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--white);
    margin-left: -18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.mini-avatar:hover {
    transform: translateY(-3px);
    z-index: 100;
}

.modal-scroll {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-scroll .header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cv-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-bg);
}

.identity-text h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
    color: var(--text-dark);
}

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

.cv-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cv-item label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
}

.cv-item .value {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    word-break: break-all;
}


/* Tablet Portrait */
@media (max-width: 1023px) {
    .container {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 24px auto;

    }

    .sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }

    .workspace {
        height: 60vh;
        position: relative;
        top: 0;
    }

    .mini-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Portrait */
@media (max-width: 767px) {
    .container {
        padding: 0 16px;
        margin: 16px auto;
    }

    .sidebar {
        padding: 16px;
    }

    .sidebar_header img {
        max-height: 50px;
    }

    .toolbar h2 {
        font-size: 21px;
    }

    .toolbar button {
        font-size: 16px;
    }

    .workspace {
        height: 30vh;
        min-height: 270px;
        padding: 10px;
    }

    .room-header {
        font-size: 9px;
        padding: 2px 6px;
        top: 5px;
    }

    .btn-add {
        top: 10px;
        width: 24px;
        height: 24px;
        font-size: 16px;
        right: 5px;
    }

    /* modal */

    .form-grid {
        grid-template-columns: 1fr;
    }


    .modal-content {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .exp-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mini-avatar {
        width: 24px;
        height: 24px;
    }

    .cv-grid {
        grid-template-columns: 1fr;
    }

    .modal-scroll .header {
        flex-direction: column;
        text-align: center;
    }
}