* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

/* Ensure form controls use the same font across pages */
button,
input,
textarea,
select {
    font-family: inherit;
}

body {
    font-family: Zebra Sans ;
    min-height: 100vh;
    padding: 0px;
    color: #333;
    overflow: hidden;
}

.container {
    max-width: auto;
    max-width: 100%;
    width: 100%;
    background: white;
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 20px;
    padding-bottom: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.user-info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.username {
    color: #000000;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Support Button */
/* .btn-support {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 24px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.911);
    transition: all 0.3s ease;
    width: fit-content;
}

.btn-support:hover {
    background: #99ff00;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.895);
    transform: translateY(-2px);
    color: black;
} */
/* Support Button */
.btn-support {
    padding: 10px 20px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-support:hover {
    background: #99ff00;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    color: black;
}

/* Support Modal */
.support-modal {
    max-width: 600px;
}

.support-modal .form-field {
    margin-bottom: 20px;
}

.support-modal .form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.support-modal .form-field input,
.support-modal .form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.support-modal .form-field input[readonly] {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

.support-modal .form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.support-modal .form-field textarea:focus,
.support-modal .form-field input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.support-modal .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

h1 {
    font-size: 2.5em;
    color: #000000;
    margin-bottom: 10px;
}

/* Brand badge */
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e9e9e9;
    padding: 8px 14px; /* reduce excess left/right empty space */
    border-radius: 999px;
}

.brand-logo {
    height: auto;
    width: 140px;
    display: block;
    justify-content: left;
}

.brand-text {
    font-weight: 800;
    letter-spacing: 0.5px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* .btn-primary {
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    color: white;
    background: rgb(168,249,49)
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
} */

.btn-primary {
    background: linear-gradient(135deg, #99ff00 0%, #99ff00 100%);
    color: rgb(0, 0, 0);
}

.btn-primary:hover {
    transform: translateY(-2px);
    color:rgb(0, 0, 0);
    box-shadow: 0 8px 20px rgb(226,255,182);
}

.btn-primary:disabled {
    color: #000000;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgb(168,249,49);
    color: #000000;
}

.btn-secondary:hover {
    color: #000000;
    background: rgb(226,255,182);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.btn-export {
    background: rgb(0,0,0);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-export:hover {
    color: #000000;
    background: rgb(168,249,49);
}

.search-box {
    flex: 1;
    min-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
}

.status {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 0;
    margin-top: 0;
    font-weight: 500;
    text-align: center;
    display: none;
}
.status.success,
.status.error,
.status.info {
    display: block;
    margin-top: 15px;
    margin-bottom: 15px;
}
.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.table-container {
    margin-top: 2px;
    margin-bottom: 20px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}


/* Group for record count + search input */
.table-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}
/* Right aligned actions (search + export) */
.table-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Keep header search a fixed width, not full flex */
.header-search {
    flex: 0 0 300px;
    max-width: 40vw;
}

.table-header h2 {
    color: #000000;
    font-size: 1.3em;
}

/* .table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    height: 400px;
    overflow-y: auto;
    flex: 0 0 auto;
} */
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    min-height: 400px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    flex: 1 1 auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
}

/* Transparent scrollbar for table */
.table-wrapper::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

thead {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    z-index: 10;
}

thead th {
    padding: 10px;
    text-align: left;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #5568d3;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

tbody tr:hover {
    background-color: #e8eaf6;
}

tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    word-break: break-word;
}

tbody tr.hidden {
    display: none;
}

.error-container {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.error-container h3 {
    color: #856404;
    margin-bottom: 10px;
}

.error-container p {
    color: #856404;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Project Key Link */
.project-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.project-link:hover {
    text-decoration: underline;
    color: #764ba2;
}

/* Person Name Link */
.person-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.person-link:hover {
    text-decoration: underline;
    color: #45a049;
}

/* External URL Link */
.external-link {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.external-link:hover {
    text-decoration: underline;
    color: #0b57d0;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5em;
}

.modal-close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 25px;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #667eea;
    font-size: 1.1em;
}

.user-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.user-detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.user-detail-item.full-width {
    grid-column: 1 / -1;
    border-left-color: #4CAF50;
}

.user-detail-item.location-highlight {
    border-left-color: #ff9800;
    background: #fff8e1;
}

.user-detail-label {
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.user-detail-value {
    font-size: 1em;
    color: #333;
    line-height: 1.6;
}

.user-detail-value a {
    color: #667eea;
    text-decoration: none;
}

.user-detail-value a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    color: #856404;
}

.error-message p {
    margin: 10px 0;
}

.header-title {
    margin: 0;
    margin-left: auto; /* expand space automatically based on screen width */
    font-size: 1.8em; /* reduced desktop size for Agile Roster */
}

/* Detail View */
.detail-view {
    margin-top: 20px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    color: white;
    border-radius: 8px;
}

.detail-header h2 {
    color: white;
    font-size: 1.8em;
    margin: 0;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-right: 10px;
}

/* Transparent scrollbar for detail content */
.detail-content::-webkit-scrollbar {
    width: 8px;
}

.detail-content::-webkit-scrollbar-track {
    background: transparent;
}

.detail-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.detail-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.detail-field {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.detail-field label {
    display: block;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: #333;
    font-size: 1em;
    line-height: 1.6;
    word-wrap: break-word;
}

.detail-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.detail-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Autocomplete Styles */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.autocomplete-item {
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e0e0e0;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #e8eaf6;
}

.autocomplete-item.no-results {
    color: #666;
    cursor: default;
    font-style: italic;
}

.autocomplete-item.no-results:hover {
    background-color: white;
}

.user-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.user-coreid {
    font-size: 0.85em;
    color: #667eea;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .detail-content {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .detail-header button {
        width: 100%;
    }

    h1 {
        font-size: 1.8em;
    }
    
    header {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-title {
        text-align: right;
        margin-right: 0;
        font-size: 1.4em; /* smaller on mobile */
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    button {
        width: 100%;
        justify-content: center;
    }

    .table-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    thead th,
    tbody td {
        padding: 10px;
        font-size: 0.9em;
    }
}
