/* ůɫ������ɫ */
:root {
  --primary-color: #ff7f50;       /* ɺ���� */
  --secondary-color: #ffa07a;     /* ǳɺ���� */
  --hover-color: #ff6347;         /* ���Ѻ� */
  --bg-color: #fff5ee;            /* ���ǰ� */
  --text-color: #333;             /* ��������ɫ */
  --dropdown-bg: #fff;            /* �����˵����� */
}

/* ������ʽ���� */
body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: var(--bg-color);
}

/* ���������� */
.nav {
  background: var(--primary-color);
  padding: 0 2rem !important;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(255,127,80,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  height: 56px; /* �����̶��߶� */
}

/* ������������ */
.nav a {
  color: white;
  text-decoration: none;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

/* �����˵������Ż� */
.dropdown {
  position: relative;
  margin: 0 1rem;
  /* ����������� */
  display: flex;
  align-items: center;
  height: 100%;
}

/* ������ť��ֱ���� */
.dropbtn {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1.5rem !important;
}

.dropbtn::after {
  font-size: 0.6em;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

/* �����˵���ͷλ�õ��� */
.dropbtn::after {
  right: 0.3rem; /* ��0.5rem����Ϊ0.3rem */
  top: 100%; /* ��50%����Ϊ80% */
}

/* �����˵����� */
.dropdown-content {
  display: none;
  position: absolute;
  top: 2rem;
  left: 0;
  background: var(--dropdown-bg);
  min-width: 120px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-radius: 6px;
  overflow: hidden;
  z-index: 999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* �����˵�λ�þ�׼���� */
.dropdown-content {
  top: calc(100% - 3px) !important; /* ����΢��3px */
  left: 0;
  margin-top: 0;
  border-top: 2px solid var(--primary-color); /* �����뵼��������ɫ�ν� */
}

/* �����˵��� */
.dropdown-content a {
  color: var(--text-color);
  padding: 1rem;
  display: block;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

/* ��ͣЧ�� */
.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.nav a:hover,
.dropdown:hover .dropbtn {
  background: var(--hover-color);
}

.dropdown-content a:hover {
  background: var(--secondary-color);
  color: white;
  padding-left: 1.5rem;
}

/* �״ָ̬ʾ */
.nav a:hover::after {
  content: "";
  position: absolute;
  bottom: -3px; /* ��0����Ϊ-3px */
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: rgba(255,255,255,0.8);
}

/* �Ҳ��û���Ϣ */
.nav span[style*="float:right"] {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ��Ӧʽ���� */
@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    padding: 1rem;
  }
  
  .dropdown {
    width: 100%;
    margin: 0;
    height: auto;
  
  .dropbtn {
    width: 100%;
    text-align: left;
  }
  
  .dropdown-content {
    position: static;
    box-shadow: none;
    top: 100% !important;
  }
  }
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    border: 1px solid #cbd5e0; /* ��ұ߿� */
    padding: 12px;
    text-align: left;
}

th {
    background: #ebf8ff;  /* �������� */
    color: #2b6cb0;       /* ������� */
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

input[type="text"], 
select {
    padding: 8px;
    width: 250px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus, 
select:focus {
    border-color: #4299e1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(66,153,225,0.2);
}

.btn {
    background: #4299e1;  /* ����ť - ������ */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
}

.btn:hover {
    background: #3182ce;  /* ������ͣ */
    transform: translateY(-1px);
}

.btn-export {
    background: #f6ad55;  /* ������ť - ����ɫů�� */
}

.btn-export:hover {
    background: #f6993f;  /* ��������ͣ */
}

.alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.alert-info {
    background: #ebf8ff;  /* ��ɫ������ */
    border: 1px solid #bee3f8; /* ǳ���߿� */
    color: #2b6cb0;
}

.text-right {
    text-align: right;
}

/* ������ůɫ������ʽ */
tr:hover {
    background: #f0fff4 !important;  /* ��ǳ��ů����ͣ */
}

tr:nth-child(even) {
    background: #f8fafc;  /* ��������ɫ�� */
}

/* ��ůɫ���ص� */
.highlight-cold {
    color: #2b6cb0;
    background: #ebf8ff;
}

.highlight-warm {
    color: #c05621;
    background: #fff5f5;
}

/* ������ʽ */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 2rem 0;
	width:95%;
}

.form-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ��ť��ʽ */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
   /* background: var(--secondary-color);*/
   background: var(--success-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-add { 
    background: #28a745; 
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
}
.btn-add:hover { 
    background: #218838;
    transform: translateY(-1px);
}
.btn-edit { background: #ffc107; color: black }
.btn-delete { background: #dc3545; color: white }
.btn-import { 
    background: #4299e1; 
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
}
.btn-import:hover { 
    background: #3182ce;
    transform: translateY(-1px);
}

/* 一键删除按钮样式 */
.btn-delete-all {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
}

.btn-delete-all:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* ״̬��ť������ʽ */
.btn-status {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: default;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* ����״̬����ɫϵ�� */
.btn-status-active {
    background: #48bb78;
    color: white;
}
.btn-status-active:hover {
    background: #38a169;
}

/* ����״̬����ɫϵ�� */
.btn-status-inactive {
    background: #a0aec0;
    color: white;
}
.btn-status-inactive:hover {
    background: #718096;
}

/* �����״̬����ɫϵ�� */
.btn-status-pending {
    background: #ecc94b;
    color: #744210;
}
.btn-status-pending:hover {
    background: #d69e2e;
}

/* �쳣״̬����ɫϵ�� */
.btn-status-error {
    background: #9f7aea;
    color: white;
}
.btn-status-error:hover {
    background: #805ad5;
}

/* ��ͼ�����ǿ��ʽ */
.btn-status > svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ��ҳ�Ǳ�����ʽ */
.dashboard-title {
    text-align: center;
    color: #2b6cb0;
    margin: 2rem 0;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    padding: 2rem;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.bg-blue { background: linear-gradient(135deg, #4299e1, #2b6cb0); }
.bg-green { background: linear-gradient(135deg, #48bb78, #2f855a); }
.bg-orange { background: linear-gradient(135deg, #f6ad55, #ed8936); }

.stat-icon {
    font-size: 3rem;
    margin-right: 1.5rem;
}

.stat-content h3 {
    font-size: 2.3rem;
    padding: 2rem;
    font-weight: bold;
}

.stat-number {
    font-size: 1.5rem;
}

.stat-number1 {
    font-size: 1.2rem;
}

.stat-number2 {
    font-size: 1.2rem;
    padding: 0 0 0 2rem;
}

/* ʱ������ʽ */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 5px;
    width: 15px;
    height: 15px;
    background: #4299e1;
    border-radius: 50%;
    border: 3px solid #ebf8ff;
}

.timeline-content {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #4299e1;
}

.timeline-time {
    display: block;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ������ɫ����ɫ */
.bg-purple {
  background: linear-gradient(135deg, #9f7aea, #6b46c1);
}

/* ͼ��������ʽ */
#chartContainer {
  position: relative;
  margin-top: 1rem;
}

.loading-text {
  text-align: center;
  color: rgba(255,255,255,0.8);
  padding: 2rem;
  font-size: 0.9em;
}

/* ͼ����ʾ����ʽ */
.chartjs-tooltip {
  background: rgba(0,0,0,0.8) !important;
  border-radius: 4px !important;
  padding: 0.5rem 1rem !important;
}

/* ͼ��������ɫ */
.chartjs-legend text {
  fill: white !important;
}

/* ��¼ҳ��ʽ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;  
    background: var(--bg-color);
}

.login-box {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    width: 100%;  
    max-width: 100%; 
    margin: 0 1rem;  
}

.login-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.login-title i {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    color: var(--hover-color);
}

.form-group label {
    color: #666;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 1rem;
}

.form-control {
    width: 90% !important;
    padding: 0.8rem 1.2rem !important;
    border: 2px solid #eee !important;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255,127,80,0.15) !important;
}

.alert-danger {
    background: #fee2e2;
    border: 2px solid #fca5a5;
    color: #dc2626;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.alert-danger i {
    font-size: 1.2rem;
    min-width: 24px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* �ƶ������� */
@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 0.7rem 1rem !important;
    }
}

    /* �γ�������ʽ�� */
    .schedule-container,.schedule-header {
        margin: 20px 0;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    }
    
    .schedule-table {
        width: 100%;
        border-collapse: collapse;
        margin: 15px 0;
        table-layout: fixed;
    }
    
    .schedule-table th {
        background: #f8f9fa;
        padding: 12px;
        border: 1px solid #dee2e6;
        font-weight: 600;
        color: #495057;
    }
    
    .schedule-table td {
        padding: 10px;
        border: 1px solid #dee2e6;
        vertical-align: top;
        height: 120px;
    }
    
    .course-info {
        background: #f1f3f5;
        min-width: 200px;
    }
    
    .course-name {
        font-size: 16px;
        color: #2b2d42;
        margin-bottom: 5px;
        font-weight: 500;
    }
    
    .course-time {
        font-size: 13px;
        color: #6c757d;
    }
    
    .student-item {
        margin: 3px 0;
        padding: 4px;
        background: #e9ecef;
        border-radius: 3px;
        font-size: 14px;
    }
    
    .stu-id {
        display: inline-block;
        width: 30px;
        color: #868e96;
        font-size: 12px;
    }
    
    .student-summary {
        margin-top: 25px;
        border-top: 2px solid #dee2e6;
        padding-top: 15px;
    }
    
    .student-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .no-data {
        color: #adb5bd;
        font-style: italic;
    }

.result-container {
    margin-top: 20px;
    overflow-x: auto;
}
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}
.header-row th {
    background: #f8f9fa;
    padding: 12px;
    text-align: center;
    min-width: 150px;
}
.data-cell {
    padding: 8px;
    vertical-align: top;
    border: 1px solid #dee2e6;
}
.data-cell div {
    padding: 4px 0;
}
.no-data {
    color: #6c757d;
    font-style: italic;
}
.alert {
    margin-top: 15px;
}

.schedule-results {
    margin-top:20px
	}
.stu-item {
    padding:3px 0; 
	border-bottom:1px solid #eee; 
	white-space:nowrap
}
.stu-id {
    display:inline-block; 
	width:35px; 
	color:#666; 
	text-align:right
}

td {
    vertical-align:top
}

/* ���ڱ�ר����ʽ */


@media print {
    .attendance-table {
        font-size: 20pt;
        page-break-inside: avoid;
    }
    .attendance-table td {
        height: 20pt;
        min-width: 30pt;
    }
    .student-info {
        background-color: #f0f0f0;
    }
}

.summary-info span {
    display: inline-block;
    margin-right: 100px;
    color: #666;
}

.pagination {
    margin: 15px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
}
.pagination a:hover {
    background: #eee;
}
.pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}