:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --primary: #10b981; /* Emerald */
    --primary-glow: rgba(16, 185, 129, 0.2);
    --secondary: #6366f1; /* Indigo */
    --accent: #f59e0b; /* Amber */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 40px;
    padding-left: 10px;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.nav-item i {
    font-size: 1.2rem;
}

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

.nav-item.active {
    background-color: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.automation-status {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 15px;
    margin-top: auto;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.next-task small {
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.next-task p {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Main Content Styles */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: 40px;
}

.top-bar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    z-index: 50;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 20px;
    width: 300px;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 100%;
}

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

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 10px;
}

.avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Dashboard Grid */
#tab-content-container {
    padding: 30px 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-change {
    font-size: 0.85rem;
}

.stat-change.up { color: var(--primary); }
.stat-change.down { color: #ef4444; }

.dashboard-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid var(--border);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -24px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 2px solid var(--border);
}

.timeline-item.done::after {
    background-color: var(--primary);
    border-color: var(--primary);
}

.timeline-item.active::after {
    background-color: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.timeline-item .time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-item .desc {
    font-size: 0.95rem;
}

/* Alerts */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alert-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.03);
}

.alert-item i { font-size: 1.2rem; }
.alert-item.warning i { color: var(--accent); }
.alert-item.error i { color: #ef4444; }
.alert-item.success i { color: var(--primary); }

.alert-msg {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive Hide Section */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

/* Forms & UI Elements */
.form-group {
    margin-bottom: 20px;
}

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

.input-field {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 15px;
    color: white;
    outline: none;
    transition: var(--transition);
}

.input-field:focus {
    border-color: var(--primary);
    background-color: rgba(15, 23, 42, 0.8);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #059669;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Results Display */
.results-container {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.platform-card {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.platform-card h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--primary);
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
}
