/* ========================================
   飞鱼租机 - 科技感深色主题
   主色: #0ea5e9 (cyan-blue)
   背景: #0f172a (dark navy)
   卡片: rgba(30,41,59,0.85) (glass dark)
   ======================================== */

body {
    background: #0f172a;
    color: #e2e8f0;
}

/* ========== Layout ========== */
.main-content {
    background: #0f172a;
}
.rental-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========== Navbar ========== */
.navbar-inverse {
    background: rgba(15,23,42,0.95) !important;
    border-bottom: 1px solid rgba(14,165,233,0.2) !important;
    backdrop-filter: blur(12px);
}
.navbar-inverse .navbar-brand {
    color: #0ea5e9 !important;
    font-weight: 700;
    letter-spacing: 1px;
}
.navbar-inverse .navbar-nav > li > a {
    color: #94a3b8 !important;
}
.navbar-inverse .navbar-nav > li > a:hover {
    color: #0ea5e9 !important;
}
.navbar-inverse .dropdown-menu {
    background: #1e293b;
    border-color: rgba(14,165,233,0.15);
}
.navbar-inverse .dropdown-menu > li > a {
    color: #cbd5e1;
}
.navbar-inverse .dropdown-menu > li > a:hover {
    background: rgba(14,165,233,0.15);
    color: #0ea5e9;
}
.navbar-inverse .navbar-toggle {
    border-color: rgba(14,165,233,0.3);
}
.navbar-inverse .navbar-toggle .icon-bar {
    background: #0ea5e9;
}

/* ========== Banner ========== */
.rental-banner {
    background: linear-gradient(135deg, #0c4a6e 0%, #1e1b4b 50%, #0f172a 100%);
    color: #e2e8f0;
    padding: 20px 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(14,165,233,0.15);
    position: relative;
    overflow: hidden;
}
.rental-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(14,165,233,0.08) 0%, transparent 50%);
    pointer-events: none;
}
.rental-banner h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #f0f9ff;
    position: relative;
}
.rental-banner p {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 10px;
    position: relative;
}

/* ========== Search ========== */
.rental-search {
    margin-bottom: 15px;
    position: relative;
}
.rental-search .input-group {
    max-width: 600px;
    margin: 0 auto;
}
/* Unified search bar */
.search-bar {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.search-bar .input-group-btn {
    width: auto;
    flex-shrink: 0;
}
.search-bar .search-cat-select {
    height: 46px;
    border-radius: 10px !important;
    min-width: 110px;
    appearance: auto;
    -webkit-appearance: menulist;
    cursor: pointer;
}
.search-bar input.form-control {
    border-radius: 10px !important;
    flex: 1;
}
.search-bar .input-group-btn:last-child .btn {
    border-radius: 10px !important;
}
.rental-search .form-control,
.rental-search select.form-control {
    background: #1e293b;
    border: 1px solid rgba(14,165,233,0.2);
    color: #e2e8f0;
}
.rental-search .form-control:focus,
.rental-search select.form-control:focus {
    border-color: #0ea5e9;
    box-shadow: none;
    z-index: 2;
}
.search-bar .search-cat-select:focus {
    border-color: #0ea5e9;
}
.search-bar input.form-control:focus {
    border-color: #0ea5e9;
}
.rental-search .form-control::placeholder {
    color: #64748b;
}
.rental-search select.form-control option {
    background: #1e293b;
    color: #e2e8f0;
}
.rental-search .btn-primary {
    background: #0ea5e9;
    border-color: #0ea5e9;
}

/* ========== Device Card ========== */
.rental-device-card {
    background: rgba(30,41,59,0.85);
    border-radius: 10px;
    border: 1px solid rgba(14,165,233,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}
.rental-device-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14,165,233,0.35);
    box-shadow: 0 8px 30px rgba(14,165,233,0.15);
}
.rental-device-card .card-img {
    height: 180px;
    background: linear-gradient(135deg, #164e63 0%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(14,165,233,0.5);
    font-size: 48px;
    position: relative;
}
.rental-device-card .card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(14,165,233,0.08) 0%, transparent 70%);
}
/* Category gradients */
.rental-device-card .card-img.cat-1 { background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%); }
.rental-device-card .card-img.cat-2 { background: linear-gradient(135deg, #3b1f5e 0%, #0f172a 100%); }
.rental-device-card .card-img.cat-3 { background: linear-gradient(135deg, #1a3d2e 0%, #0f172a 100%); }
.rental-device-card .card-img.cat-4 { background: linear-gradient(135deg, #3d2e1a 0%, #0f172a 100%); }
.rental-device-card .card-img.cat-5 { background: linear-gradient(135deg, #1a2d3d 0%, #0f172a 100%); }
.rental-device-card .card-img.cat-0 { background: linear-gradient(135deg, #164e63 0%, #1e1b4b 100%); }
/* Device number badge */
.rental-device-card .device-no {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    color: rgba(14,165,233,0.4);
    letter-spacing: 0.5px;
    font-family: monospace;
}
.rental-device-card .card-body {
    padding: 12px;
}
.rental-device-card .card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f1f5f9;
}
.rental-device-card .card-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}
.rental-device-card .card-price {
    font-size: 18px;
    color: #38bdf8;
    font-weight: 700;
}
.rental-device-card .card-price small {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}
.rental-device-card .card-price .deposit {
    font-size: 12px;
    color: #475569;
    margin-left: 8px;
    display: block;
    margin-top: 2px;
}
.rental-device-card .btn-rent {
    margin-top: 8px;
    width: 100%;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    border: none;
    color: #fff;
    padding: 7px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s, box-shadow 0.2s;
}
.rental-device-card .btn-rent:hover {
    opacity: 0.9;
    box-shadow: 0 2px 12px rgba(14,165,233,0.3);
}
.rental-device-card .btn-rent[disabled] {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
}

/* ========== Tab ========== */
.rental-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid #1e293b;
}
.rental-tabs .tab-item {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    color: #64748b;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.rental-tabs .tab-item:hover {
    color: #e2e8f0;
}
.rental-tabs .tab-item.active {
    color: #0ea5e9;
    border-bottom-color: #0ea5e9;
}

/* ========== Order Card ========== */
.rental-order-card {
    background: rgba(30,41,59,0.85);
    border-radius: 10px;
    border: 1px solid rgba(14,165,233,0.1);
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rental-order-card .order-info { flex: 1; }
.rental-order-card .order-info h4 { color: #f1f5f9; }
.rental-order-card .order-info p { color: #64748b; }
.rental-order-card .order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.rental-order-card .status-renting { background: rgba(14,165,233,0.15); color: #38bdf8; }
.rental-order-card .status-returned { background: rgba(34,197,94,0.15); color: #4ade80; }
.rental-order-card .status-overdue { background: rgba(239,68,68,0.15); color: #f87171; }
.rental-order-card .order-price {
    font-size: 18px;
    color: #38bdf8;
    font-weight: 600;
    text-align: right;
}

/* ========== Message Card ========== */
.rental-msg-card {
    background: rgba(30,41,59,0.85);
    border-radius: 10px;
    border: 1px solid rgba(14,165,233,0.1);
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    transition: border-color 0.2s;
}
.rental-msg-card:hover {
    border-color: rgba(14,165,233,0.3);
}
.rental-msg-card.unread {
    background: rgba(14,165,233,0.06);
    border-left: 3px solid #0ea5e9;
}
.rental-msg-card .msg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    margin-top: 5px;
    flex-shrink: 0;
}
.rental-msg-card .msg-body { flex: 1; }
.rental-msg-card .msg-title { font-weight: 600; color: #f1f5f9; margin-bottom: 4px; }
.rental-msg-card .msg-content { font-size: 13px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-msg-card .msg-time { font-size: 12px; color: #475569; margin-top: 4px; }
.rental-msg-card .msg-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
    font-size: 18px;
}
.msg-icon.system { background: rgba(14,165,233,0.15); color: #38bdf8; }
.msg-icon.remind { background: rgba(245,158,11,0.15); color: #fbbf24; }
.msg-icon.overdue { background: rgba(239,68,68,0.15); color: #f87171; }

/* ========== Credit ========== */
.credit-score { font-size: 36px; font-weight: 700; }
.credit-score.high { color: #4ade80; }
.credit-score.medium { color: #fbbf24; }
.credit-score.low { color: #f87171; }
.credit-label { display: inline-block; padding: 4px 12px; border-radius: 4px; font-size: 12px; }
.credit-label.normal { background: rgba(34,197,94,0.15); color: #4ade80; }
.credit-label.blacklist { background: rgba(239,68,68,0.15); color: #f87171; }

/* ========== Quick Links ========== */
.rental-quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.rental-quick-links .quick-link {
    background: rgba(30,41,59,0.85);
    border-radius: 10px;
    border: 1px solid rgba(14,165,233,0.1);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #e2e8f0;
    transition: transform 0.2s, border-color 0.2s;
}
.rental-quick-links .quick-link:hover {
    transform: translateY(-2px);
    border-color: rgba(14,165,233,0.35);
}
.rental-quick-links .quick-link i {
    font-size: 28px;
    margin-bottom: 8px;
    color: #0ea5e9;
}
.rental-quick-links .quick-link span {
    font-size: 14px;
    display: block;
}

/* ========== Detail Page ========== */
.rental-detail {
    background: rgba(30,41,59,0.85);
    border-radius: 10px;
    border: 1px solid rgba(14,165,233,0.1);
    padding: 25px;
    margin-bottom: 20px;
}
.rental-detail h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(14,165,233,0.1);
    color: #f1f5f9;
}
/* Detail image */
.detail-img-wrap {
    height: 300px;
    background: linear-gradient(135deg, #164e63, #1e1b4b);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(14,165,233,0.1);
    overflow: hidden;
}
.detail-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rental-detail .info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148,163,184,0.08);
}
.rental-detail .info-row .info-label { width: 100px; color: #64748b; flex-shrink: 0; }
.rental-detail .info-row .info-value { flex: 1; color: #e2e8f0; }
.rental-detail .price-highlight {
    background: linear-gradient(135deg, #0c4a6e, #1e1b4b);
    border: 1px solid rgba(14,165,233,0.2);
    color: #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}
.rental-detail .price-highlight .price { font-size: 28px; font-weight: 700; color: #38bdf8; }
.rental-detail .price-highlight .label { font-size: 14px; color: #94a3b8; display: block; margin-bottom: 4px; }

/* ========== Create Form ========== */
.rental-create-form {
    background: rgba(30,41,59,0.85);
    border-radius: 10px;
    border: 1px solid rgba(14,165,233,0.1);
    padding: 25px;
}
.rental-create-form .form-group { margin-bottom: 15px; }
.rental-create-form .form-control {
    background: #1e293b;
    border-color: rgba(14,165,233,0.2);
    color: #e2e8f0;
}
.rental-create-form .form-control:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14,165,233,0.15);
}
.rental-create-form .fee-preview {
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid rgba(14,165,233,0.1);
    padding: 15px;
    margin: 15px 0;
}
.rental-create-form .fee-preview .fee-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148,163,184,0.08);
}
.rental-create-form .fee-preview .fee-item:last-child { border-bottom: none; }
.rental-create-form .fee-preview .fee-item .fee-label { color: #64748b; }
.rental-create-form .fee-preview .fee-item .fee-value { font-weight: 600; color: #e2e8f0; }
.rental-create-form .fee-preview .fee-total { font-size: 18px; font-weight: 700; color: #38bdf8; }

/* ========== Empty ========== */
.rental-empty {
    text-align: center;
    padding: 60px 20px;
    color: #475569;
}
.rental-empty i { font-size: 48px; margin-bottom: 15px; color: #1e293b; }
.rental-empty p { font-size: 16px; color: #475569; }

/* ========== Pagination ========== */
.rental-pagination { text-align: center; padding: 20px 0; }
.rental-pagination a {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 3px;
    border: 1px solid rgba(14,165,233,0.15);
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    background: rgba(30,41,59,0.5);
}
.rental-pagination a:hover,
.rental-pagination a.active {
    background: #0ea5e9;
    color: #fff;
    border-color: #0ea5e9;
}
.rental-pagination a.disabled { color: #334155; cursor: not-allowed; }

/* ========== Footer ========== */
.footer {
    background: #0f172a;
    border-top: 1px solid rgba(14,165,233,0.1);
    color: #475569;
}

/* ========== Categories (legacy) ========== */
.rental-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}
.rental-categories .cat-item {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(30,41,59,0.85);
    border-radius: 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(14,165,233,0.1);
}
.rental-categories .cat-item:hover,
.rental-categories .cat-item.active {
    background: #0ea5e9;
    color: #fff;
    border-color: #0ea5e9;
}

/* ========== Alert override ========== */
.alert-danger {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.2);
    color: #f87171;
}

/* ========== Label override ========== */
.label-success { background: rgba(34,197,94,0.2); color: #4ade80; }
.label-primary { background: rgba(14,165,233,0.2); color: #38bdf8; }
.label-warning { background: rgba(245,158,11,0.2); color: #fbbf24; }
.label-danger  { background: rgba(239,68,68,0.2); color: #f87171; }

/* ========== Responsive ========== */
@media (max-width: 767px) {
    .main-content { padding-top: 20px !important; padding-bottom: 15px !important; }
    .navbar-fixed-top { position: fixed !important; }
    .navbar-inverse .navbar-collapse {
        background: rgba(15,23,42,0.98);
        border-color: rgba(14,165,233,0.1);
    }
    .rental-banner { padding: 12px 12px; margin-bottom: 12px; border-radius: 0; }
    .rental-banner h1 { font-size: 18px; margin-bottom: 4px; }
    .rental-banner p { font-size: 12px; margin-bottom: 8px; }
    .rental-device-card { margin-bottom: 8px; border-radius: 6px; }
    .rental-device-card:hover { transform: none; }
    .rental-device-card .card-img { height: 100px; font-size: 32px; }
    .rental-device-card .card-body { padding: 8px 10px; }
    .rental-device-card .card-title { font-size: 13px; margin-bottom: 3px; }
    .rental-device-card .card-meta { font-size: 11px; margin-bottom: 2px; }
    .rental-device-card .card-price { font-size: 15px; }
    .rental-device-card .card-price small { font-size: 10px; }
    .rental-device-card .card-price .deposit { font-size: 10px; margin-left: 4px; }
    .rental-device-card .btn-rent { margin-top: 5px; padding: 5px 0; font-size: 12px; }
    .rental-categories { gap: 6px; margin-bottom: 12px; }
    .rental-categories .cat-item { padding: 5px 12px; font-size: 12px; }
    .rental-quick-links { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .rental-quick-links .quick-link { padding: 12px; }
    .rental-quick-links .quick-link i { font-size: 22px; }
    .rental-quick-links .quick-link span { font-size: 12px; }
    .rental-container { padding: 0 10px; }
    /* 详情页移动端铺满 */
    .page-detail .main-content { padding-top: 50px !important; padding-bottom: 0 !important; }
    .page-detail .main-content > .container { padding: 0; width: 100%; }
    .page-detail .rental-container { padding: 0 5px; }
    .page-detail .rental-detail { padding: 10px; border-radius: 0; border-left: none; border-right: none; }
    .page-detail .detail-img-wrap { height: 200px; border-radius: 0; }
    /* 移动端搜索栏 */
    .search-bar { flex-wrap: nowrap; gap: 5px; }
    .search-bar .input-group-btn:first-child {
        width: auto;
        display: block;
        flex-shrink: 0;
    }
    .search-bar .search-cat-select {
        border-radius: 10px;
        min-width: 90px;
        height: 40px;
        font-size: 13px;
    }
    .search-bar input.form-control {
        border-radius: 10px;
        height: 40px;
        font-size: 13px;
        flex: 1;
    }
    .search-bar .input-group-btn:last-child .btn {
        border-radius: 10px;
        height: 40px;
        padding: 0 12px;
    }
    .row > .col-xs-6 { padding-left: 4px; padding-right: 4px; }
    .rental-detail { padding: 15px; }
    .rental-detail .price-highlight .row > div { width: 100%; margin-bottom: 8px; float: none; }
    .rental-detail .price-highlight .price { font-size: 20px; }
    .rental-empty { padding: 30px 15px; }
}
