/* --- Base & Dark Theme Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1e1e1e; /* Dark background */
    color: #f0f0f0; /* Light text */
    margin: 0;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    background: #2c2c2c; /* Dark container background */
    padding: 20px 30px 30px 30px;
    border-radius: 8px;
    border: 1px solid #444; /* Subtle border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 960px;
    margin: 20px auto;
    box-sizing: border-box;
}

header {
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

h1, h2, h3 {
    color: #ffffff; /* Brighter headings */
}

select, input[type="email"], input[type="password"], input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    background-color: #3b3b3b;
    color: #f0f0f0;
}

    select:focus, input:focus {
        outline: none;
        border-color: #007bff;
    }

button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    -webkit-appearance: none;
}

    button:disabled {
        background-color: #555;
        color: #999;
        cursor: not-allowed;
    }

    button:hover:not(:disabled) {
        opacity: 0.9;
    }

.danger-btn {
    background-color: #dc3545;
}

.edit-btn {
    background-color: #28a745;
}

footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #aaa;
}

    footer a {
        color: #00aaff;
    }

.error-message, .status-message {
    color: #f0f0f0;
    background-color: #5c2c31;
    border: 1px solid #dc3545;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
}

.status-message {
    background-color: #2c5c3d;
    border-color: #28a745;
}

/* --- Customer-Facing Skills List (skills.html) --- */
.skills-container {
    display: flex;
    flex-direction: column; /* This creates the vertical list */
    gap: 10px;
    margin: 20px 0;
}

    .skills-container label {
        display: flex; /* Use flex to align checkbox and text */
        align-items: center;
        background-color: #3b3b3b;
        padding: 15px;
        border-radius: 4px;
        border: 1px solid #555;
        cursor: pointer;
        transition: background-color 0.2s;
        font-size: 16px;
    }

        .skills-container label:hover {
            background-color: #4f4f4f;
        }

    .skills-container input[type="checkbox"] {
        margin-right: 15px; /* Space between checkbox and text */
        transform: scale(1.2); /* Make checkbox slightly larger */
        accent-color: #007bff; /* Style the checkmark color */
        flex-shrink: 0;
    }


/* --- Specialist Profile Skills (profile.html) --- */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.skill-tag {
    background: #555;
    padding: 5px 12px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

    .skill-tag button {
        background: #888;
        color: white;
        border: none;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        padding: 0;
        margin: 0;
        line-height: 18px;
        text-align: center;
        cursor: pointer;
        flex-shrink: 0;
    }


/* --- Admin Tabs (Dark Theme) --- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
}

.tab-link {
    background-color: #3b3b3b;
    color: #bbbbbb;
    border: 1px solid transparent;
    border-bottom: none;
    outline: none;
    cursor: pointer;
    padding: 10px 16px;
    transition: 0.3s;
    border-radius: 4px 4px 0 0;
    margin: 0 2px 0 0;
}

    .tab-link:hover {
        background-color: #4f4f4f;
        color: #ffffff;
    }

    .tab-link.active {
        background-color: #007bff;
        color: white;
        border-color: #444;
        border-bottom: 1px solid #2c2c2c;
        margin-bottom: -1px;
    }

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tab-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

/* --- Table Styles (Dark Theme & Responsive) --- */
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #444;
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap;
}

th {
    background-color: #3b3b3b;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #333333;
}

td.actions {
    display: flex;
    gap: 10px;
    white-space: normal;
}

/* --- Modal Styles (Dark Theme) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #2c2c2c;
    margin: 10% auto;
    padding: 20px 30px 30px 30px;
    border: 1px solid #555;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    animation: slideIn 0.3s;
    box-sizing: border-box;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

    .close-btn:hover,
    .close-btn:focus {
        color: white;
        text-decoration: none;
        cursor: pointer;
    }

/* --- Video Call Styles (Picture-in-Picture) --- */
.video-pip-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #111;
    border-radius: 8px;
    overflow: hidden;
}

.video-main, .video-pip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .video-main video, .video-pip video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.video-pip {
    width: 25%;
    height: 25%;
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    border: 2px solid #555;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.video-label {
    position: absolute;
    bottom: 5px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* --- Responsive Design Adjustments --- */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    body {
        padding: 0;
    }

    .container {
        padding: 15px;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
        border: none;
    }

    h1 {
        font-size: 1.5em;
    }

    .video-pip {
        width: 30%;
        height: 30%;
        bottom: 10px;
        right: 10px;
    }
}
