:root {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --danger: #ef4444;
    --glass: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    z-index: 1000;
}

.sidebar h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
    letter-spacing: -0.025em;
}

.nav-link {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.main-content {
    margin-left: 260px;
    padding: 2.5rem 3rem;
    min-height: 100vh;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.25rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

table {
    width: 100%;
    border-spacing: 0;
    margin-top: 1rem;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
    transition: background 0.2s;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

input,
select {
    background: #0f172a;
    border: 1px solid var(--border);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

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

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: var(--card-bg);
    min-width: 180px;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Scrolling Ticker Styles */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background-color: #0f172a;
    padding: 10px 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ticker-move {
    display: flex;
    width: max-content;
    animation: ticker 30s linear infinite;
    flex-wrap: nowrap;
}

.ticker-wrap:hover .ticker-move {
    animation-play-state: paused;
}

.ticker-item {
    display: flex;
    align-items: center;
    padding: 0 2rem;
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticker-label {
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 0.5rem;
}

.ticker-sales {
    color: #10b981;
}

.ticker-expenses {
    color: #f59e0b;
}

.ticker-balance {
    color: #6366f1;
}

.ticker-value {
    color: #ffffff;
    font-weight: 700;
    margin-left: 0.25rem;
}

.ticker-divider {
    color: #334155;
    margin: 0 1rem;
}

.ticker-divider-major {
    color: #334155;
    margin: 0 2rem;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}