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

body {
    background-color: #11111b; 
    color: #cdd6f4;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: #181825;
    border-right: 1px solid #313244;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 24px 30px;
    gap: 12px;
}

.logo .icon {
    font-size: 24px;
}

.logo h2 {
    font-size: 18px; 
    font-weight: 700;
    color: #b4befe;
    letter-spacing: 0.5px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #a6adc8;
    text-align: left;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px; 
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit; 
}

.nav-btn:hover {
    background-color: #313244;
    color: #cdd6f4;
}

.nav-btn.active {
    background-color: #313244;
    color: #b4befe;
    border-left: 4px solid #b4befe;
}

.sidebar-footer {
    padding: 0 24px;
}

.btn-lang {
    width: 100%;
    background-color: #313244;
    color: #cdd6f4;
    border: 1px solid #45475a;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: 0.2s;
}

.btn-lang:hover {
    background-color: #45475a;
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
    background-color: #11111b;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.topbar p {
    color: #a6adc8;
    font-size: 14px;
}

.status-badge {
    background-color: rgba(166, 227, 161, 0.1);
    color: #a6e3a1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(166, 227, 161, 0.2);
    transition: 0.3s;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #a6e3a1;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(166, 227, 161, 0.7);
    animation: pulse 2s infinite;
    transition: 0.3s;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(166, 227, 161, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(166, 227, 161, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(166, 227, 161, 0); }
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background-color: #1e1e2e;
    border: 1px solid #313244;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kpi-card h3 {
    color: #a6adc8;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.highlight-green { color: #a6e3a1; }
.highlight-purple { color: #cba6f7; }
.highlight-yellow { color: #f9e2af; }
.highlight-red { color: #f38ba8; }

.kpi-sub {
    color: #6c7086;
    font-size: 12px;
}

/* Chart Card */
.chart-card {
    background-color: #1e1e2e;
    border: 1px solid #313244;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.time-filter {
    background-color: #11111b;
    color: #cdd6f4;
    border: 1px solid #313244;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.canvas-container {
    height: 350px;
    width: 100%;
}

/* Data Table Styling */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    color: #a6adc8;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid #313244;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #313244;
    font-size: 14px;
}

.data-table tr:hover {
    background-color: rgba(49, 50, 68, 0.5);
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-up {
    background-color: rgba(166, 227, 161, 0.1);
    color: #a6e3a1;
    border: 1px solid rgba(166, 227, 161, 0.2);
}

.badge-down {
    background-color: rgba(243, 139, 168, 0.1);
    color: #f38ba8;
    border: 1px solid rgba(243, 139, 168, 0.2);
}

/* Alerts Tab Styling */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.alert-card {
    background-color: #1e1e2e;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 4px solid transparent;
}

.alert-card.critical {
    border-left-color: #f38ba8;
}

.alert-card.warning {
    border-left-color: #f9e2af;
}

.alert-icon {
    font-size: 24px;
}

.alert-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.alert-info p {
    margin: 0;
    font-size: 13px;
    color: #a6adc8;
}

/* Settings Tab Styling */
.settings-card {
    max-width: 600px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #cdd6f4;
}

.setting-desc {
    font-size: 13px;
    color: #a6adc8;
    margin-bottom: 12px;
}

.settings-input {
    width: 100%;
    background-color: #11111b;
    border: 1px solid #313244;
    color: #cdd6f4;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.settings-input:focus {
    border-color: #b4befe;
}

.btn-primary {
    background-color: #b4befe;
    color: #11111b;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background-color: #cba6f7;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #313244;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #cdd6f4;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #a6e3a1;
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #11111b;
}
