:root {
    --primary: #00f2ff;
    --secondary: #7000ff;
    --bg-dark: #0a0a0a;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: #888;
}

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    z-index: 10;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: var(--glass);
    color: var(--primary);
    border: 1px solid var(--glass-border);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2rem;
    margin: 0;
}

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Table Area */
.registry-container {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.registry-header {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    margin-bottom: 2.5rem !important;
    gap: 1rem !important;
}

.registry-header h2 {
    margin: 0 !important;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-self: end;
}

.btn-add {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    color: #000;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    font-size: 0.85rem;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.3);
}

.search-box {
    position: relative;
    width: 280px;
    justify-self: center;
}

.sort-container {
    display: none; /* Removed as it's now inside header-actions */
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 0.85rem;
    opacity: 0.7;
}

.search-box input {
    width: 100%;
    height: 42px;
    padding: 0 1rem 0 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.sort-dropdown {
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0 1rem;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.sort-dropdown:hover, .sort-dropdown:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.07);
}

.sort-dropdown option {
    background: #111;
    color: #fff;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-dim);
    font-weight: 500;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

.actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    font-size: 0.85rem;
}

.action-btn.view:hover { color: var(--primary); border-color: var(--primary); }
.action-btn.edit:hover { color: #ffcc00; border-color: #ffcc00; }
.action-btn.delete:hover { color: #ff4d4d; border-color: #ff4d4d; }

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-level { background: rgba(0, 242, 255, 0.1); color: var(--primary); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.page-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: black;
    border-color: var(--primary);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal-card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    width: 100%;
    max-width: 600px;
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal-card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    z-index: -1;
    border-radius: 30px;
    opacity: 0.3;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #ff4d4d;
    border-color: #ff4d4d;
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 2rem;
    margin: 0;
    color: var(--primary);
}

.modal-header p {
    color: var(--text-dim);
    margin: 5px 0 0;
}

.dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dossier-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dossier-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.dossier-value {
    font-size: 1.1rem;
    color: white;
    font-weight: 500;
}

/* CRUD Form Styles */
.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem;
    color: white;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: 0.3s;
    width: 100%;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.btn-save {
    margin-top: 2rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 15px;
    color: #000;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: 0.3s;
}

.btn-save:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.2);
}

/* Autocomplete & Team Management */
.suggestions-container { position: relative; }
.suggestions-list {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 0 0 10px 10px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}
.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.suggestion-item:hover { background: var(--glass); color: var(--primary); }

.team-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}
.team-list {
    margin-top: 1rem;
    max-height: 150px;
    overflow-y: auto;
}
.team-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hire-tool {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}
