/* 现代化报修工单系统样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f5f6fa;
    --text-color: #333;
    --card-background: #ffffff;
}

/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f6fa;
}

/* 基础样式 */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    font-weight: 500;
    line-height: 1.2;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #2980b9;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-danger {
    color: #fff;
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

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

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #3498db;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 卡片样式 */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

/* 公告卡片样式 */
.notice-container {
    max-width: 500px;
    margin: 8px auto;
    padding: 0 15px;
}

.notice-card {
    background: #fff;
    padding: 4px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0;
    transition: all 0.3s ease;
    border-left: 3px solid #007bff;
}

.notice-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
}

.notice-icon {
    color: #007bff;
    flex-shrink: 0;
}

.notice-icon i {
    font-size: 12px;
}

.notice-content {
    color: #333;
    line-height: 1;
    font-size: 12px;
    flex-grow: 1;
    margin: 0;
    padding: 0;
}

/* 辅助类 */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.p-3 {
    padding: 1rem;
}

/* 响应式布局 */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

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

.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
}

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

.nav-menu li {
    margin-bottom: 10px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: rgba(255,255,255,0.2);
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: var(--background-color);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
}

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

.login-container {
    width: 400px;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
}

.ticket-form, .search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ticket-table th, .ticket-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.ticket-table th {
    background-color: var(--primary-color);
    color: white;
}

/* 添加模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--card-background);
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal .close:hover {
    color: var(--text-color);
}

/* 工单详情页面样式 */
.ticket-detail-section {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ticket-info {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

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

.ticket-image img {
    max-width: 100%;
    border-radius: 5px;
    margin-top: 10px;
}

.ticket-replies {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
}

.reply {
    background-color: white;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 10px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket-actions {
    margin-bottom: 20px;
}

/* 主页登录选项 */
.login-options {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.login-options a {
    flex-grow: 1;
    text-align: center;
    text-decoration: none;
    padding: 15px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}
