:root {
    --bg-dark: #0f172a;
    --primary: #3b82f6;
    --accent: #8b5cf6;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dynamic Background */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 40%);
    z-index: 0;
    pointer-events: none;
}

/* Glass Component Standard */
.glass-card, .glass-header, .service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Login Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s;
    background: rgba(15, 23, 42, 0.8);
}

.overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    transform: translateY(0);
    transition: transform 0.3s;
}

.logo-area {
    margin-bottom: 2.5rem;
}

.logo-area i {
    color: var(--primary);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.logo-area h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.highlight {
    color: var(--primary);
    background: linear-gradient(120deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.8rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.error-msg {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 1rem;
    min-height: 1.25rem;
}

.error-msg.hidden {
    visibility: hidden;
}

.footer-info {
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Dashboard */
.dashboard {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.5s;
}

.dashboard.hidden {
    display: none;
    opacity: 0;
}

.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
    border-width: 0 0 1px 0;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    margin-left: 0.75rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    margin-right: 1rem;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 8px #4ade80;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: #ef4444;
}

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.category-section {
    margin-bottom: 4rem;
}

.category-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
}

.service-card .icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 1rem;
}

.service-card .details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.service-card .details p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.status {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.status.healthy {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.status.internal-only {
    color: #facc15;
    background: rgba(250, 204, 21, 0.1);
}

.status.maintenance {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

.card-grid.mini .domain-pill {
    background: rgba(255,255,255,0.03);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--glass-border);
    width: fit-content;
}

.card-grid.mini .domain-pill img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Internal Link Style */
.service-card.internal .icon-box {
    color: var(--accent);
}

.service-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
