/* 全局样式重置 */
* {
    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(180deg, #4A90E2 0%, #357ABD 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* 应用容器 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 登录页面容器 */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* 登录表单卡片 */
.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    border-radius: 20px 20px 0 0;
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.login-form h1 {
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.login-form h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* 登录图标 */
.login-icon {
    text-align: center;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 登录副标题 */
.login-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
    font-weight: 400;
    line-height: 1.5;
}

/* 背景装饰元素 */
.bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float-shapes 15s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 15%;
    left: 15%;
    animation-delay: 4s;
}

.shape-4 {
    width: 40px;
    height: 40px;
    bottom: 25%;
    right: 20%;
    animation-delay: 6s;
}

@keyframes float-shapes {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    25% { transform: translateY(-20px) rotate(90deg); opacity: 0.6; }
    50% { transform: translateY(-40px) rotate(180deg); opacity: 0.3; }
    75% { transform: translateY(-20px) rotate(270deg); opacity: 0.6; }
}

/* 按钮加载状态 */
.login-form .btn-primary .btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-form .btn-primary.loading .btn-text {
    display: none;
}

.login-form .btn-primary.loading .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form .btn-primary.loading {
    opacity: 0.9;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: pulse-loading 2s ease-in-out infinite;
}

.login-form .btn-primary.loading:hover {
    transform: none;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

@keyframes pulse-loading {
    0%, 100% {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    }
    50% {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
        box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
    }
}

/* 头部样式 */
.app-header {
    background: transparent;
    padding: 20px 0;
    text-align: center;
}

.header-content {
    max-width: 400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.user-info i {
    font-size: 18px;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

/* 查询面板 */
.query-section {
    margin-bottom: 20px;
}

.query-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 登录表单样式 */
.login-form .form-group {
    margin-bottom: 25px;
    position: relative;
}

.login-form .form-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.login-form .form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.login-form .form-group input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.login-form .form-group input::placeholder {
    color: #aaa;
    font-size: 14px;
}

.login-form .btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.login-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.login-form .btn-primary:hover::before {
    left: 100%;
}

.login-form .btn-primary:active {
    transform: translateY(0);
}

/* 错误消息样式 */
.login-form .error-message {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 通用表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group label i {
    color: #4A90E2;
    font-size: 16px;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    background: white;
    font-size: 16px;
    color: #333;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-select:focus {
    border-color: #4A90E2;
}

.form-actions {
    display: flex;
    gap: 12px;
}

.btn-primary {
    flex: 1;
    background: #4A90E2;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #357ABD;
    transform: translateY(-1px);
}

.btn-secondary {
    flex: 1;
    background: white;
    color: #4A90E2;
    border: 1px solid #4A90E2;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

/* 工资列表 */
.salary-list-section {
    margin-bottom: 20px;
}

.salary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.salary-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.salary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.salary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.salary-item-header .month {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.salary-item-header .net-salary {
    font-size: 16px;
    font-weight: 700;
    color: #4A90E2;
    background: #f8fbff;
    padding: 8px 12px;
    border-radius: 8px;
}

.salary-item-details {
    display: grid;
    gap: 20px;
}

.detail-section {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #4A90E2;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #4A90E2;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.highlight {
    background: #f0f8ff;
    margin: 8px -8px;
    padding: 12px 8px;
    border-radius: 6px;
    font-weight: 600;
    border-bottom: none;
}

.detail-row.final {
    background: #e8f5e8;
    border-left: 4px solid #28a745;
    font-size: 16px;
}

.detail-row .label {
    font-size: 14px;
    color: #666;
    flex: 1;
}

.detail-row .value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: right;
    min-width: 100px;
}

.detail-row.highlight .value,
.detail-row.final .value {
    color: #4A90E2;
    font-weight: 700;
}

.detail-row.final .value {
    color: #28a745;
}

.salary-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.salary-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.salary-item-subtitle {
    font-size: 14px;
    color: #666;
}

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

.salary-item-value {
    font-size: 18px;
    font-weight: 700;
    color: #4A90E2;
}

.salary-item-detail {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}



/* 消息提示 */
.message-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 20px 0;
}

.message-icon {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
}

.message-card.info .message-icon {
    background: #E3F2FD;
    color: #1976D2;
}

.message-card.error .message-icon {
    background: #FFEBEE;
    color: #D32F2F;
}

.message-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.message-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes smooth-spin {
    0% { 
        transform: rotate(0deg);
        border-top-color: white;
        border-right-color: rgba(255, 255, 255, 0.6);
    }
    25% {
        border-top-color: rgba(255, 255, 255, 0.6);
        border-right-color: white;
    }
    50% {
        transform: rotate(180deg);
        border-top-color: rgba(255, 255, 255, 0.3);
        border-right-color: rgba(255, 255, 255, 0.8);
    }
    75% {
        border-top-color: rgba(255, 255, 255, 0.8);
        border-right-color: rgba(255, 255, 255, 0.3);
    }
    100% { 
        transform: rotate(360deg);
        border-top-color: white;
        border-right-color: rgba(255, 255, 255, 0.6);
    }
}

.loading-content p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 480px) {
    /* 登录页面响应式 */
    .container {
        padding: 16px;
    }
    
    .login-form {
        padding: 30px 24px;
        border-radius: 16px;
    }
    
    .login-form h1 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .login-form .form-group {
        margin-bottom: 20px;
    }
    
    .login-form .form-group input {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .login-form .btn-primary {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* 工资查询页面响应式 */
    .main-content {
        padding: 16px;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .app-title {
        font-size: 20px;
    }
    
    .query-card,
    .summary-stats,
    .message-card {
        padding: 20px;
    }
    
    .salary-item {
        padding: 14px 16px;
    }
    
    .salary-item-value {
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    .main-content {
        max-width: 500px;
    }
    
    .header-content {
        max-width: 500px;
    }
}

/* 按钮禁用状态 */
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover,
.btn-secondary:disabled:hover {
    transform: none;
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    border-right-color: rgba(255, 255, 255, 0.6);
    animation: smooth-spin 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
    margin-right: 8px;
}

/* 隐藏滚动条但保持功能 */
.salary-list::-webkit-scrollbar {
    display: none;
}

.salary-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}