/* ===================================
   Control Parental RK - Admin Panel CSS
   =================================== */

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #858796;
    background-color: #f8f9fc;
}

/* ===== LOGIN PAGE ===== */
.bg-gradient-primary {
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    background-size: cover;
    min-height: 100vh;
}

.bg-login-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.35rem 0 0 0.35rem;
}

.login-left-content {
    text-align: center;
    padding: 2rem;
}

.form-control-user {
    font-size: 0.9rem;
    border-radius: 10rem;
    padding: 1.5rem 1rem;
}

.btn-user {
    font-size: 0.9rem;
    border-radius: 10rem;
    padding: 0.75rem 1rem;
}

/* ===== DASHBOARD ===== */
#wrapper {
    display: flex;
    width: 100%;
}

#sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    width: 250px;
    transition: all 0.3s;
}

#sidebar.toggled {
    margin-left: -250px;
}

.sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    z-index: 1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand-icon {
    margin-right: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.nav-link i {
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

#content-wrapper {
    background-color: #f8f9fc;
    width: 100%;
    overflow-x: hidden;
}

/* ===== TOPBAR ===== */
.topbar {
    height: 4.375rem;
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
}

.topbar-divider {
    width: 0;
    border-right: 1px solid #e3e6f0;
    height: calc(4.375rem - 2rem);
    margin: auto 1rem;
}

.nav-item.dropdown .dropdown-toggle::after {
    display: none;
}

/* ===== CARDS ===== */
.card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    color: var(--primary-color);
}

.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.border-left-danger {
    border-left: 0.25rem solid var(--danger-color) !important;
}

/* ===== STATS CARDS ===== */
.text-xs {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

/* ===== BADGES ===== */
.badge-primary {
    background-color: var(--primary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-info {
    background-color: var(--info-color);
}

.badge-warning {
    background-color: var(--warning-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

/* ===== TABLES ===== */
.table {
    color: #858796;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* ===== BUTTONS ===== */
.btn-circle {
    border-radius: 100%;
    height: 2.5rem;
    width: 2.5rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-circle.btn-sm {
    height: 1.8rem;
    width: 1.8rem;
    font-size: 0.75rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* ===== UTILITIES ===== */
.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-400 {
    color: #d1d3e2 !important;
}

.text-gray-500 {
    color: #b7b9cc !important;
}

.text-gray-600 {
    color: #858796 !important;
}

.text-gray-700 {
    color: #6e707e !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-900 {
    color: #3a3b45 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    
    #sidebar.toggled {
        margin-left: 0;
    }
    
    .topbar .dropdown {
        position: static;
    }
    
    .topbar .dropdown-menu {
        width: calc(100% - 1.5rem);
        right: 0.75rem;
    }
}

/* ===== LOADING SPINNER ===== */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 0.35rem;
    border-left: 0.25rem solid;
}

.alert-primary {
    border-left-color: var(--primary-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--info-color);
}

/* ===== PROFILE IMAGE ===== */
.img-profile {
    height: 2rem;
    width: 2rem;
    border-radius: 50%;
}

/* ===== FOOTER ===== */
.footer {
    background-color: #fff;
    padding: 2rem 0;
    border-top: 1px solid #e3e6f0;
}

.footer .copyright {
    line-height: 1;
    font-size: 0.8rem;
}

/* ===== MODAL ===== */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ===== SEARCH BOX ===== */
.search-box {
    position: relative;
}

.search-box input {
    border-radius: 20px;
    padding-left: 2.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #858796;
}

/* ===== STATS CARDS ===== */
.stats-cards .stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.stats-cards .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* ===== SPINNER OVERLAY ===== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-overlay.show {
    display: flex;
}

/* ===== RIBBON (DESTACADO) ===== */
.ribbon {
    position: absolute;
    right: -5px;
    top: -5px;
    z-index: 1;
    overflow: hidden;
    width: 75px;
    height: 75px;
    text-align: right;
}

.ribbon span {
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    text-align: center;
    line-height: 20px;
    transform: rotate(45deg);
    width: 100px;
    display: block;
    background: linear-gradient(#f6c23e 0%, #f4a124 100%);
    box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
    position: absolute;
    top: 19px;
    right: -21px;
}

.ribbon span::before {
    content: "";
    position: absolute;
    left: 0px;
    top: 100%;
    z-index: -1;
    border-left: 3px solid #f4a124;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #f4a124;
}

.ribbon span::after {
    content: "";
    position: absolute;
    right: 0px;
    top: 100%;
    z-index: -1;
    border-left: 3px solid transparent;
    border-right: 3px solid #f4a124;
    border-bottom: 3px solid transparent;
    border-top: 3px solid #f4a124;
}

/* ===== PRICE DISPLAY ===== */
.price-display {
    text-align: center;
    padding: 1rem 0;
    background: linear-gradient(135deg, #f8f9fc 0%, #e8eaf6 100%);
    border-radius: 10px;
}

.price-display h3 {
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== FEATURES LIST ===== */
.features-list {
    font-size: 0.85rem;
}

.features-list i {
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

/* ===== PLAN CARDS ===== */
.card.border-warning {
    border-width: 2px !important;
    box-shadow: 0 0.25rem 1rem rgba(246, 194, 62, 0.25) !important;
}
