/* 全局重置与变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(145deg, #f0f7ff 0%, #e6f0fa 100%);
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.5;
}

/* 登录页特殊背景 */
.login-bg {
    background: linear-gradient(135deg, #0b2b5c 0%, #123b6e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* 首页大字 */
.login-hero {
    text-align: center;
    margin-bottom: 3rem;
}
.login-hero h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 4px 12px rgba(0,20,50,0.3);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.login-hero .subhead {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    display: inline-block;
    padding-bottom: 0.6rem;
}

/* 登录双卡片容器 */
.login-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}

/* 卡片通用设计 */
.login-card {
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 35px -8px rgba(0,35,70,0.25);
    padding: 2rem 2rem 1.8rem;
    width: 360px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 45px -8px rgba(0,55,100,0.35);
}

.client-card {
    border-top: 6px solid #2a7de1;
}
.maintain-card {
    border-top: 6px solid #0f4c81;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.8rem;
}
.card-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0a3144;
    margin: 0;
}
.badge {
    background: #eef7ff;
    color: #1a5c9e;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #3a5a78;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e1ecf5;
    border-radius: 16px;
    font-size: 0.95rem;
    transition: all 0.15s;
    background: #fafdff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #2a7de1;
    outline: none;
    box-shadow: 0 0 0 4px rgba(42,125,225,0.1);
    background: white;
}

/* 按钮 */
.btn {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.15s;
    background: white;
    color: #1e4660;
    border: 1.5px solid transparent;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.btn-primary {
    background: linear-gradient(145deg, #1e5cb3, #184a94);
    color: white;
    border: none;
}
.btn-primary:hover {
    background: linear-gradient(145deg, #236bca, #1c54a3);
    box-shadow: 0 8px 18px rgba(24,74,148,0.25);
}
.btn-secondary {
    background: linear-gradient(145deg, #0e4b6e, #0a3d59);
    color: white;
}
.btn-secondary:hover {
    background: linear-gradient(145deg, #12638f, #0e4b6e);
    box-shadow: 0 8px 18px rgba(10,61,89,0.25);
}
.btn-block {
    width: 100%;
}
.btn-outline {
    background: transparent;
    border: 1.5px solid #2a7de1;
    color: #2a7de1;
}

.card-footer {
    margin-top: 1.8rem;
    font-size: 0.75rem;
    color: #6b89a0;
    text-align: center;
    border-top: 1px solid #e7edf3;
    padding-top: 1.2rem;
}

/* 登录页footer */
.login-footer {
    margin-top: 4rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    text-align: center;
}

/* ----- 内部功能页面样式（卡片、仪表盘、表格）----- */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.8rem 2rem;
}
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.app-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0a3144;
    letter-spacing: -0.5px;
}
.user-area {
    background: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 6px 12px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.logout-link {
    color: #e15554;
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    background: #ffeeee;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: 24px;
    padding: 1.6rem;
    box-shadow: 0 8px 20px -8px rgba(0,45,80,0.08);
    border: 1px solid rgba(255,255,255,0.6);
    backdrop-filter: blur(4px);
}
.stat-number {
    font-size: 2.6rem;
    font-weight: 700;
    color: #1f5e9e;
    line-height: 1;
}
.stat-label {
    color: #557c9a;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 工单表格 */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 24px;
    padding: 1.2rem;
    box-shadow: 0 10px 25px -10px rgba(0,0,0,0.04);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: 1rem 0.8rem;
    background: #f4fafd;
    color: #0d4b6e;
    font-size: 0.85rem;
    font-weight: 600;
}
td {
    padding: 1rem 0.8rem;
    border-bottom: 1px solid #eaf0f5;
    vertical-align: middle;
}
.status-badge {
    display: inline-block;
    padding: 0.2rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f9ff;
    color: #1d72b8;
}
.status-pending { background: #fff3e0; color: #b85b14; }
.status-processing { background: #e3f2fd; color: #0a68b4; }
.status-completed { background: #e8f5e9; color: #1e7a44; }

/* 红色进度文字 */
.progress-red {
    color: #c62828 !important;
    font-weight: 600;
    background: rgba(198,40,40,0.04);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* 图片预览区 */
.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.8rem;
}
.photo-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: 0.1s;
}
.photo-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,60,130,0.15);
}

/* 全屏预览模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 30px black;
}
.modal-close {
    position: absolute;
    top: 20px; right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* 响应式 */
@media (max-width: 768px) {
    .login-container { flex-direction: column; align-items: center; }
    .app-header { flex-direction: column; align-items: start; gap: 1rem; }
    .card-grid { grid-template-columns: 1fr; }
}