* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    height: 100vh;
    padding: 20px;
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 10px;
    margin-right: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 15px;
    border: 2px solid transparent;
}

.nav-links a:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.nav-links a.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    color: #666;
    font-size: 14px;
}

.btn-logout {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-logout:hover {
    border-color: #1976d2;
    color: #1976d2;
}

/* Tabs */
.tab-nav {
    background: white;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.tab-btn.active {
    background: #1976d2;
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    flex: 1;
    min-height: 0;
}

.tab-content.active {
    display: block;
    overflow-y: auto;
}

/* Toolbar */
.toolbar {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    padding: 8px 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #555;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    border-color: #aaa;
}

.btn-primary {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.btn-primary:hover {
    background: #1565c0;
}

.btn-danger {
    color: #d32f2f;
    border-color: #ffcdd2;
}

.btn-danger:hover {
    background: #ffebee;
    border-color: #d32f2f;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    word-break: break-word;
}

.data-table th {
    background: #fafafa;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f5f9ff;
}

.data-table .actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.status-active {
    color: #2e7d32;
    font-weight: 500;
}

.status-inactive {
    color: #d32f2f;
    font-weight: 500;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #e3f2fd;
    color: #1976d2;
    margin: 1px 2px;
}

.tag-owner {
    background: #e8f5e9;
    color: #2e7d32;
}

.tag-shared {
    background: #fff3e0;
    color: #e65100;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 480px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 0 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Modal form */
.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-body .form-group label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    font-weight: 500;
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
    border-color: #1976d2;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.loading-overlay .spinner {
    width: 40px; height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
.loading-overlay .loading-text {
    margin-top: 14px;
    font-size: 15px;
    color: #555;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}
