/* =========================================
   1. Variables & Global Settings
   ========================================= */
:root {
    --main-purple: #6200ea;
    --hover-purple: #3700b3;
    --bg-light: #F8FAFC;
    --font-primary: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    font-family: var(--font-primary);
}

/* =========================================
   2. Navbar Components
   ========================================= */
/* Logo Styling */
.logo-box {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #7c4dff 0%, #651fff 100%);
}

.text-custom-purple {
    color: #651fff;
}

/* Navbar Action Icons (Bell, Settings) */
.nav-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    cursor: pointer;
    background-color: transparent;
    transition: all 0.2s ease;
}

.nav-icon-btn:hover {
    background-color: #f3f4f6;
    color: #343a40;
}

.cursor-pointer {
    cursor: pointer;
}

.icon-hover {
    transition: 0.2s;
}

/* =========================================
   3. Buttons & Actions
   ========================================= */
/* Main Purple Button */
.btn-purple {
    background-color: #651fff;
    color: white;
    border: none;
    transition: 0.3s;
}

.btn-purple:hover {
    background-color: #651fff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(101, 31, 255, 0.2) !important;
}

/* Add Custom Button */
.btn-add-custom {
    background-color: #6366F1;
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-add-custom:hover {
    background-color: #6366F1;
    color: white;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

/* Card Action Buttons (Phone, Email) */
.btn-action-main,
.btn-action-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 10px;
}

.btn-action-main {
    width: 38px;
    height: 38px;
}

.btn-action-sm {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

/* Colors for Buttons */
.bg-green {
    background-color: #DCFCE7;
    color: #16A34A;
}

.bg-green:hover {
    background-color: #bbf7d0;
}

.bg-email {
    background-color: #F3E8FF;
    color: #9333EA;
}

.bg-email:hover {
    background-color: #e9d5ff;
}

/* Secondary Actions (Heart, Star) */
.btn-action-sub {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    transition: all 0.2s;
    color: #94A3B8;
}

.btn-action-sub:hover {
    background-color: #F1F5F9;
}

/* Active States */
.btn-fav-active {
    background-color: #FFFBEB !important;
    color: #F59E0B !important;
}

.btn-emer-active {
    background-color: #FFF1F2 !important;
    color: #F43F5E !important;
}

/* =========================================
   4. Cards (General)
   ========================================= */
.stat-card,
.contact-card,
.sidebar-card {
    border-radius: 24px;
    border: 1px solid #eef0f3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
    transition: box-shadow 0.3s ease;
    overflow: visible;
}

.stat-card:hover,
.contact-card:hover {
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.08);
}

.stat-card .icon-box {
    width: 60px;
    height: 60px;
}

.card-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

/* =========================================
   5. Sidebar Specific Cards (Hover Effects)
   ========================================= */
/* Favorite Card Styling */
.fav-card {
    background-color: #f3f3f3;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    border: 1px solid transparent;
}

.fav-card:hover {
    background-color: #FFF9C4 !important;
}

.fav-card:hover .phone-btn {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

.fav-card:hover .phone-btn i {
    color: #ffffff !important;
}

/* Emergency Card Styling */
.emer-card {
    background-color: #f3f3f3;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    border: 1px solid transparent;
}

.emer-card:hover {
    background-color: #FFEBEE !important;
}

.emer-card:hover .phone-btn {
    background-color: #a72828 !important;
    color: #ffffff !important;
}

.emer-card:hover .phone-btn i {
    color: #ffffff !important;
}

/* Headers */
.header-fav {
    background-color: #FFFBF0;
    border-bottom: 1px solid #FFF7ED;
}

.header-emer {
    background-color: #FFF1F2;
    border-bottom: 1px solid #FFE4E6;
}

/* =========================================
   6. Avatar & Badges System
   ========================================= */
.avatar-container {
    position: relative;
    width: 60px;
    height: 60px;
}

.avatar-box {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    font-size: 1.2rem;
}

.badge-icon {
    position: absolute;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    z-index: 2;
}

.badge-top {
    top: -6px;
    background-color: #F59E0B;
}

.badge-bottom {
    bottom: -6px;
    background-color: #F43F5E;
}

/* =========================================
   7. Tags & Labels
   ========================================= */
.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.tag-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.tag-friends {
    background-color: #DCFCE7;
    color: #16A34A;
}

.tag-family {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.tag-work {
    background-color: #E0E7FF;
    color: #3730A3;
}

.tag-other {
    background-color: #F3F4F6;
    color: #4B5563;
}

.tag-emergency-text {
    background-color: #FFF1F2;
    color: #F43F5E;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* =========================================
   8. Modals
   ========================================= */
.modal-content {
    border-radius: 20px;
}