@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";

body {
    font-family: Arial, sans-serif;
    background-color: #f4f7f6;
}

p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 300;
    line-height: 1.7em;
    color: #999;
}

a,
a:hover,
a:focus {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s;
}

.wrapper {
    display: flex;
    width: 100%;
}

#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: #2c3e50;
    color: #fff;
    transition: all 0.3s;
}

#sidebar.active {
    margin-left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: #1abc9c;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 10px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
}

#sidebar ul li a:hover {
    background: #34495e;
}

#sidebar ul li.active > a, #sidebar a[aria-expanded="true"] {
    background: #34495e;
}

#sidebar ul ul a {
    font-size: 0.9em !important;
    padding-left: 30px !important;
    background: #34495e;
}

.dropdown-toggle::after {
    display: none;
}

.fa-chevron-down {
    float: right;
    transition: transform 0.3s;
}

.fa-chevron-down.rotate {
    transform: rotate(180deg);
}

#sidebar ul.collapse {
    display: none;
}

#sidebar ul.collapse.show {
    display: block;
}

#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
}

.navbar {
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

#sidebarCollapse {
    background: #1abc9c;
    border: none;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 10px;
}

.logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

/* 添加搜索框样式 */
.search-box {
    background: #34495e;
    padding: 10px;
}

.search-box input {
    width: 100%;
    padding: 5px;
    border: none;
    background: #2c3e50;
    color: #fff;
}

/* ---------------------------------------------------
    MEDIAQUERIES
----------------------------------------------------- */

@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #sidebarCollapse span {
        display: none;
    }
}

/* 保留原有的样式 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 2rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

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

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.btn {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn:hover {
    background-color: #0056b3;
}

.flashes {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.5rem;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    color: #721c24;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    padding: 0.5rem;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* 在文件末尾添加 */
#content.full-width {
    margin-left: 0;
    width: 100%;
}

.dashboard-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.stat-box {
    background-color: #fff;
    border-radius: 5px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
    margin: 0 10px;
}

.stat-box h3 {
    margin-top: 0;
    color: #333;
}

.stat-box p {
    margin: 5px 0;
    font-size: 1.1em;
}

.stat-box span {
    font-weight: bold;
    color: #1abc9c;
}

.chart-container {
    background-color: #fff;
    border-radius: 5px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.search-form {
    margin-bottom: 20px;
}

.search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-row input,
.search-row select,
.search-row button {
    padding: 5px 10px;
}

.action-buttons {
    margin-bottom: 20px;
}

.action-buttons .btn {
    margin-right: 10px;
}

.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.table {
    width: 100%;
    white-space: nowrap;
}

.table th,
.table td {
    padding: 10px;
    vertical-align: middle;
}

.col-id { width: 3%; }
.col-date { width: 8%; }
.col-name { width: 6%; }
.col-profession { width: 6%; }
.col-unit { width: 12%; }
.col-price { width: 5%; }
.col-paid, .col-received { width: 3%; }
.col-status { width: 5%; }
.col-expiry { width: 7%; }
.col-actions { width: 12%; }

.col-unit {
    position: relative;
}

.col-unit:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px;
    z-index: 1;
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px;
}

.btn-group .btn {
    padding: 2px 4px;
    font-size: 12px;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

.status-badge.in-progress {
    background-color: #ffc107;
    color: #000;
}

.status-badge.completed {
    background-color: #28a745;
    color: #fff;
}

@media (max-width: 1200px) {
    .table-container {
        overflow-x: auto;
    }
}

.text-center {
    text-align: center;
}
