/* ========== 衢州机场消防训练管理系统 - 公共样式 ========== */

/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* === Buttons === */
.btn {
    padding: 6px 12px; border: none; border-radius: 4px; cursor: pointer;
    font-size: 13px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-success { background: #16a34a; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }
.btn-outline { background: #fff; border: 1px solid #ccc; color: #333; }

/* === Toast === */
.toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: #333; color: #fff; padding: 10px 24px; border-radius: 20px;
    font-size: 14px; z-index: 9999; opacity: 0; transition: opacity 0.3s;
    pointer-events: none;
}

/* === Network Status === */
.network-status {
    position: fixed; top: 12px; right: 16px; font-size: 12px;
    padding: 4px 10px; border-radius: 12px; z-index: 999;
    transition: all 0.3s;
}
.network-status.online { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.network-status.offline { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.network-status.saving { background: #fefce8; color: #854d0e; border: 1px solid #fde047; }

/* === Notifications === */
.notify-icon { position: relative; cursor: pointer; font-size: 18px; margin-right: 4px; }
.notify-badge {
    position: absolute; top: -6px; right: -8px;
    background: #dc2626; color: #fff; border-radius: 50%;
    padding: 0 5px; font-size: 10px; font-weight: bold; display: none;
}
.notify-dropdown {
    position: fixed; top: 52px; right: 16px;
    background: #fff; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15); z-index: 10000;
    width: 320px; max-height: 400px; overflow-y: auto;
}
.notify-item {
    padding: 10px 16px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-size: 13px;
}
.notify-item:hover { background: #f0f5ff; }
.notify-item .go-link { color: #2563eb; font-size: 12px; white-space: nowrap; }

/* === User Bar (子页面通用) === */
.user-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; font-size: 14px;
}
.user-bar button {
    background: none; border: 1px solid #ef4444; color: #ef4444;
    padding: 4px 12px; border-radius: 4px; cursor: pointer;
}
.user-bar a { text-decoration: none; font-size: 16px; color: inherit; margin-right: 8px; }

/* 返回首页按钮（子页面右上角） */
.btn-home-top {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff !important;
    font-size: 13px; font-weight: 500;
    border-radius: 6px; text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.25);
    border: none; cursor: pointer;
}
.btn-home-top:hover {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
    transform: translateY(-1px); color: #fff !important;
}
.btn-home-top:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.2);
}

/* === Table Basics === */
table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
th, td { border: 1px solid #e2e8f0; padding: 7px 6px; text-align: center; }
th { background: #f8fafc; font-weight: 600; color: #334155; font-size: 12px; }

/* === Form Elements === */
.form-group, .form-inline {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0;
}
.form-group label { font-size: 13px; }
.form-group select, .form-group input,
.form-inline input, .form-inline select {
    padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px;
}
input:focus, select:focus { outline: none; border-color: #2563eb; }

/* === Card === */
.card {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 14px; margin-bottom: 12px;
}

/* === Container (子页面通用) === */
.container {
    max-width: 1400px; margin: 0 auto;
    background: #fff; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); padding: 24px;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: #f5f7fa; min-height: 100vh; padding: 16px;
}
h1 { font-size: 22px; color: #1e293b; margin-bottom: 16px; }

/* === Responsive === */
@media (max-width: 768px) {
    .container { padding: 12px; }
    table { font-size: 11px; }
    .btn { padding: 4px 8px; font-size: 11px; }
}
