/* ============================================
   PRO-LEVEL ADMIN UI - Glassmorphism Theme
   Conservative approach: only visual enhancements
   ============================================ */

/* ===== GLOBAL ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
@keyframes rowFadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== SIDEBAR - Glassmorphism ===== */
.pcoded-navbar {
    background: rgba(15, 23, 42, 0.95) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15) !important;
}
.pcoded-inner-navbar > .nav-item > .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 10px;
    margin: 4px 12px;
    padding: 10px 16px;
    transition: all 0.3s ease;
    position: relative;
}
.pcoded-inner-navbar > .nav-item > .nav-link:hover {
    background: rgba(14, 165, 233, 0.15) !important;
    color: #fff !important;
}
.pcoded-inner-navbar > .nav-item.active > .nav-link {
    background: rgba(14, 165, 233, 0.2) !important;
    color: #0ea5e9 !important;
    font-weight: 600;
}
.pcoded-micon {
    color: inherit;
    transition: all 0.3s ease;
    position: static !important;
    top: auto !important;
    margin-right: 0 !important;
}
.pcoded-inner-navbar > .nav-item > .nav-link:hover .pcoded-micon {
    color: #0ea5e9;
}
.pcoded-inner-navbar > .nav-item.active > .nav-link .pcoded-micon {
    color: #0ea5e9;
}
.pcoded-mtext {
    position: static !important;
    top: auto !important;
    left: auto !important;
}
.pcoded-submenu {
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px;
    margin: 4px 12px;
}
.pcoded-submenu li a {
    color: rgba(255, 255, 255, 0.6) !important;
    border-radius: 6px;
    padding: 8px 16px;
    transition: all 0.2s ease;
    font-size: 13px;
}
.pcoded-submenu li a:hover {
    background: rgba(14, 165, 233, 0.15) !important;
    color: #fff !important;
}
.pcoded-submenu li.active a {
    background: rgba(14, 165, 233, 0.2) !important;
    color: #0ea5e9 !important;
}

/* ===== HEADER - Redesigned ===== */
.admin-header {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: left 0.3s ease;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: #475569;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s;
}
.sidebar-toggle:hover {
    background: #f1f5f9;
    color: #0ea5e9;
}
.site-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-search {
    position: relative;
    margin-right: 8px;
}
.header-search input {
    width: 220px;
    padding: 8px 14px 8px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.3s;
    outline: none;
}
.header-search input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: #fff;
    width: 280px;
}
.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
}
.header-icon {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
    font-size: 16px;
}
.header-icon:hover {
    background: #f1f5f9;
    color: #0ea5e9;
}
.header-icon .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 4px;
}
.header-profile:hover {
    background: #f1f5f9;
}
.header-profile img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}
.header-profile .profile-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.header-profile .profile-role {
    font-size: 11px;
    color: #94a3b8;
}
.header-profile i {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s;
}
.header-profile:hover i {
    transform: rotate(180deg);
}

/* Mobile Header */
@media (max-width: 991px) {
    .admin-header {
        left: 0 !important;
    }
    .sidebar-toggle {
        display: flex;
    }
    .header-search {
        display: none;
    }
    .header-profile .profile-name,
    .header-profile .profile-role {
        display: none;
    }
}
@media (max-width: 575px) {
    .admin-header {
        padding: 0 12px;
    }
    .header-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

/* ===== CARDS - Glass ===== */
.card {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Preserve colored cards */
.card.income-card {
    background: unset !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}
.card.income-card .card-block {
    background: transparent !important;
}
.card.income-card small,
.card.income-card h4 {
    color: #fff !important;
}
.card.bg-c-blue {
    background: #04a9f5 !important;
    backdrop-filter: none !important;
    border: none !important;
}
.card.theme-bg {
    background: linear-gradient(-135deg, #1de9b6 0%, #1dc4e9 100%) !important;
    backdrop-filter: none !important;
    border: none !important;
}
.card.theme-bg2 {
    background: linear-gradient(-135deg, #899FD4 0%, #A389D4 100%) !important;
    backdrop-filter: none !important;
    border: none !important;
}
.card.bg-c-blue .card-block,
.card.theme-bg .card-block,
.card.theme-bg2 .card-block {
    background: transparent !important;
}
.bitcoin-wallet h5,
.bitcoin-wallet h2,
.bitcoin-wallet .text-white,
.bitcoin-wallet i {
    color: #fff !important;
}

.card-header {
    background: transparent !important;
}
.card-header h5 {
    color: #1e293b;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* ===== TABLES ===== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}
.table thead th {
    background: rgba(241, 245, 249, 0.9) !important;
    color: #1e293b !important;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05) !important;
}
.table tbody tr {
    transition: all 0.2s ease;
}
.table tbody tr:hover {
    background: rgba(14, 165, 233, 0.03) !important;
}

/* ===== FORMS ===== */
.form-label {
    font-weight: 600;
    font-size: 12px;
    color: #475569;
}

/* ===== MODALS - Let Bootstrap handle everything ===== */
.modal-content {
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.02); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .card { border-radius: 12px !important; }
    .btn { padding: 8px 14px; font-size: 12px; }
}

/* ===== DATATABLES ===== */
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 8px 14px;
    transition: all 0.3s;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    outline: none;
}

/* ===== AUTH/LOGIN PAGE ===== */
.auth-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    min-height: 100vh;
}
.auth-content .card {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}
.auth-content .form-control {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border-radius: 12px;
}
.auth-content .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.auth-content h3 {
    color: #fff;
}
.auth-content .auth-icon {
    color: #0ea5e9;
    animation: float 3s ease-in-out infinite;
}
.auth-content .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}
.auth-content a {
    color: #0ea5e9 !important;
}

/* ===== SELECT2 ===== */
.select2-container--default .select2-selection--single {
    border: 2px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    height: 40px;
}
.select2-dropdown {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
