@import url("common.css");

/* =========================
   Header
========================= */

.header {
    height: 80px;
    background: #111827;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 35px;
    box-shadow: var(--shadow-sm);
}

.header-logo {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.header-nav {
    display: flex;
    gap: 14px;
}

.header-nav a {
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    transition: .2s;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, .12);
}


/* =========================
   User Menu
========================= */

.header-user {
    display: flex;
    align-items: center;
    position: relative;
}

.user-dropdown {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: .2s;
}

.user-button:hover {
    background: rgba(255, 255, 255, .10);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2563eb;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 15px;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
}

.user-arrow {
    font-size: 12px;
    opacity: .8;
}

.user-menu {
    position: absolute;
    top: 58px;
    right: 0;
    width: 230px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .15);
    overflow: hidden;
    display: none;
    z-index: 1000;
}

.user-menu.show {
    display: block;
}

.user-menu a {
    display: block;
    padding: 14px 18px;
    color: #111827;
    transition: .15s;
}

.user-menu a:hover {
    background: #f3f4f6;
}

.user-menu hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 6px 0;
}

.logout-link {
    color: #dc2626 !important;
}


/* =========================
   Layout
========================= */

.content {
    padding: 35px;
}


/* =========================
   Cards
========================= */

.list {
    display: grid;
    gap: 20px;
}

.item-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

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

.item-info p {
    margin: 10px 0;
}


/* =========================
   Buttons
========================= */

.success-btn {
    background: var(--success);
    color: white;
    padding: 11px 18px;
    border-radius: 10px;
}

.success-btn:hover {
    background: var(--success-hover);
}

.primary-btn {
    background: var(--primary);
    color: white;
    padding: 11px 18px;
    border-radius: 10px;
}

.primary-btn:hover {
    background: var(--primary-hover);
}

.danger-btn {
    background: var(--danger);
    color: white;
    padding: 11px 18px;
    border-radius: 10px;
}

.danger-btn:hover {
    background: var(--danger-hover);
}


/* =========================
   Modal
========================= */

.close-btn {
    background: none;
    font-size: 24px;
}

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


/* =========================
   Status
========================= */

.status {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.online {
    color: var(--success);
}

.offline {
    color: var(--danger);
}


/* =========================
   Empty
========================= */

.empty {
    text-align: center;
    padding: 50px;
}


/* =========================
   Profile
========================= */

.profile-page {
    max-width: 900px;
}

.profile-page h1 {
    font-size: 36px;
    margin-bottom: 30px;
}

.profile-info {
    border-top: 1px solid #d1d5db;
}

.profile-row {
    min-height: 64px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d1d5db;
}

.profile-label {
    width: 260px;
    color: #64748b;
    font-size: 15px;
}

.profile-value {
    color: #111827;
    font-size: 16px;
    font-weight: 500;
}


/* =========================
   Users Table
========================= */

.users-table-card {
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.users-table thead {
    background: #f8fafc;
}

.users-table th {
    padding: 14px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
}

.users-table td {
    padding: 14px 14px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.users-table tbody tr {
    transition: .2s;
}

.users-table tbody tr:hover {
    background: #f8fafc;
}

.users-table tbody tr:last-child td {
    border-bottom: none;
}


/* =========================
   Users Table Columns
========================= */

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
    width: 20%;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
    width: 10%;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
    width: 9%;
}

.users-table th:nth-child(4),
.users-table td:nth-child(4) {
    width: 13%;
}

.users-table th:nth-child(5),
.users-table td:nth-child(5) {
    width: 9%;
}

.users-table th:nth-child(6),
.users-table td:nth-child(6) {
    width: 10%;
}

.users-table th:nth-child(7),
.users-table td:nth-child(7) {
    width: 9%;
}

.users-table th:nth-child(8),
.users-table td:nth-child(8) {
    width: 20%;
}


/* =========================
   Table User
========================= */

.table-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.table-user-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.table-user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
}

.table-user-info strong {
    display: block;
    max-width: 100%;
    font-size: 13px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-user-info span {
    display: block;
    max-width: 100%;
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================
   Role Badge
========================= */

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}


/* =========================
   User Actions
========================= */

.user-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.user-actions .primary-btn,
.user-actions .danger-btn,
.user-actions .success-btn {
    padding: 7px 10px;
    font-size: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}


/* =========================
   Users Search
========================= */

.users-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
}

.users-search {
    width: 430px;
    height: 44px;
    padding: 0 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    outline: none;
    transition: .2s;
}

.users-search::placeholder {
    color: #94a3b8;
}

.users-search:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* =========================
   System User
========================= */

.system-user-label {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}