/* ========================================
   AX41 Server Dashboard
   Minimalist · Functional · Refined
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #121214;
    --bg-tertiary: #1a1a1c;
    --bg-hover: #222224;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --accent: #e4e4e7;
    --accent-subtle: rgba(228, 228, 231, 0.1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ---------- Base Reset ---------- */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* ---------- Layout ---------- */
main {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 3rem 2rem 4rem !important;
}

/* ---------- Search - Hidden ---------- */
.search-container,
.search-wrapper {
    display: none !important;
}

/* ---------- Header ---------- */
header {
    margin-bottom: 3rem !important;
    padding-bottom: 1.5rem !important;
    border-bottom: 1px solid var(--border) !important;
}

header h1 {
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    letter-spacing: -0.02em !important;
    color: var(--text-primary) !important;
}

/* ---------- Widgets Row ---------- */
.widgets-container {
    display: grid !important;
    grid-template-columns: 1fr 280px !important;
    gap: 2rem !important;
    margin-bottom: 3rem !important;
}

/* ---------- Resources Widget ---------- */
.widget-resources {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.widget-resources .widget-label {
    font-size: 0.6875rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: var(--text-tertiary) !important;
    margin-bottom: 1rem !important;
}

/* Resource Grid */
.widget-resources .resources-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1px !important;
    background: var(--border) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid var(--border) !important;
}

.widget-resources .resource-item {
    background: var(--bg-secondary) !important;
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    transition: var(--transition) !important;
    position: relative !important;
}

.widget-resources .resource-item:hover {
    background: var(--bg-tertiary) !important;
}

.widget-resources .resource-label {
    font-size: 0.6875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: var(--text-tertiary) !important;
    font-weight: 500 !important;
}

.widget-resources .resource-value {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    font-variant-numeric: tabular-nums !important;
    letter-spacing: -0.02em !important;
}

/* Progress bars - minimal */
.widget-resources .resource-bar {
    height: 2px !important;
    background: var(--border) !important;
    border-radius: 1px !important;
    margin-top: 0.75rem !important;
    overflow: hidden !important;
}

.widget-resources .resource-bar-fill {
    height: 100% !important;
    background: var(--text-secondary) !important;
    border-radius: 1px !important;
    transition: width 0.5s ease !important;
}

/* Uptime - spans full width */
.widget-resources .resource-item:last-child {
    grid-column: 1 / -1 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.875rem 1.25rem !important;
}

.widget-resources .resource-item:last-child .resource-value {
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: var(--text-secondary) !important;
}

/* ---------- Weather Widget ---------- */
.widget-openmeteo {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    transition: var(--transition) !important;
}

.widget-openmeteo:hover {
    border-color: var(--border-hover) !important;
    background: var(--bg-tertiary) !important;
}

.widget-openmeteo .widget-label {
    font-size: 0.6875rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: var(--text-tertiary) !important;
}

.widget-openmeteo .weather-main {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: auto 0 !important;
}

.widget-openmeteo .weather-temp {
    font-size: 2.5rem !important;
    font-weight: 300 !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.03em !important;
}

.widget-openmeteo .weather-temp::after {
    content: '°' !important;
    font-weight: 300 !important;
    color: var(--text-tertiary) !important;
}

.widget-openmeteo .weather-icon {
    font-size: 2rem !important;
    opacity: 0.8 !important;
}

/* ---------- Service Groups ---------- */
.service-group {
    margin-top: 2.5rem !important;
}

.service-group h2 {
    font-size: 0.6875rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    color: var(--text-tertiary) !important;
    margin-bottom: 1rem !important;
    padding-left: 0.5rem !important;
}

/* ---------- Service Cards ---------- */
.service-card {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 1rem 1.25rem !important;
    transition: var(--transition) !important;
    position: relative !important;
    overflow: hidden !important;
}

.service-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.service-card:hover {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-hover) !important;
    transform: translateY(-1px) !important;
}

.service-card:hover::before {
    opacity: 1 !important;
}

/* Card content layout */
.service-card a {
    display: flex !important;
    align-items: center !important;
    gap: 0.875rem !important;
    text-decoration: none !important;
}

.service-icon {
    width: 2rem !important;
    height: 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.125rem !important;
    color: var(--text-secondary) !important;
    transition: var(--transition) !important;
    flex-shrink: 0 !important;
}

.service-card:hover .service-icon {
    color: var(--text-primary) !important;
}

.service-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.125rem !important;
    min-width: 0 !important;
}

.service-name {
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.service-description {
    font-size: 0.8125rem !important;
    color: var(--text-tertiary) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ---------- Status Cards (First Row) ---------- */
.service-group[data-group="Status"] {
    margin-top: 0 !important;
}

.service-group[data-group="Status"] .service-card {
    background: transparent !important;
    border: 1px solid var(--border) !important;
}

.service-group[data-group="Status"] .service-card:hover {
    background: var(--bg-secondary) !important;
}

/* ---------- System Cards - Icon Only ---------- */
.service-group[data-group="System"] .service-card {
    text-align: center !important;
    padding: 1.5rem 1rem !important;
}

.service-group[data-group="System"] .service-card a {
    flex-direction: column !important;
    gap: 0.625rem !important;
}

.service-group[data-group="System"] .service-icon {
    width: auto !important;
    height: auto !important;
    font-size: 1.5rem !important;
}

.service-group[data-group="System"] .service-text {
    align-items: center !important;
}

.service-group[data-group="System"] .service-name {
    font-size: 0.875rem !important;
}

.service-group[data-group="System"] .service-description {
    font-size: 0.75rem !important;
}

/* ---------- Bookmarks - Minimal Icons ---------- */
.service-group[data-group="Bookmarks"] {
    margin-top: 3rem !important;
}

.service-group[data-group="Bookmarks"] h2 {
    display: none !important;
}

.service-group[data-group="Bookmarks"] .service-card {
    aspect-ratio: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    padding: 0 !important;
}

.service-group[data-group="Bookmarks"] .service-card:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--border) !important;
    transform: translateY(-2px) !important;
}

.service-group[data-group="Bookmarks"] .service-card a {
    justify-content: center !important;
}

.service-group[data-group="Bookmarks"] .service-icon {
    font-size: 1.5rem !important;
    width: auto !important;
    height: auto !important;
    color: var(--text-tertiary) !important;
}

.service-group[data-group="Bookmarks"] .service-card:hover .service-icon {
    color: var(--text-primary) !important;
}

.service-group[data-group="Bookmarks"] .service-name,
.service-group[data-group="Bookmarks"] .service-description {
    display: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .widgets-container {
        grid-template-columns: 1fr !important;
    }
    
    .widget-resources .resources-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .widget-resources .resource-item:last-child {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 640px) {
    main {
        padding: 1.5rem !important;
    }
    
    .widget-resources .resources-row {
        grid-template-columns: 1fr !important;
    }
}
