* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #ffffff;
    min-height: 100vh;
}

.admin-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.admin-header h1 {
    font-size: 28px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: linear-gradient(90deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.admin-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 25px;
}

.admin-sidebar {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    padding: 12px 16px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    color: #60a5fa;
    border-left: 3px solid #3b82f6;
}

.admin-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.admin-section {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.section-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

.form-group input[type="number"],
.form-group input[type="text"] {
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.form-group input[readonly] {
    background: rgba(59, 130, 246, 0.05);
    cursor: not-allowed;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(59, 130, 246, 0.15);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-size: 14px;
    color: #94a3b8;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.data-table tr:hover td {
    background: rgba(59, 130, 246, 0.05);
}

.data-table input[type="number"],
.data-table input[type="text"] {
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    width: 100%;
}

.data-table select {
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-update {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
}

.btn-update:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.equipment-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.equipment-control-item {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.equipment-control-item:hover {
    background: rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
}

.equipment-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.equipment-icon {
    font-size: 32px;
}

.equipment-name {
    font-size: 16px;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: 0.4s;
    border-radius: 32px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: #94a3b8;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(90deg, #10b981, #059669);
    border-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(28px);
    background: #ffffff;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(90deg, #10b981, #059669);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 1200px) {
    .admin-content {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-item {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .admin-container {
        padding: 10px;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .equipment-control-grid {
        grid-template-columns: 1fr;
    }
}
