:root {
    --bg-color: #0b0c10;
    --surface-color: #1f2833;
    --primary-color: #66fcf1;
    --secondary-color: #45a29e;
    --text-color: #c5c6c7;
    --white: #ffffff;
    --danger: #ff4d4d;
    --success: #2ecc71;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.brand i {
    font-size: 2rem;
}

.brand h2 {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
}

.sidebar li i {
    width: 20px;
    text-align: center;
}

.sidebar li:hover {
    background-color: rgba(102, 252, 241, 0.1);
    color: var(--primary-color);
}

.sidebar li.active {
    background-color: var(--primary-color);
    color: var(--bg-color);
    font-weight: 500;
}

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

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

header h1 {
    font-size: 2rem;
    color: var(--white);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Dashboard Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--surface-color);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.card-info h3 {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.card-info p {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
}

.card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    opacity: 0.5;
}

/* Section Visibility */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Table Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}

.search-bar input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border-radius: 8px;
    border: none;
    background-color: var(--surface-color);
    color: var(--white);
    outline: none;
}

.table-container {
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

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

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #2b3642;
}

th {
    background-color: #171f26;
    color: var(--secondary-color);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
}

tr:hover {
    background-color: rgba(102, 252, 241, 0.05);
}

/* Buttons */
.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #3a8e8a;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    margin-right: 10px;
    transition: transform 0.2s;
}

.edit-btn { color: var(--primary-color); }
.delete-btn { color: var(--danger); }

.action-btn:hover { transform: scale(1.2); }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #121212;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--surface-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large-modal {
    max-width: 900px;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.close:hover { color: var(--danger); }

/* Forms */
.form-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    background-color: var(--surface-color);
    border: 1px solid #2b3642;
    border-radius: 6px;
    color: var(--white);
    font-family: inherit;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2b3642;
}

/* Profile View */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

.profile-sidebar {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.profile-photo-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    background-color: #000;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-id {
    color: var(--text-color);
    margin-bottom: 20px;
    font-family: monospace;
}

.quick-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat .label {
    font-size: 0.8rem;
    color: var(--text-color);
}

.stat .value {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
}

.detail-card {
    background-color: var(--surface-color);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.detail-card h3 {
    color: var(--white);
    margin-bottom: 20px;
    border-bottom: 1px solid #2b3642;
    padding-bottom: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.detail-item span {
    color: var(--white);
    font-size: 1rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

/* Project Info / README Styles Removed */

/* Login Screen Styles */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    gap: 30px;
}

.brand-section {
    text-align: center;
    margin-bottom: 10px;
}

.brand-section .logo-box {
    width: 80px;
    height: 80px;
    background-color: var(--surface-color);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    font-size: 32px;
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.2);
}

.brand-section h1 {
    font-size: 2.5rem;
    color: var(--white);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.brand-section p {
    color: var(--secondary-color);
    font-size: 1rem;
    letter-spacing: 1px;
}

.login-card {
    width: 100%;
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(102, 252, 241, 0.1);
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h2 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.form-group-login {
    margin-bottom: 1.5rem;
}

.form-group-login label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.form-group-login input {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group-login input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 252, 241, 0.1);
}

.btn-full-width {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--secondary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-full-width:hover {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
    transform: translateY(-2px);
}

/* User Profile & Logout */
.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--surface-color);
    padding: 8px 15px;
    border-radius: 50px;
    border: 1px solid var(--secondary-color);
    color: var(--text-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.btn-logout {
    background-color: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

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

/* Responsive Sidebar Toggle */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

#sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

#sidebar-toggle:hover {
    color: var(--primary-color);
}

#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 90;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .login-content {
        padding: 15px;
    }
    
    .brand-section h1 {
        font-size: 2rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }

    /* Mobile Sidebar */
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 260px;
        transition: left 0.3s ease;
        z-index: 100;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        width: 100%;
        padding: 20px;
    }

    #sidebar-toggle {
        display: block;
    }
    
    /* Adjust profile header on mobile */
    header {
        justify-content: space-between;
    }
    
    #page-title {
        font-size: 1.5rem;
    }
    
    .user-profile {
        padding: 5px 10px;
    }
    
    #username-display {
        display: none; /* Hide name on mobile to save space */
    }
}
