/* ============================================================
   Reading Dinos Library — KiwiCo-inspired Theme
   Primary : #1D9E75  Teal
   Accent 1: #D85A30  Coral
   Accent 2: #EF9F27  Amber
   Base     : #FDFAF5  Warm cream
   Version : 4.0
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    /* Teal — primary brand */
    --rdl-teal:         #1D9E75;
    --rdl-teal-deep:    #0F6E56;
    --rdl-teal-mid:     #5DCAA5;
    --rdl-teal-soft:    #E1F5EE;
    --rdl-teal-pale:    #F0FAF6;

    /* Coral — action / return / reject */
    --rdl-coral:        #D85A30;
    --rdl-coral-deep:   #993C1D;
    --rdl-coral-soft:   #FAECE7;
    --rdl-coral-mid:    #F0997B;

    /* Amber — reserved / wishlist / warning */
    --rdl-amber:        #EF9F27;
    --rdl-amber-deep:   #854F0B;
    --rdl-amber-soft:   #FAEEDA;
    --rdl-amber-mid:    #FAC775;

    /* Neutrals — warm, never cold */
    --rdl-white:        #FFFFFF;
    --rdl-cream:        #FDFAF5;
    --rdl-surface:      #F5F1E8;
    --rdl-surface-mid:  #EDE8DE;
    --rdl-border:       #E2DBD0;
    --rdl-border-mid:   #CEC8BE;
    --rdl-text:         #2C2C2A;
    --rdl-text-mid:     #444441;
    --rdl-muted:        #888780;
    --rdl-muted-light:  #B4B2A9;

    /* Semantic */
    --rdl-ok:           #1D9E75;
    --rdl-ok-bg:        #E1F5EE;
    --rdl-ok-text:      #0F6E56;
    --rdl-warn:         #EF9F27;
    --rdl-warn-bg:      #FAEEDA;
    --rdl-warn-text:    #633806;
    --rdl-danger:       #D85A30;
    --rdl-danger-bg:    #FAECE7;
    --rdl-danger-text:  #4A1B0C;
    --rdl-pending-bg:   #E1F5EE;
    --rdl-pending-text: #0F6E56;

    /* Shape */
    --rdl-radius:       14px;
    --rdl-radius-sm:    8px;
    --rdl-radius-lg:    18px;
    --rdl-radius-pill:  999px;

    /* Shadows */
    --rdl-shadow-sm:    0 2px 8px rgba(44,44,42,0.07);
    --rdl-shadow-md:    0 4px 16px rgba(44,44,42,0.10);
    --rdl-shadow-hover: 0 8px 28px rgba(29,158,117,0.15);
}


/* ============================================================
   BOOK LIST  [rdl_books]
   ============================================================ */

.rdl-book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 0.5rem 0;
}

.rdl-book-card {
    background: var(--rdl-white);
    border: 1px solid var(--rdl-border);
    border-radius: var(--rdl-radius-lg);
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    box-shadow: var(--rdl-shadow-sm);
}

.rdl-book-card:hover {
    transform: translateY(-4px);
    border-color: var(--rdl-teal-mid);
    box-shadow: var(--rdl-shadow-hover);
}

.rdl-book-card > div:first-child {
    background: var(--rdl-teal-soft);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rdl-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0;
    object-fit: cover;
}

.rdl-book-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--rdl-text);
    margin: 0 0 6px;
    line-height: 1.35;
}

.rdl-book-card p {
    font-size: 12px;
    color: var(--rdl-muted);
    margin: 3px 0;
    line-height: 1.4;
}

.rdl-book-card > h3,
.rdl-book-card > p {
    padding: 0 14px;
}

.rdl-book-card h3:first-of-type { padding-top: 14px; }
.rdl-book-card p:last-child     { padding-bottom: 14px; }

/* Status badge on book card cover */
.rdl-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: var(--rdl-radius-pill);
    text-transform: capitalize;
    z-index: 2;
}

.rdl-status-borrowed        { background: var(--rdl-teal-deep); color: #fff; }
.rdl-status-reserved        { background: var(--rdl-amber); color: #412402; }
.rdl-status-out_for_delivery{ background: var(--rdl-coral); color: #fff; }

/* Status badge (book detail page) */
.book-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: var(--rdl-radius-pill);
    text-transform: capitalize;
    z-index: 2;
    background: var(--rdl-teal-deep);
    color: #fff;
}

.book-box.status-borrowed .book-status-badge { background: var(--rdl-coral); }
.book-box.status-reserved .book-status-badge { background: var(--rdl-amber); color: #412402; }


/* ============================================================
   BOOK DETAIL PAGE  (single-rdl_book.php)
   ============================================================ */

.book-box {
    max-width: 960px;
    margin: 30px auto;
    padding: 0;
    background: var(--rdl-white);
    border-radius: var(--rdl-radius-lg);
    border: 1px solid var(--rdl-border);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    box-shadow: var(--rdl-shadow-md);
    transition: border-color 0.2s ease;
}

.book-box.status-reserved { border-color: var(--rdl-amber); }
.book-box.status-borrowed  { border-color: var(--rdl-coral-mid); }

@media (min-width: 768px) {
    .book-box { grid-template-columns: 280px 1fr; }
}

.book-cover {
    background: linear-gradient(160deg, var(--rdl-teal-soft) 0%, var(--rdl-surface) 100%);
    min-height: 280px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
}

.book-cover img {
    width: 100%;
    border-radius: var(--rdl-radius);
    object-fit: cover;
    box-shadow: var(--rdl-shadow-md);
}

.book-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 28px 32px;
}

.book-info h1 {
    font-size: 23px;
    font-weight: 700;
    color: var(--rdl-text);
    margin: 0 0 18px;
    line-height: 1.3;
    letter-spacing: -0.4px;
}

.book-meta p {
    font-size: 13px;
    color: var(--rdl-muted);
    margin: 6px 0;
    line-height: 1.5;
}

.book-meta p strong {
    color: var(--rdl-text-mid);
    font-weight: 600;
}

.book-meta .status-available         { color: var(--rdl-teal);  font-weight: 700; }
.book-meta .status-borrowed,
.book-meta .status-reserved,
.book-meta .status-out_for_delivery  { color: var(--rdl-coral); font-weight: 700; }

/* Book action buttons */
.book-buttons {
    margin-top: 22px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.book-buttons a,
.book-buttons button {
    background: var(--rdl-teal);
    color: #fff;
    padding: 11px 22px;
    border-radius: var(--rdl-radius-pill);
    font-size: 13px;
    font-weight: 700;
    border: none;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
    box-shadow: 0 2px 6px rgba(29,158,117,0.25);
}

.book-buttons a:hover,
.book-buttons button:hover {
    background: var(--rdl-teal-deep);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29,158,117,0.30);
}

.book-buttons .btn-disabled {
    background: var(--rdl-surface-mid) !important;
    color: var(--rdl-muted-light) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: none;
}

/* Wishlist / outline button variant */
.book-buttons button[name="rdl_add_wishlist"] {
    background: transparent;
    color: var(--rdl-teal);
    border: 2px solid var(--rdl-teal);
    box-shadow: none;
}

.book-buttons button[name="rdl_add_wishlist"]:hover {
    background: var(--rdl-teal-pale);
    box-shadow: none;
    transform: none;
}

/* Wishlisted/saved toggle — amber gold */
.book-buttons .rdl-wishlisted-btn {
    background: var(--rdl-amber) !important;
    color: #412402 !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(239,159,39,0.30) !important;
    cursor: pointer !important;
}

.book-buttons .rdl-wishlisted-btn:hover {
    background: var(--rdl-amber-deep) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(239,159,39,0.35) !important;
}

/* Return button on book page */
.book-buttons .rdl-return-btn {
    background: var(--rdl-coral) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(216,90,48,0.25) !important;
}

.book-buttons .rdl-return-btn:hover {
    background: var(--rdl-coral-deep) !important;
    box-shadow: 0 4px 12px rgba(216,90,48,0.30) !important;
}

/* Book sections below the main box */
.section {
    max-width: 960px;
    margin: 20px auto;
    background: var(--rdl-white);
    border-radius: var(--rdl-radius-lg);
    padding: 24px 32px;
    border: 1px solid var(--rdl-border);
    box-shadow: var(--rdl-shadow-sm);
}

.section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--rdl-text);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rdl-teal-soft);
    letter-spacing: -0.1px;
}


/* ============================================================
   MEMBER DASHBOARD  [rdl_member_dashboard]
   ============================================================ */

.rdl-member-dashboard { max-width: 900px; }

/* Hero header — teal with warm depth */
.rdl-member-header {
    background: var(--rdl-teal);
    border-radius: var(--rdl-radius-lg);
    padding: 26px 30px 22px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(29,158,117,0.22);
}

/* Decorative circles — KiwiCo playful touch */
.rdl-member-header::before {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}

.rdl-member-header::after {
    content: '';
    position: absolute;
    right: 60px;
    bottom: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.rdl-member-header h2 {
    font-size: 21px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -0.4px;
    position: relative;
}

.rdl-member-header p {
    font-size: 13px;
    color: rgba(255,255,255,0.80);
    margin: 4px 0;
    line-height: 1.5;
    position: relative;
}

.rdl-member-header p strong {
    color: #fff;
    font-weight: 600;
}

.rdl-expired-text {
    color: var(--rdl-amber-mid);
    font-weight: 700;
}

/* Section headings inside dashboard */
.rdl-member-dashboard > h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--rdl-muted);
    margin: 28px 0 12px;
}

/* Tables — shared */
.rdl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px;
    font-size: 13px;
    background: var(--rdl-white);
    border-radius: var(--rdl-radius);
    overflow: hidden;
    border: 1px solid var(--rdl-border);
    box-shadow: var(--rdl-shadow-sm);
}

.rdl-table thead { background: var(--rdl-teal); }

.rdl-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.7px;
    text-transform: uppercase;
    border: none;
}

.rdl-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--rdl-border);
    color: var(--rdl-text);
    vertical-align: middle;
}

.rdl-table tr:last-child td { border-bottom: none; }

.rdl-table tbody tr:hover td { background: var(--rdl-teal-pale); }

.rdl-table a {
    color: var(--rdl-teal);
    text-decoration: none;
    font-weight: 600;
}

.rdl-table a:hover { text-decoration: underline; }

/* Status pill badges */
.rdl-badge-returned {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: var(--rdl-radius-pill);
    background: var(--rdl-teal-soft);
    color: var(--rdl-teal-deep);
}

.rdl-badge-pending {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: var(--rdl-radius-pill);
    background: var(--rdl-amber-soft);
    color: var(--rdl-amber-deep);
}

.rdl-badge-overdue {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: var(--rdl-radius-pill);
    background: var(--rdl-coral-soft);
    color: var(--rdl-coral-deep);
}

/* Row states */
.rdl-overdue   { background: #FFF5F2 !important; }
.rdl-returned  { background: var(--rdl-teal-pale) !important; }

/* Action cell buttons */
.rdl-actions form { display: inline; }

.rdl-actions button,
.rdl-member-dashboard .button {
    font-size: 12px;
    padding: 7px 16px;
    border-radius: var(--rdl-radius-pill);
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.15s ease, transform 0.1s ease;
}

.rdl-member-dashboard td button[type="submit"] {
    background: var(--rdl-coral);
    color: #fff;
}

.rdl-member-dashboard td button[type="submit"]:hover {
    background: var(--rdl-coral-deep);
    transform: translateY(-1px);
}

.rdl-actions button {
    background: var(--rdl-coral-soft);
    color: var(--rdl-danger-text);
    border: 1px solid var(--rdl-coral-mid);
}

.rdl-actions button:hover {
    background: var(--rdl-coral);
    color: #fff;
    border-color: var(--rdl-coral);
}

/* Empty state messages */
.rdl-member-dashboard > p {
    font-size: 13px;
    color: var(--rdl-muted);
    padding: 16px 20px;
    background: var(--rdl-surface);
    border-radius: var(--rdl-radius);
    border: 1px solid var(--rdl-border);
}

/* Pagination */
.rdl-pager { margin: 10px 0 22px; }

.rdl-pager ul {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.rdl-pager a,
.rdl-pager span {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid var(--rdl-border);
    border-radius: var(--rdl-radius-pill);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--rdl-teal);
    background: var(--rdl-white);
    transition: all 0.15s ease;
}

.rdl-pager a:hover {
    background: var(--rdl-teal-soft);
    border-color: var(--rdl-teal-mid);
}

.rdl-pager .current {
    background: var(--rdl-teal);
    color: #fff;
    border-color: var(--rdl-teal);
}

/* Notice classes */
.rdl-notice {
    border-radius: var(--rdl-radius-sm);
    font-size: 14px;
    font-weight: 500;
    padding: 14px 18px;
    margin: 0 0 16px;
}

.rdl-notice-success {
    background: var(--rdl-teal-soft);
    border-left: 4px solid var(--rdl-teal);
    color: var(--rdl-teal-deep);
    padding: 12px 16px;
    border-radius: 0 var(--rdl-radius-sm) var(--rdl-radius-sm) 0;
    font-size: 13px;
    font-weight: 500;
    margin: 8px 0 16px;
}

.rdl-notice-error {
    background: var(--rdl-coral-soft);
    border-left: 4px solid var(--rdl-coral);
    color: var(--rdl-danger-text);
    padding: 12px 16px;
    border-radius: 0 var(--rdl-radius-sm) var(--rdl-radius-sm) 0;
    font-size: 13px;
    font-weight: 500;
    margin: 8px 0 16px;
}


/* ============================================================
   BORROW REQUESTS PANEL  [rdl_borrow_requests]
   ============================================================ */

.rdl-borrow-panel h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--rdl-text);
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--rdl-teal-soft);
}

.rdl-requests-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--rdl-white);
    border-radius: var(--rdl-radius);
    overflow: hidden;
    border: 1px solid var(--rdl-border);
    box-shadow: var(--rdl-shadow-sm);
}

.rdl-requests-table thead { background: var(--rdl-teal); }

.rdl-requests-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.7px;
    text-transform: uppercase;
    border: none;
}

.rdl-requests-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--rdl-border);
    color: var(--rdl-text);
    vertical-align: middle;
}

.rdl-requests-table tr:last-child td { border-bottom: none; }

.rdl-requests-table tbody tr:hover { background: var(--rdl-teal-pale); }

.rdl-requests-table td form {
    display: inline-block;
    margin: 0 4px 4px 0;
}

.rdl-requests-table select {
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid var(--rdl-border);
    border-radius: var(--rdl-radius-pill);
    color: var(--rdl-text);
    background: var(--rdl-white);
    margin-right: 6px;
    outline: none;
    cursor: pointer;
}

.rdl-requests-table select:focus { border-color: var(--rdl-teal); }

.rdl-requests-table textarea {
    border: 1px solid var(--rdl-border);
    border-radius: var(--rdl-radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    color: var(--rdl-text);
    width: 100%;
    resize: vertical;
    font-family: inherit;
    outline: none;
}

.rdl-requests-table textarea:focus { border-color: var(--rdl-coral); }

/* Approve button */
.rdl-action-btn {
    font-size: 12px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--rdl-radius-pill);
    border: none;
    cursor: pointer;
    background: var(--rdl-teal);
    color: #fff;
    transition: background 0.15s ease, transform 0.1s ease;
    letter-spacing: 0.2px;
}

.rdl-action-btn:hover {
    background: var(--rdl-teal-deep);
    transform: translateY(-1px);
}

/* Reject button */
.rdl-reject-btn {
    background: var(--rdl-coral-soft);
    color: var(--rdl-danger-text);
    border: 1px solid var(--rdl-coral-mid);
}

.rdl-reject-btn:hover {
    background: var(--rdl-coral);
    color: #fff;
    border-color: var(--rdl-coral);
}


/* ============================================================
   POPULAR BOOKS  [rdl_popular_books]
   ============================================================ */

.rdl-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin: 14px 0 26px;
}

.rdl-popular-card {
    background: var(--rdl-white);
    border: 1px solid var(--rdl-border);
    border-radius: var(--rdl-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: var(--rdl-shadow-sm);
}

.rdl-popular-card:hover {
    transform: translateY(-3px);
    border-color: var(--rdl-teal-mid);
    box-shadow: var(--rdl-shadow-hover);
}

.rdl-popular-card img {
    width: 100%;
    height: auto;
    display: block;
    background: var(--rdl-teal-soft);
}

.rdl-popular-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--rdl-text);
    margin: 0;
    padding: 10px 14px 4px;
    line-height: 1.35;
}

.rdl-popular-card p {
    font-size: 11px;
    color: var(--rdl-muted);
    margin: 0;
    padding: 0 14px 12px;
}


/* ============================================================
   RETURN APPROVALS  [rdl_return_approvals]
   ============================================================ */

.wp-list-table.widefat {
    border-radius: var(--rdl-radius);
    overflow: hidden;
    border: 1px solid var(--rdl-border) !important;
    font-size: 13px;
    box-shadow: var(--rdl-shadow-sm);
}

.wp-list-table thead tr th,
.wp-list-table thead tr td {
    background: var(--rdl-teal) !important;
    color: rgba(255,255,255,0.85) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    border: none !important;
    padding: 12px 16px !important;
}

.wp-list-table tbody tr td {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--rdl-border) !important;
    color: var(--rdl-text);
}

.wp-list-table.striped tbody tr:nth-child(odd) { background: var(--rdl-surface); }

.wp-list-table tbody tr:hover td { background: var(--rdl-teal-pale); }

.wp-list-table .button-primary {
    background: var(--rdl-teal) !important;
    border-color: var(--rdl-teal) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 7px 16px !important;
    border-radius: var(--rdl-radius-pill) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background 0.15s ease !important;
}

.wp-list-table .button-primary:hover {
    background: var(--rdl-teal-deep) !important;
    border-color: var(--rdl-teal-deep) !important;
}


/* ============================================================
   BORROWED BOOKS FRONTEND  [rdl_member_borrowed_books]
   ============================================================ */

.rdl-borrowed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--rdl-white);
    border-radius: var(--rdl-radius);
    overflow: hidden;
    border: 1px solid var(--rdl-border);
    box-shadow: var(--rdl-shadow-sm);
}

.rdl-borrowed-table thead { background: var(--rdl-teal); }

.rdl-borrowed-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.7px;
    text-transform: uppercase;
    border: none;
}

.rdl-borrowed-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--rdl-border);
    color: var(--rdl-text);
}

.rdl-borrowed-table tr:last-child td { border-bottom: none; }


/* ============================================================
   GLOBAL — Return, Remove, utility buttons
   ============================================================ */

.rdl-return-btn {
    font-size: 12px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--rdl-radius-pill);
    border: none;
    cursor: pointer;
    background: var(--rdl-coral);
    color: #fff;
    transition: background 0.15s ease, transform 0.1s ease;
}

.rdl-return-btn:hover {
    background: var(--rdl-coral-deep);
    transform: translateY(-1px);
}

.rdl-remove-btn {
    font-size: 12px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--rdl-radius-pill);
    border: 1px solid var(--rdl-coral-mid);
    cursor: pointer;
    background: var(--rdl-coral-soft);
    color: var(--rdl-danger-text);
    transition: all 0.15s ease;
}

.rdl-remove-btn:hover {
    background: var(--rdl-coral);
    color: #fff;
    border-color: var(--rdl-coral);
}

/* Login / empty state links */
.rdl-member-dashboard em a,
.book-buttons + p a {
    color: var(--rdl-teal);
    font-weight: 600;
    text-decoration: none;
}

.rdl-member-dashboard em a:hover,
.book-buttons + p a:hover { text-decoration: underline; }


/* ============================================================
   COUNTER / WALK-IN MODE  [rdl_counter_mode]
   ============================================================ */

.rdl-counter-mode h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--rdl-text);
    padding-bottom: 12px;
    border-bottom: 3px solid var(--rdl-teal-soft);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.rdl-counter-mode > p {
    color: var(--rdl-muted);
    font-size: 13px;
    margin: 0 0 20px;
}

.rdl-counter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin: 20px 0;
}

@media (max-width: 640px) {
    .rdl-counter-grid { grid-template-columns: 1fr; }
}

.rdl-counter-panel {
    background: var(--rdl-white);
    border: 1px solid var(--rdl-border);
    border-radius: var(--rdl-radius-lg);
    padding: 24px;
    box-shadow: var(--rdl-shadow-sm);
    transition: box-shadow 0.2s ease;
}

.rdl-counter-panel:hover { box-shadow: var(--rdl-shadow-md); }

.rdl-counter-panel h3 {
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rdl-teal-soft);
    color: var(--rdl-text);
    font-size: 15px;
    font-weight: 700;
}

.rdl-counter-panel label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--rdl-text-mid);
    letter-spacing: 0.2px;
}

.rdl-counter-panel select {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--rdl-border);
    border-radius: var(--rdl-radius);
    font-size: 13px;
    color: var(--rdl-text);
    background: var(--rdl-cream);
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
    font-family: inherit;
}

.rdl-counter-panel select:focus { border-color: var(--rdl-teal); }

.rdl-counter-panel p { margin-bottom: 18px; }


/* ============================================================
   GLOBAL — Notices, empty states
   ============================================================ */

.rdl-borrow-panel > p,
.rdl-member-dashboard + p {
    font-size: 13px;
    color: var(--rdl-muted);
    padding: 16px 20px;
    background: var(--rdl-surface);
    border-radius: var(--rdl-radius);
    border: 1px solid var(--rdl-border);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {

    .rdl-book-list {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 0.75rem;
    }

    .rdl-popular-grid { grid-template-columns: repeat(2, 1fr); }

    .rdl-member-header { padding: 20px 20px 18px; }
    .rdl-member-header h2 { font-size: 17px; }

    .book-info { padding: 20px 20px; }
    .book-info h1 { font-size: 18px; }

    .rdl-table th,
    .rdl-table td,
    .rdl-requests-table th,
    .rdl-requests-table td,
    .rdl-borrowed-table th,
    .rdl-borrowed-table td {
        padding: 10px 11px;
    }

    .book-buttons {
        gap: 8px;
    }

    .book-buttons a,
    .book-buttons button {
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* ============================================================
   EXPIRED MEMBER ALERT PANEL
   ============================================================ */

.rdl-alert-panel {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--rdl-teal-soft);
}

.rdl-alert-panel h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--rdl-text);
    margin: 0 0 6px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rdl-coral-soft);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* ── Book title links in tables ──────────────────────────── */
a.rdl-book-link {
    color: #1D9E75;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted #1D9E75;
    transition: color 0.15s, border-color 0.15s;
}
a.rdl-book-link:hover {
    color: #D85A30;
    border-bottom-color: #D85A30;
}