:root {
    --bg: linear-gradient(
        135deg,
        #2c2f34 0%,
        #1f2227 30%,
        #3a3f45 50%,
        #1a1d21 70%,
        #2e3238 100%
    );

    --panel: #17171c;

    --accent: #a00f2d;

    --silver: #e0e0e0;

    --green: #2ecc71;
    --red: #e74c3c;
}
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--silver);
}


header {
    background: linear-gradient(90deg, #000, #1a1a1a);
    padding: 20px 30px;
    font-size: 22px;
    letter-spacing: 1px;
    border-bottom: 1px solid #222;
}

.container {
    padding: 25px 30px;
}

.panel {
    background: var(--panel);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

button {
    background: var(--accent);
    border: none;
    padding: 8px 14px;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 13px;
}

button:hover {
    background: #c01236;
}

button.secondary {
    background: #2a2a30;
    border: 1px solid #3a3a40;
}

button.secondary:hover {
    background: #3a3a40;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    background: #111;
    border: 1px solid #333;
    color: white;
    border-radius: 4px;
    margin-bottom: 10px;
}

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

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #222;
}

tr:hover {
    background: #1f1f26;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge {
    background: #ffffff;
    color: #a00f2d;   /* your accent red */
    font-weight: 600;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 6px;
    border: 1px solid #ccc;
}

.badge.approved { background: var(--green); }
.badge.pending { background: var(--red); }

.star {
    color: gold;
}

.pending-row {
    background: rgba(231, 76, 60, 0.08);
}


/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Modal Box */
.modal {
    background: #17171c;
    padding: 25px;
    border-radius: 10px;
    width: 420px;
    max-width: 95%;
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
    animation: fadeIn 0.15s ease-out;
}

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

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

.modal-close:hover {
    color: white;
}

.modal-body label {
    display: block;
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 13px;
    color: #aaa;
}

.modal-footer {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.fc {
    background: #111;
    color: white;
}

.fc-toolbar-title {
    color: white;
}

.fc-daygrid-day-number {
    color: #aaa;
}

.fc-event {
    background-color: var(--accent);
    border: none;
}

.app-footer {
  width: 100%;
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  border-top: 1px solid #eee;
}

.inactive-row {
    background: rgba(231, 76, 60, 0.08);
}

.talent-card {
    background: #1a1a20;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
}

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

.card-body div {
    margin-bottom: 5px;
    font-size: 14px;
    color: #bbb;
}

.card-actions {
    margin-top: 10px;
}

.pending-card {
    border: 1px solid rgba(231,76,60,0.4);
}

.mobile-actions {
    display: none;
}

@media (max-width: 768px) {
    .mobile-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #111;
        padding: 10px;
        display: flex;
        gap: 10px;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.4);
    }

    .mobile-actions button {
        flex: 1;
    }

    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 768px) {

    .modal-overlay {
        align-items: flex-end; /* slides up from bottom */
    }

    .modal {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 20px;
        animation: none;
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        background: #17171c;
        padding-top: 10px;
    }
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 30px;
    background: linear-gradient(90deg, #000, #1a1a1a);
    border-bottom: 1px solid #222;
}

.header-right button {
    padding: 8px 14px;
}

/* Hide hamburger on desktop */
.hamburger {
    display: none;
}

/* Desktop layout */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto; /* 🔥 pushes menu to right */
}

.nav-center,
.nav-right {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {

    .hamburger {
        display: block;
        margin-left: auto;
        font-size: 26px;
        background: none;
        border: none;
        color: #fff;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 20px;
        background: #111;
        flex-direction: column;
        display: none;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 8px 20px rgba(0,0,0,.3);
        min-width: 220px;
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-center,
    .nav-right {
        flex-direction: column;
        width: 100%;
    }

    .nav-menu button {
        width: 100%;
        text-align: left;
        margin-bottom: 8px;
    }
}

.badge-count {
    background: #2c3e50;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 6px;
}

.role-badge {
    background: #222;
    color: #aaa;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin {
    background: #2c3e50;
    color: #ecf0f1;
}

.role-badge.manager {
    background: #34495e;
    color: #ecf0f1;
}

.role-badge.viewer {
    background: #333;
    color: #bbb;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: #1a1a20;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #222;
}

.kpi-title {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: bold;
    color: white;
}
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-card {
        padding: 15px;
    }
}
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: white;
    padding: 12px 18px;
    border-radius: 6px;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 2000;
}
td:has(span.completed) { color: green; }
td:has(span.canceled) { color: red; }

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.metric-card {
    background: #1c1c22;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #2a2a33;
}

.metric-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 6px;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
}

.metric-value.positive {
    color: #4CAF50;
}

.metric-value.negative {
    color: #F44336;
}

.metric-value.highlight {
    font-size: 20px;
    color: #FFD700;
}

.metric-value.elite { color: #FFD700; }
.metric-value.core { color: #4CAF50; }
.metric-value.solid { color: #2196F3; }
.metric-value.review { color: #F44336; }

.talent-card {
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.talent-card:active {
    transform: scale(0.98);
}

.form-message {
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 500;
}

.form-message.success {
    background: #2ecc71;
    color: #fff;
}

.form-message.error {
    background: #e74c3c;
    color: #fff;
}

.form-message.hidden {
    display: none;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: linear-gradient(135deg, #b3122d, #7a0c1f);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    min-width: 260px;

    box-shadow:
        0 6px 18px rgba(0,0,0,0.35),
        0 2px 6px rgba(0,0,0,0.2);

    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.3s ease;

    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: linear-gradient(135deg, #2ecc71, #1e9e52);
}

.toast.error {
    background: linear-gradient(135deg, #e74c3c, #b83222);
}

.toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255,255,255,0.4);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.profile-actions{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
  margin-bottom: 15px;
}

.actions-left{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions-right{
  display:flex;
  justify-content:flex-end;
}

button.danger{
  background:#c62828;
  color:#fff;
  border:0;
}
button.danger:hover{
  filter: brightness(0.95);
}

.panel table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* prevents squishing */
}
@media (max-width: 768px) {
    .profile-row {
        flex-direction: column;
    }
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* prevents ugly squish */
}

.responsive-table th,
.responsive-table td {
    padding: 8px;
    text-align: left;
}
.responsive-table td:nth-child(5) {
    white-space: normal;
    min-width: 200px;
}

#calendar {
    width: 100%;
    max-width: 100%;
}

.fc {
    max-width: 100%;
}

.fc-view-harness {
    overflow-x: auto;
}

.fc .fc-list-day-cushion {
    background-color: #6b0f1a !important; /* maroon */
    color: #fff !important;
    font-weight: 600;
}

.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
    color: #fff !important;
}

/* Header layout */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    position: relative;
}

/* Desktop layout */
.nav-center,
.nav-right {
    display: flex;
    gap: 10px;
}

/* Hide hamburger on desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
}

/* 🔥 Mobile behavior */
@media (max-width: 768px) {

    .hamburger {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: #111; /* adjust to your theme */
        display: flex;
        flex-direction: column;
        padding: 15px;
        border-radius: 6px;
        box-shadow: 0 6px 20px rgba(0,0,0,.25);
        min-width: 220px;
        z-index: 1000;
	align-items: center;
	gap: 10px;
	margin-left: auto;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-center,
    .nav-right {
        flex-direction: column;
        width: 100%;
    }

    .nav-menu button {
        width: 100%;
        margin-bottom: 8px;
        text-align: left;
    }
}

/* Base table styling */
#deviceTable {
    width: 100%;
    border-collapse: collapse;
}

#deviceTable th,
#deviceTable td {
    padding: 10px;
    text-align: left;
}

/* 🔥 Mobile conversion */
@media (max-width: 768px) {

    #deviceTable thead {
        display: none;
    }

    #deviceTable,
    #deviceTable tbody,
    #deviceTable tr,
    #deviceTable td {
        display: block;
        width: 100%;
    }

    #deviceTable tr {
        margin-bottom: 15px;
        padding: 12px;
        background: #1a1a1a; /* match your theme */
        border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,.2);
    }

    #deviceTable td {
        padding: 6px 0;
    }

    #deviceTable td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 4px;
        opacity: 0.7;
    }
    .profile-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .profile-photo {
        flex: none;
        width: 100%;
        text-align: center;
    }

    .profile-photo img {
        width: 180px;
        max-width: 80%;
        height: auto;
    }

    .profile-info {
        width: 100%;
    }
}
.status-badge.active {
    background: #2ecc71;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-badge.inactive {
    background: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
}

@media (max-width: 768px) {

    #deviceTable {
        table-layout: fixed;
        width: 100%;
    }

}

@media (max-width: 768px) {

    #deviceTable thead {
        display: none !important;
    }

    #deviceTable,
    #deviceTable tbody,
    #deviceTable tr,
    #deviceTable td {
        display: block !important;
        width: 100% !important;
    }

}

@media (max-width: 768px) {

    #deviceTable select {
        width: 100%;
        max-width: 100%;
        min-width: 0;        /* 🔥 critical */
        box-sizing: border-box;
    }

}


/* =========================
   HEADER LAYOUT (DESKTOP DEFAULT)
========================= */

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #111;
    color: #fff;
    position: relative;
}

/* Left side */
.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Center + Right container */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Button groups */
.nav-center,
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.nav-menu button {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.nav-menu button:hover {
    opacity: 0.8;
}

/* Hamburger hidden on desktop */
.hamburger {
    display: none;
    cursor: pointer;
}

    .profile-photo {
    text-align: center;
    margin-bottom: 20px;
}

 .profile-photo img {
    display: block;
    width: 250px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

/* =========================
   MOBILE STYLES
========================= */

@media (max-width: 768px) {

    /* Show hamburger */
    .hamburger {
        display: block;
        margin-left: auto;
        font-size: 26px;
        background: none;
        border: none;
        color: #fff;
    }

    /* Hide nav by default */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 20px;
        background: #111;
        flex-direction: column;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 8px 20px rgba(0,0,0,.3);
        min-width: 220px;
        z-index: 1000;
    }

    /* Show when active */
    .nav-menu.active {
        display: flex;
    }

    /* Stack button groups */
    .nav-center,
    .nav-right {
        flex-direction: column;
        width: 100%;
    }

    /* Full width buttons */
    .nav-menu button {
        width: 100%;
        text-align: left;
        margin-bottom: 8px;
    }
}

.profile-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.profile-photo {
    flex: 0 0 250px;
}

.profile-photo img {
    width: 250px;
    height: auto;
    border-radius: 10px;
    display: block;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    margin-top: 0;
    margin-bottom: 18px;
}

@media (max-width: 768px) {

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-photo {
        flex: none;
    }

    .profile-info {
        width: 100%;
        text-align: left;
    }
.hamburger {
    width: 42px;
    height: 42px;
    background: none;
    border: none;
    padding: 0;
    position: relative;
    cursor: pointer;
}

.hamburger-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transform: translate(-50%, -50%);
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    top: 8px;
}
}