/* Main CSS for HermesMadeSimple Dashboard
   Central stylesheet - easy to modify colors, fonts, layouts
   All dashboard pages use this file for consistent styling */

/* ===== CSS Variables (Easy Theming) ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --text-accent: #667eea;
    --success-color: #00ff00;
    --warning-color: #ffaa00;
    --danger-color: #ff4444;
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Layout ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Header ===== */
.header {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 3em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.header .subtitle {
    font-size: 1.2em;
    color: var(--text-secondary);
}

/* ===== Navigation ===== */
.nav-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid var(--card-border);
}

.nav-sidebar h3 {
    color: var(--text-accent);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.nav-sidebar a {
    display: block;
    padding: 10px 15px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: var(--transition);
}

.nav-sidebar a:hover {
    background: var(--card-bg);
    color: var(--text-accent);
}

/* ===== Cards ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 25px;
    transition: var(--transition);
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--text-accent);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.card h2 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Grid Layouts ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===== Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 5px;
}

/* ===== Status Indicators ===== */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.online {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: var(--danger-color);
}

.status-dot.warning {
    background: var(--warning-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}

th {
    background: var(--card-bg);
    color: var(--text-accent);
    font-weight: 600;
}

td {
    color: var(--text-primary);
}

/* ===== Code Blocks ===== */
pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

code {
    font-family: 'Courier New', monospace;
    color: var(--text-accent);
}

/* ===== Iframe Container ===== */
.iframe-container {
    width: 100%;
    height: 800px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .nav-sidebar {
        display: none;
    }
    
    .container {
        padding: 10px;
    }
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-accent { color: var(--text-accent); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }
