* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 0 2rem;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

nav a:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    color: #667eea;
}

.nav-logout {
    color: #ff6b6b;
}

.nav-logout:hover {
    background: rgba(255,107,107,0.1);
    color: #ff6b6b;
}

.btn-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 0.6rem 1.8rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.btn-nav:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4192 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.5);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255,255,255,0.9);
    margin-top: 3rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.hero {
    text-align: center;
    padding: 4rem 3rem;
    background: rgba(255,255,255,0.98);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102,126,234,0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.feature-card {
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(102,126,234,0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102,126,234,0.2);
    border-color: rgba(102,126,234,0.3);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-card h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.feature-card p {
    color: #777;
    font-size: 1rem;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

.auth-card {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
    font-weight: 800;
    text-shadow: none;
}

.auth-header p {
    color: #999;
    font-size: 1rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    font-weight: 600;
    color: #444;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.auth-form input {
    padding: 1rem 1.2rem;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s;
    width: 100%;
}

.auth-form input::placeholder {
    color: #bbb;
}

.auth-form input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 5px rgba(102,126,234,0.1);
    outline: none;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.auth-footer a {
    color: #667eea;
    font-weight: 700;
}

.auth-footer a:hover {
    color: #764ba2;
}

h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-weight: 700;
}

h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.card {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.card p {
    margin: 0.6rem 0;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card p:last-child {
    border-bottom: none;
}

.card p strong {
    min-width: 120px;
    color: #555;
    font-weight: 600;
}

.card p span {
    color: #333;
}

.form {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 5px rgba(102,126,234,0.1);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.form-inline select {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    min-width: 160px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    margin: 0.25rem;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102,126,234,0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108,117,125,0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(108,117,125,0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255,107,107,0.5);
}

.btn-block {
    width: 100%;
}

table {
    width: 100%;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
    margin-bottom: 1.5rem;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

th {
    padding: 1.2rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

tbody tr {
    transition: all 0.3s;
}

tbody tr:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
}

tbody tr:last-child td {
    border-bottom: none;
}

.alert {
    padding: 1.2rem 1.5rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.alert::before {
    font-size: 1.3rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #b1dfbb;
}

.alert-success::before {
    content: '✓';
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f1b0b7;
}

.alert-error::before {
    content: '✗';
}

.status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.status-processing {
    background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
    color: #004085;
}

.status-completed {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.status-closed {
    background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
    color: #383d41;
}

.reply {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-left: 4px solid #667eea;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.reply:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.reply-admin {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left-color: #ff9800;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.reply-header strong {
    color: #333;
}

.reply-body {
    white-space: pre-wrap;
    color: #555;
    line-height: 1.7;
}

.admin-nav {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-nav a {
    background: rgba(255,255,255,0.98);
    padding: 0.8rem 1.5rem;
    border-radius: 14px;
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    font-size: 0.95rem;
}

.admin-nav a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.4);
}

.required {
    color: #ff6b6b;
    font-weight: 700;
}

a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border: 1px solid rgba(102,126,234,0.2);
    border-radius: 10px;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.attachment-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

select[multiple] {
    min-height: 120px;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #999;
    margin-bottom: 1.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    margin: 0;
}

@media (max-width: 768px) {
    header {
        padding: 0 1rem;
    }
    
    nav {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    main {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 3rem 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.8rem 1rem;
    }
    
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .admin-nav {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.6rem;
    }
    
    .btn {
        display: block;
        width: 100%;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .form {
        padding: 1.5rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}
