:root {
    --bg-dark: #070913;
    --card-bg: rgba(13, 17, 39, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.45);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.4);
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-inter);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Background decorative glows */
.glow-bg {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.25;
    pointer-events: none;
}

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

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    backdrop-filter: blur(16px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-family: var(--font-outfit);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.header h1 {
    font-family: var(--font-outfit);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.1rem;
}

/* Badges & Dots */
.status-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-secondary);
}

.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success-glow);
}

.status-dot.offline {
    background-color: var(--error);
    box-shadow: 0 0 10px var(--error-glow);
}

.status-dot-inline {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    margin-right: 0.4rem;
}

.status-dot-inline.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success-glow);
}

.status-dot-inline.offline {
    background-color: var(--error);
    box-shadow: 0 0 8px var(--error-glow);
}

.pulsing {
    animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 4.5fr 7.5fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.right-panel {
    height: 100%;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    backdrop-filter: blur(16px);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card h2 {
    font-family: var(--font-outfit);
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.info-item:last-child {
    border: none;
    padding-bottom: 0;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    font-weight: 500;
    color: var(--text-primary);
}

.info-value.highlight {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input, textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: var(--font-inter);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

textarea {
    resize: none;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.9rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

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

.btn-icon {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.icon {
    width: 1.2rem;
    height: 1.2rem;
}

.icon-refresh {
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 0.5s ease;
}

.btn-icon:hover .icon-refresh {
    transform: rotate(180deg);
}

/* Records display */
.records-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.records-container::-webkit-scrollbar {
    width: 6px;
}

.records-container::-webkit-scrollbar-track {
    background: transparent;
}

.records-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Loading & Empty State */
.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.spinner {
    width: 1.8rem;
    height: 1.8rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Record Item */
.record-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    animation: item-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes item-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.record-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.3rem;
}

.record-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

.record-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.5rem;
}

.btn-delete {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
}

/* Animations */
.animate-fade-in {
    animation: fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slide-up {
    animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
