/*
====================================
1. CSS RESET & GLOBAL STYLES
====================================
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 🚀 KEY FIX 1: The utility class for Hiding Content (used by status-box) */
.hidden {
    display: none !important;
}

/*
====================================
2. COLOR THEMES (Variables)
====================================
*/

/* Light Mode Variables (Default) */
body.light-mode {
    --bg-color: #f7f9fc;
    --text-color: #1f2937;
    --sidebar-bg: #ffffff;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --nav-hover-bg: #f3f4f6;
    --nav-active-bg: #eef2ff; /* Light purple for active state */
}

/* Dark Mode Variables */
body:not(.light-mode) {
    --bg-color: #1f2937;
    --text-color: #f3f4f6;
    --sidebar-bg: #111827;
    --header-bg: #111827;
    --card-bg: #111827;
    --border-color: #374151;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --nav-hover-bg: #374151;
    --nav-active-bg: #334155; /* Dark blue-gray for active state */
}

/*
====================================
3. LAYOUT STRUCTURE
====================================
*/

.app-header {
    background: var(--header-bg);
    color: var(--text-color);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header .cloud-logo {
    height: 30px; 
    margin-right: 1rem;
}

.app-header h1 {
    flex-grow: 1;
}

.app-layout {
    display: flex;
    flex: 1; 
}

.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 1rem 0;
    flex-shrink: 0;
}

.content-area {
    flex-grow: 1;
    padding: 2rem;
    background-color: var(--bg-color);
    position: relative;
}

/*
====================================
4. SIDEBAR NAVIGATION
====================================
*/

.service-nav h2 {
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1.5rem 0.5rem 1.5rem;
    margin-top: 1.5rem;
    opacity: 0.7;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background-color: var(--nav-hover-bg);
}

.nav-item.active {
    background-color: var(--nav-active-bg);
    border-left-color: var(--primary-color);
    font-weight: 600;
    color: var(--primary-color);
}

/*
====================================
5. CONTENT ELEMENTS (Visibility, Cards, Buttons, Stats)
====================================
*/

/* 🚀 KEY FIX 2: Hide all content panels by default using CSS */
.cloud-service {
    display: none;
    width: 100%;
    min-height: 500px;
}

/* 🚀 KEY FIX 3: Show the specific content panel that has the 'active-content' class */
.cloud-service.active-content {
    display: block;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1rem;
}

/* Buttons and Toggles */
.primary-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.primary-button:hover {
    background-color: var(--primary-hover);
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.2s;
    padding: 0.5rem;
    border-radius: 50%;
}

.icon-button:hover {
    color: var(--primary-color);
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    text-align: center;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.6;
}

/* Form Elements */
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--sidebar-bg);
    color: var(--text-color);
    resize: vertical;
    font-family: inherit;
}

/* Status Message */
.status-box {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background-color: #10b981; 
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 20;
    font-weight: 500;
}