/* 
 * 打印服务 - 样式表
 * 移动端简约大气高端UI风格
 */

/* 基础样式 */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --primary-light: #ebf5fb;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --accent-color: #e74c3c;
    --accent-dark: #c0392b;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
    --header-height: 60px;
    --nav-height: 50px;
    --footer-height: 60px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 布局 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    height: var(--header-height);
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 36px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.user-info {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.user-menu {
    position: absolute;
    top: 50px;
    right: 0;
    width: 200px;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px;
    display: none;
    z-index: 101;
}

.user-menu.show {
    display: block;
}

.user-menu-header {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.user-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.user-department {
    font-size: 0.85rem;
    color: var(--text-lighter);
}

.user-menu-list li {
    margin: 8px 0;
}

.user-menu-list a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.user-menu-list a:hover {
    background-color: var(--primary-light);
}

.app-nav {
    height: var(--nav-height);
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.app-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
}

.app-nav li {
    margin-right: 20px;
}

.app-nav a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

.app-nav a.active {
    color: var(--primary-color);
}

.app-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.app-content {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.app-footer {
    height: var(--footer-height);
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    font-size: 0.9rem;
}

/* 卡片样式 */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-body {
    padding: 20px;
}

/* 按钮样式 */
.btn, .submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
}

.btn:hover, .submit-btn:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
}

.btn-accent {
    background-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: var(--accent-dark);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* 文件上传样式 */
.file-upload-container {
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.file-label:hover, .file-label.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.file-label.has-file {
    border-style: solid;
    border-color: var(--primary-color);
}

.file-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.file-text {
    font-size: 1rem;
    color: var(--text-light);
}

.file-info {
    margin-top: 15px;
}

.file-preview {
    background-color: var(--primary-light);
    padding: 15px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 500;
    margin-bottom: 5px;
    word-break: break-all;
}

.file-size {
    font-size: 0.9rem;
    color: var(--text-lighter);
}

/* 首页样式 */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.welcome-header {
    margin-bottom: 20px;
}

.welcome-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

.feature-section {
    margin-bottom: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-light);
}

.quick-upload-section {
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.upload-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
}

.upload-form {
    max-width: 600px;
    margin: 0 auto;
}

/* 打印记录页面样式 */
.page-header {
    margin-bottom: 25px;
}

.page-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.page-description {
    color: var(--text-light);
}

.records-section {
    margin-bottom: 30px;
}

.records-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.records-table-container {
    overflow-x: auto;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
}

.records-table th, .records-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.records-table th {
    font-weight: 600;
    color: var(--text-color);
    background-color: #f9f9f9;
}

.record-row {
    cursor: pointer;
    transition: var(--transition);
}

.record-row:hover {
    background-color: var(--primary-light);
}

.record-row.selected {
    background-color: var(--primary-light);
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.success {
    background-color: rgba(46, 204, 113, 0.2);
    color: var(--success-color);
}

.status-badge.pending {
    background-color: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
}

.status-badge.failed {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
}

.record-details {
    display: none;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: #f9f9f9;
}

.record-details.show {
    display: block;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.details-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

.close-details {
    font-size: 1.5rem;
    color: var(--text-lighter);
    cursor: pointer;
}

.details-content {
    margin-bottom: 20px;
}

.detail-item {
    margin-bottom: 10px;
    display: flex;
}

.detail-label {
    font-weight: 500;
    width: 100px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--text-light);
}

.details-actions {
    display: flex;
    justify-content: flex-end;
}

.action-btn {
    padding: 8px 15px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.reprint-btn {
    background-color: var(--primary-color);
    color: white;
}

.reprint-btn:hover {
    background-color: var(--primary-dark);
}

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

.pagination ul {
    display: flex;
    align-items: center;
}

.pagination li {
    margin: 0 5px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.pagination a {
    background-color: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.pagination .active span {
    background-color: var(--primary-color);
    color: white;
}

.pagination .disabled span {
    color: var(--text-lighter);
    cursor: not-allowed;
}

.empty-records {
    padding: 50px 20px;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--text-lighter);
}

.empty-records p {
    margin-bottom: 20px;
    color: var(--text-light);
}

/* 个人资料页面样式 */
.profile-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .profile-section {
        grid-template-columns: 2fr 1fr;
    }
}

.profile-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-header {
    padding: 25px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar .avatar-placeholder {
    font-size: 2rem;
}

.profile-name h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-department, .profile-position {
    color: var(--text-light);
    font-size: 0.95rem;
}

.profile-body {
    padding: 25px;
}

.profile-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 576px) {
    .profile-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-lighter);
    margin-bottom: 5px;
}

.info-value {
    font-weight: 500;
}

.info-value.admin {
    color: var(--primary-color);
}

.stats-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    padding: 15px;
    text-align: center;
    border-radius: var(--radius);
    background-color: #f9f9f9;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 登录页面样式 */
.login-page {
    background-color: var(--primary-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.login-header {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.login-header .logo {
    justify-content: center;
}

.login-body {
    padding: 30px 25px;
    text-align: center;
}

.login-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.login-description {
    color: var(--text-light);
    margin-bottom: 30px;
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wechat-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background-color: #07C160;
    color: white;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.wechat-login-btn:hover {
    background-color: #06AD56;
    color: white;
}

.wechat-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.debug-login-btn {
    padding: 12px 20px;
    background-color: #f1c40f;
    color: #333;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.debug-login-btn:hover {
    background-color: #f39c12;
}

.login-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-lighter);
    font-size: 0.9rem;
}

/* 闪现消息样式 */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-message.success {
    background-color: rgba(46, 204, 113, 0.2);
    color: var(--success-color);
}

.flash-message.error {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
}

.flash-message.warning {
    background-color: rgba(243, 156, 18, 0.2);
    color: var(--warning-color);
}

.flash-message.info {
    background-color: rgba(52, 152, 219, 0.2);
    color: var(--primary-color);
}

.close-btn {
    font-size: 1.2rem;
    cursor: pointer;
}

/* 文件类型图标样式 */
.file-types-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.file-types-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.file-type-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.file-type-icon.pdf {
    background-color: #e74c3c;
}

.file-type-icon.doc {
    background-color: #3498db;
}

.file-type-icon.xls {
    background-color: #2ecc71;
}

.file-type-icon.ppt {
    background-color: #e67e22;
}

.file-type-icon.txt {
    background-color: #95a5a6;
}

.file-type-icon.img {
    background-color: #9b59b6;
}

.file-size-limit {
    text-align: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: var(--radius);
    color: var(--text-light);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .app-header {
        height: 50px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo img {
        height: 30px;
    }
    
    .app-nav {
        overflow-x: auto;
    }
    
    .app-nav ul {
        width: max-content;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .records-table th, .records-table td {
        padding: 10px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
} 