/* Trailing Paper — global radius tune-up */

/* Cards */
.card,
.card-body,
.tp-card { border-radius: 14px !important; }
.card .card-body:not(:only-child) { border-radius: 0 !important; }
.card > .card-header:first-child { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.card > .card-footer:last-child { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }

/* Tables: no global border-radius on .table-responsive — the previous
   `.table-responsive { border-radius: 14px; overflow: hidden; }` killed
   horizontal scroll on wide datatables and overlapped header borders.
   The .card / .tp-table-card parents already handle visual containment
   via their own background/border-radius. */
.card > .table-responsive:first-child { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.card > .table-responsive:last-child  { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }

/* Inputs, selects, textareas */
.form-control,
.form-select,
.input-group > .form-control,
.input-group > .form-select { border-radius: 10px !important; }
.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child) { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group > .input-group-text:first-child { border-top-left-radius: 10px !important; border-bottom-left-radius: 10px !important; }
.input-group > .input-group-text:last-child  { border-top-right-radius: 10px !important; border-bottom-right-radius: 10px !important; }

/* Buttons */
.btn,
.btn-group > .btn,
.btn-icon { border-radius: 10px !important; }
.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > .btn:nth-child(n+3) { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.btn-sm { border-radius: 8px !important; }
.btn-rounded,
.rounded-pill { border-radius: 999px !important; }

/* Dropdown menus */
.dropdown-menu { border-radius: 12px !important; }

/* Modals */
.modal-content { border-radius: 16px !important; overflow: hidden; }

/* Alerts */
.alert { border-radius: 12px !important; }

/* Badges (keep pill for badge-pill; elsewhere a bit more rounded) */
.badge { border-radius: 6px; }
.badge-lg { border-radius: 8px; }

/* List groups */
.list-group { border-radius: 12px; overflow: hidden; }
.list-group-item:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.list-group-item:last-child  { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

/* Utility overrides */
.rounded        { border-radius: 12px !important; }
.rounded-1      { border-radius: 8px !important; }
.rounded-2      { border-radius: 10px !important; }
.rounded-3      { border-radius: 14px !important; }
.rounded-4      { border-radius: 18px !important; }

/* Avatars — keep circular where intended */
.avatar.rounded-circle,
.avatar-sm.rounded-circle,
.avatar-md.rounded-circle,
.avatar-lg.rounded-circle { border-radius: 50% !important; }

/* Progress bars */
.progress { border-radius: 999px; }

/* Breadcrumb + pagination small round */
.breadcrumb { border-radius: 10px; }
.pagination .page-link:first-child,
.pagination .page-item:first-child .page-link { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.pagination .page-link:last-child,
.pagination .page-item:last-child .page-link { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

/* Notification / popover / toast */
.toast, .popover { border-radius: 12px !important; }

/* Sidebar logo height */
.sidebar .sidebar-logo .logo img,
.sidebar .sidebar-logo .logo-small img,
.sidebar .sidebar-logo .dark-logo img,
.sidebar .sidebar-logo .dark-small img {
    height: 24px !important;
    width: auto !important;
}
