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

body {
    font-family: 'Montserrat', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #FFF5F5;
    color: #2D3436;
    line-height: 1.6;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Soft UI Evolution - Variables */
:root {
    --primary-color: #E8B4B8;
    --secondary-color: #A8D5BA;
    --cta-color: #D4AF37;
    --background-color: #FFF5F5;
    --text-color: #2D3436;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

.container {
    display: flex;
    min-height: 100vh;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: white;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(232, 180, 184, 0.2);
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Cormorant Garamond', serif;
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar {
    width: 220px;
    background-color: white;
    color: var(--text-color);
    padding-top: 60px;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-sm);
    border-right: 1px solid rgba(232, 180, 184, 0.2);
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    border-bottom: 1px solid rgba(232, 180, 184, 0.1);
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin-right: 10px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(232, 180, 184, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.main-content {
    flex: 1;
    padding: 80px 20px 20px 240px;
    animation: fadeIn 0.5s ease;
    background-color: var(--background-color);
}

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

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background-color);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 400px;
    animation: slideUp 0.5s ease;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 24px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.form-group input[type="checkbox"] {
    width: auto;
    display: inline-block;
    margin-right: 8px;
    transform: translateY(1px);
}

.form-group input[type="checkbox"] + label {
    display: inline-block;
    margin-bottom: 0;
    cursor: pointer;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(232, 180, 184, 0.2);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(232, 180, 184, 0.1);
    transform: translateY(-1px);
}

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

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background-color: #95c7a1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    min-width: auto;
}

.toolbar {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(232, 180, 184, 0.1);
}

.data-table th {
    background: linear-gradient(135deg, rgba(232, 180, 184, 0.05), rgba(168, 213, 186, 0.05));
    font-weight: 600;
    color: var(--text-color);
    position: sticky;
    top: 0;
    z-index: 10;
    font-family: 'Cormorant Garamond', serif;
}

.data-table tr {
    transition: var(--transition);
}

.data-table tr:hover {
    background-color: rgba(232, 180, 184, 0.05);
    transform: scale(1.01);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    color: var(--text-color);
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
    font-family: 'Cormorant Garamond', serif;
}

.card .number {
    font-size: 42px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.card.warning .number {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card.warning::before {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.card.success .number {
    background: linear-gradient(135deg, #27ae60, #219a52);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card.success::before {
    background: linear-gradient(90deg, #27ae60, #219a52);
}

.info-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.info-box h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.info-box ul {
    list-style-position: inside;
}

.info-box li {
    margin-bottom: 12px;
    line-height: 1.8;
    position: relative;
    padding-left: 20px;
}

.info-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(135deg, #27ae60, #219a52);
}

.badge-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.badge-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.badge-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 15px;
    display: block;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #f39c12;
    color: #856404;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.filter-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group label {
    font-weight: 600;
    color: #555;
}

.filter-group select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    min-width: 150px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.stat-card .change {
    font-size: 12px;
    margin-top: 5px;
}

.stat-card .change.positive {
    color: #27ae60;
}

.stat-card .change.negative {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        padding-left: 20px;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 20px;
    }
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.icon {
    font-size: 16px;
}

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

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 600;
    z-index: 4000;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.toast.success {
    background: linear-gradient(135deg, #27ae60, #219a52);
}

.toast.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.toast.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}
