:root {
    --bg-deep: #050505;
    --accent-purple: #8a2be2;
    --accent-blue: #00d2ff;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

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

#app {
    height: 100%;
}

.screen {
    display: none;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    top: -200px;
    left: -200px;
    filter: blur(80px);
    animation: float 20s infinite alternate;
}

.orb-2 {
    background: radial-gradient(circle, rgba(0, 210, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    top: auto;
    bottom: -200px;
    left: auto;
    right: -200px;
    animation-delay: -5s;
}

@keyframes float {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 100px) scale(1.2); }
}

/* Login Card */
.login-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 50px 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 10;
}

.brand {
    margin-bottom: 40px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    margin: 0 auto 20px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.4);
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.brand p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 300;
}

/* Form Styles */
#login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-left: 5px;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 14px 18px;
    border-radius: 12px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
}

.btn-primary {
    position: relative;
    background: white;
    color: black;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s, background 0.3s;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary-sm {
    background: white;
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-sm:hover {
    background: #eee;
    transform: translateY(-1px);
}

.btn-logout {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
}

/* Homepage Styles */
.top-nav {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
}

.home-content {
    padding: 80px 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    margin-bottom: 60px;
}

.hero h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(to right, #fff, var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
}

.feature-card .icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* New Webapp Styles */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: rgba(138, 43, 226, 0.1);
    border-color: var(--accent-purple);
    color: white;
}

.tab-view { display: none; }
.tab-view.active { display: block; }

.table-container {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    overflow-x: auto;
}

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

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

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.copy-btn {
    background: var(--accent-blue);
    color: black;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.admin-panel-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
}

.input-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 25px;
}

.sub-list {
    margin-top: 20px;
}

.sub-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    margin-bottom: 10px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Mobile Optimizations */
@media (max-width: 600px) {
    .login-card {
        padding: 30px 20px;
        max-width: 90%;
    }

    h1 {
        font-size: 28px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .home-content {
        padding: 40px 20px;
    }

    .top-nav {
        padding: 15px 20px;
    }

    .feature-card {
        padding: 30px 20px;
    }
}
