:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --danger-color: #ff4d4f;
    --danger-hover: #ff7875;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --text-color: #000000d9;
    --text-secondary: #00000073;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --border-color: #f0f0f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5715;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
}

.login-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
}

.login-title {
    text-align: center;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 600;
}

/* Dashboard Layout */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: #001529;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
}

.main-content {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Tabs */
.tabs {
    display: flex;
    background: var(--card-bg);
    margin-bottom: 16px;
    border-radius: 4px;
    padding: 0 16px;
}

.tab-item {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-item:hover {
    color: var(--primary-color);
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.help-text {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    padding: 6px 15px;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
    user-select: none;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: var(--danger-hover);
    border-color: var(--danger-hover);
}

.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

.btn-warning {
    color: #fff;
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-sm {
    padding: 2px 8px;
    font-size: 12px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: #fafafa;
    font-weight: 600;
}

tr:hover td {
    background: #fafafa;
}

/* Utilities */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mt-4 { margin-top: 16px; }

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.error-msg {
    color: var(--danger-color);
    margin-top: 8px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Filters */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-bar .form-select {
    width: 200px;
}

/* Observer List in Table */
.observer-list {
    background-color: #f9f9f9;
    padding-left: 40px !important;
}

.observer-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.observer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding: 4px 0;
    border-bottom: 1px dashed #e8e8e8;
}

.observer-item:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
    .tabs {
        flex-wrap: wrap;
    }
    .tab-item {
        flex: 1;
        text-align: center;
        padding: 12px 8px;
    }
}
