/* ===============================
   GENERAL STYLES
================================ */
body {
    font-family: 'Inter', sans-serif;
    background: #f9fafb;
    color: #333;
    margin: 0;
    padding: 0;
}

.main {
    padding: 25px;
}

/* ===============================
   PROFILE CARD
================================ */
.profile-card {
    background: #fff;
    padding: 20px 25px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.profile-card:hover {
    transform: translateY(-2px);
}

.profile-info {
    display: flex;
    gap: 18px;
    align-items: center;
}

.avatar {
    width: 60px;
    height: 60px;
    background: #30D0C3;
    color: #fff;
    font-size: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===============================
   SEARCH & FILTER
================================ */
.search-filter {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search-filter input[type="text"],
.search-filter select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: 0.2s;
}

.search-filter input[type="text"]:focus,
.search-filter select:focus {
    outline: none;
    border-color: #30D0C3;
}

.search-filter .btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.search-filter .btn:hover {
    opacity: 0.9;
}

/* ===============================
   STAFF TABLE BOX
================================ */
.box {
    background: #fff;
    padding: 22px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

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

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

th, td {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    font-size: 14px;
}

th {
    color: #555;
    font-weight: 600;
}

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

/* ===============================
   BUTTON STYLES
================================ */
button, .btn, .btn-sm {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

/* Primary button */
.btn.primary {
    background: #30D0C3;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: 0.2s;
}

.btn.primary:hover {
    background: #28b9ad;
}

/* Cancel button */
.btn.cancel {
    background: #f3f4f6;
    color: #555;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.btn.cancel:hover {
    background: #eaecef;
}

/* Small edit button */
.btn-sm {
    background: #f3f4f6;
    color: #444;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: 0.2s;
}

.btn-sm:hover {
    background: #eaecef;
}

/* ===============================
   MODAL (Add Staff Popup)
================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-box {
    background: #fff;
    padding: 25px 30px;
    border-radius: 16px;
    width: 440px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    transition: 0.2s;
}

.modal-box:hover {
    transform: translateY(-2px);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close {
    font-size: 22px;
    cursor: pointer;
    color: #888;
}

.close:hover {
    color: #000;
}

.modal label {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.modal input,
.modal select {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: 0.2s;
}

.modal input:focus,
.modal select:focus {
    outline: none;
    border-color: #30D0C3;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

/* ===============================
   ALERT MESSAGES
================================ */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ===============================
   ROLE BADGES
================================ */

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Admin */
.badge-admin {
    background: #d1fae5;
    color: #065f46;
}

/* HOD */
.badge-hod {
    background: #dbeafe;
    color: #1e40af;
}

/* Technician */
.badge-technician {
    background: #ede9fe;
    color: #5b21b6;
}

.badge i {
    margin-right: 4px;
    font-size: 11px;
}

/* ===============================
   EDIT PROFILE BUTTON
================================ */

.edit-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 18px;
    border-radius: 12px;

    background: linear-gradient(135deg, #30D0C3, #28b9ad);
    color: white;
    font-weight: 600;
    text-decoration: none;

    box-shadow: 0 4px 12px rgba(48,208,195,0.3);
    transition: all 0.25s ease;
}

.edit-profile-btn i {
    font-size: 14px;
}

.edit-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(48,208,195,0.4);
}

.btn.danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn.danger:hover {
    background: #dc2626;
    color: white;
}

.profile-edit-card {
    background: white;
    padding: 30px;
    border-radius: 14px;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.avatar-preview {
    text-align: center;
    margin-bottom: 20px;
}

.avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #30D0C3;
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.readonly-info {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
}

/* ==============================
   MODERN EDIT PROFILE STYLE
============================== */

.profile-edit-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 650px;
    margin: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.edit-header {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.profile-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #30D0C3;
    box-shadow: 0 5px 15px rgba(48,208,195,0.3);
}

.avatar-placeholder-large {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #30D0C3, #28b9ad);
    color: white;
    font-size: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

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

.styled-form .form-group {
    display: flex;
    flex-direction: column;
}

.styled-form input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: 0.2s;
}

.styled-form input:focus {
    border-color: #30D0C3;
    box-shadow: 0 0 0 3px rgba(48,208,195,0.2);
    outline: none;
}

.readonly-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    background: #f9fafb;
    font-size: 14px;
    color: #555;
    display: flex;
    justify-content: space-between;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.btn-save {
    background: linear-gradient(135deg, #30D0C3, #28b9ad);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 5px 15px rgba(48,208,195,0.3);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(48,208,195,0.4);
}

/* ===============================
   PROFILE ACTION BUTTONS
================================ */

.profile-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Change Password Button */
.change-password-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 18px;
    border-radius: 12px;

    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    font-weight: 600;
    text-decoration: none;

    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
    transition: all 0.25s ease;
}

.change-password-btn i {
    font-size: 14px;
}

.change-password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(99,102,241,0.4);
}

/* =========================
   PROFILE TOP (VERTICAL)
========================= */

.profile-top {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.avatar-large {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    background: #30D0C3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: bold;
}

.avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================
   PROFILE TOP SPLIT LAYOUT
========================= */

.profile-top {
    background: #fff;
    padding: 25px 30px;
    border-radius: 16px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* LEFT SIDE */
.profile-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-info-text h2 {
    margin: 0;
    font-size: 20px;
}

.profile-info-text p {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

/* AVATAR */
.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #30D0C3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 28px;
    overflow: hidden;
}

.avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* RIGHT SIDE */
.profile-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* make buttons consistent width */
.profile-right a {
    text-align: center;
    min-width: 180px;
}