:root {
    --primary-color: #00e5ff;
    --primary-glow: rgba(0, 229, 255, 0.4);
    --secondary-color: #008ba3;
    --background-dark: #070709;
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.06);
    --text-main: #ffffff;
    --text-muted: #a0aab2;
    --accent-blue: #2979ff;
    --accent-green: #00e676;
    --accent-purple: #d500f9;
    --accent-orange: #ff9100;
    --accent-red: #ff1744;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    outline: none;
}

body {
    background-color: var(--background-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Decorative Blobs */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
}

/* Glassmorphism Common styles */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
}

/* Login Panel styles */
#login-container {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    display: none;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#login-container.active {
    display: block;
    transform: translateY(0);
}

.logo-box {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px var(--primary-glow);
}

.logo-icon {
    font-size: 32px;
    color: var(--text-main);
}

#login-container h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

#login-container p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

/* Form Styles */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group span {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 15px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(255,255,255,0.06);
}

.btn {
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--secondary-color);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.error-msg {
    color: var(--accent-red);
    font-size: 13px;
    margin-bottom: 15px;
    background: rgba(244, 67, 54, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(244, 67, 54, 0.2);
    display: none;
}

/* Dashboard Grid Layout */
#dashboard-container {
    display: none;
    width: 100vw;
    height: 100vh;
    padding: 24px;
    gap: 24px;
}

#dashboard-container.active {
    display: grid;
    grid-template-columns: 260px 1fr;
}

/* Sidebar Layout */
.sidebar {
    height: 100%;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 8px;
}

.brand-icon {
    font-size: 28px;
    color: var(--accent-blue);
}

.brand h3 {
    font-size: 20px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 22px;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: var(--primary-color);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.user-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 14px;
    border: 1px solid var(--card-border);
}

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

.avatar {
    width: 38px;
    height: 38px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
}

.profile-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.profile-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
}

.btn-icon:hover {
    color: var(--accent-red);
    background: rgba(244, 67, 54, 0.1);
}

/* Main Content Area */
.main-content {
    height: 100%;
    overflow-y: auto;
    padding-right: 8px;
}

.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

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

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Metrics Dashboard */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrap span {
    font-size: 28px;
    color: #fff;
}

.bg-blue { background: linear-gradient(135deg, #2196f3, #00bcd4); }
.bg-green { background: linear-gradient(135deg, #4caf50, #8bc34a); }
.bg-purple { background: linear-gradient(135deg, #9c27b0, #e91e63); }
.bg-orange { background: linear-gradient(135deg, #ff9800, #ff5722); }

.metric-details h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
}

.metric-details p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Tabs Grid (Table & Form layout) */
.tab-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.table-section {
    padding: 24px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    min-width: 200px;
}

.search-box span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

/* Tables styling */
.table-wrapper {
    overflow-x: auto;
    flex-grow: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    border-bottom: 1px solid var(--card-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 14px;
}

tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.online {
    background: rgba(76, 175, 80, 0.1);
    color: var(--accent-green);
}

.status-badge.offline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.status-badge.busy {
    background: rgba(255, 152, 0, 0.1);
    color: var(--accent-orange);
}

/* Forms styling */
.form-section {
    padding: 24px;
}

.form-section h3 {
    margin-bottom: 8px;
}

.form-section p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.info-msg {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
}

.info-msg.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    color: var(--accent-green);
    display: block;
}

.info-msg.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    color: var(--accent-red);
    display: block;
}

.btn-delete {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    color: var(--accent-red);
    padding: 6px 12px;
    border-radius: 8px;
}

.btn-delete:hover {
    background: var(--accent-red);
    color: #fff;
}

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

/* Responsive details */
@media (max-width: 900px) {
    #dashboard-container.active {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .tab-grid {
        grid-template-columns: 1fr;
    }
}
