/**
 * Unified Card Component System
 * Extracted from profile.css and consolidated
 * Standardized card styling for the entire admin system
 *
 * Usage:
 * - .profile-card (main content card - single responsive version)
 * - .stat-card (statistics and metric cards)
 * - .table-card (table container cards)
 * - .content-grid (grid layout for cards)
 * - .card-section (card content sections)
 */

/* ===== MAIN PROFILE CARD (SINGLE RESPONSIVE VERSION) ===== */
.profile-card {
    background-color: #EDDCD9;
    border: 2px solid #264143;
    border-radius: 20px;
    box-shadow: 3px 4px 0px 1px #E99F4C;
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.profile-card:hover {
    box-shadow: 5px 6px 0px 2px #E99F4C;
    transform: translateY(-2px);
}

/* ===== CARD SECTIONS ===== */
.card-section,
.form-section {
    margin-bottom: 25px;
}

.section-title {
    color: #264143;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(38, 65, 67, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #DE5499;
    font-size: 16px;
}

/* ===== STATISTICS CARD ===== */
.stat-card {
    background: linear-gradient(135deg, #EDDCD9 0%, rgba(237, 220, 217, 0.9) 100%);
    border: 2px solid #264143;
    border-radius: 15px;
    box-shadow: 3px 4px 0px 1px #E99F4C;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 5px 6px 0px 2px #E99F4C;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #264143;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(222, 84, 153, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #DE5499;
    font-size: 18px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 900;
    color: #264143;
    line-height: 1;
}

.stat-card-description {
    font-size: 12px;
    color: #264143;
    opacity: 0.7;
}

/* Stat Card Variants */
.stat-card.success .stat-card-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stat-card.info .stat-card-icon {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.stat-card.warning .stat-card-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stat-card.danger .stat-card-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* ===== TABLE CARD ===== */
.table-card {
    background-color: #EDDCD9;
    border: 2px solid #264143;
    border-radius: 15px;
    box-shadow: 3px 4px 0px 1px #E99F4C;
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
}

.table-card-header {
    padding: 20px 25px;
    border-bottom: 2px solid rgba(38, 65, 67, 0.1);
    background: rgba(255, 255, 255, 0.3);
}

.table-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #264143;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-card-title i {
    color: #DE5499;
}

.table-card-body {
    padding: 0;
}

.table-container {
    overflow-x: auto;
    width: 100%;
}

/* ===== CONTENT GRID ===== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* For 2-column layouts */
.content-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* For 3-column layouts */
.content-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* For 4-column layouts */
.content-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== INFO ITEMS (CARD CONTENT) ===== */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(38, 65, 67, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #264143;
    font-weight: 600;
    font-size: 14px;
}

.info-value {
    color: #264143;
    font-weight: 500;
    font-size: 14px;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    color: #264143;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    margin: 0;
}

.item-info p {
    color: #264143;
    font-size: 14px;
    opacity: 0.8;
    margin: 2px 0 0 0;
    line-height: 1.4;
}

/* ===== STYLISH CARD VARIANTS ===== */

/* Primary Security Card - Pink/Rose Theme */
.security-card-primary {
    background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 50%, #F3E8FF 100%);
    border: 2px solid #BE185D;
    border-radius: 20px;
    box-shadow: 5px 6px 0px 2px #EC4899, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 30px;
    padding: 25px;
}

.security-card-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #BE185D, #EC4899, #F472B6, #EC4899, #BE185D);
    border-radius: 18px 18px 0 0;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

/* Secondary Security Card - Blue/Teal Theme */
.security-card-secondary {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 50%, #ECFDF5 100%);
    border: 2px solid #0369A1;
    border-radius: 20px;
    box-shadow: 5px 6px 0px 2px #0EA5E9, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 30px;
    padding: 25px;
}

.security-card-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0369A1, #0EA5E9, #06B6D4, #0EA5E9, #0369A1);
    border-radius: 18px 18px 0 0;
    animation: shimmer 3s ease-in-out infinite reverse;
    background-size: 200% 100%;
}

/* Tertiary Security Card - Orange/Yellow Theme */
.security-card-tertiary {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 50%, #FEF9C3 100%);
    border: 2px solid #D97706;
    border-radius: 20px;
    box-shadow: 5px 6px 0px 2px #F59E0B, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 30px;
    padding: 25px;
}

.security-card-tertiary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D97706, #F59E0B, #FBBF24, #F59E0B, #D97706);
    border-radius: 18px 18px 0 0;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

/* Success Card - Green Theme */
.security-card-success {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 50%, #D1FAE5 100%);
    border: 2px solid #166534;
    border-radius: 20px;
    box-shadow: 5px 6px 0px 2px #22C55E, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 30px;
    padding: 25px;
}

.security-card-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #166534, #22C55E, #4ADE80, #22C55E, #166534);
    border-radius: 18px 18px 0 0;
    animation: shimmer 3s ease-in-out infinite reverse;
    background-size: 200% 100%;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Hover Effects for All Stylish Card Types */
.security-card-primary:hover,
.security-card-secondary:hover,
.security-card-tertiary:hover,
.security-card-success:hover {
    transform: translateY(-5px) scale(1.02);
}

.security-card-primary:hover {
    box-shadow: 8px 12px 0px 3px #EC4899, 0 10px 30px rgba(236, 72, 153, 0.25);
}

.security-card-secondary:hover {
    box-shadow: 8px 12px 0px 3px #0EA5E9, 0 10px 30px rgba(14, 165, 233, 0.25);
}

.security-card-tertiary:hover {
    box-shadow: 8px 12px 0px 3px #F59E0B, 0 10px 30px rgba(245, 158, 11, 0.25);
}

.security-card-success:hover {
    box-shadow: 8px 12px 0px 3px #22C55E, 0 10px 30px rgba(34, 197, 94, 0.25);
}

/* ===== DANGER ZONE CARD ===== */
.danger-zone {
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 20px;
    background: rgba(220, 53, 69, 0.05);
    margin-bottom: 30px;
}

.danger-zone h4 {
    color: #dc3545;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .content-grid.grid-3,
    .content-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-card {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .profile-card {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .content-grid,
    .content-grid.grid-2,
    .content-grid.grid-3,
    .content-grid.grid-4 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card-value {
        font-size: 28px;
    }

    .table-card-header {
        padding: 15px 20px;
    }

    .section-title {
        font-size: 16px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 15px;
        margin-bottom: 10px;
        background: #F8F9FA;
        border-radius: 8px;
        border: 1px solid #E5E7EB;
    }

    .info-label {
        font-size: 12px;
        font-weight: 600;
        color: #6B7280;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .info-value {
        font-size: 14px;
        font-weight: 500;
        color: #374151;
    }

    /* Stylish cards responsive */
    .security-card-primary,
    .security-card-secondary,
    .security-card-tertiary,
    .security-card-success {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 25px;
    }

    .security-card-primary::before,
    .security-card-secondary::before,
    .security-card-tertiary::before,
    .security-card-success::before {
        height: 3px;
        border-radius: 14px 14px 0 0;
    }

    .security-card-primary:hover,
    .security-card-secondary:hover,
    .security-card-tertiary:hover,
    .security-card-success:hover {
        transform: translateY(-2px) scale(1.01);
        box-shadow: 4px 6px 0px 2px currentColor, 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    .profile-card {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 15px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-card-value {
        font-size: 24px;
    }

    .stat-card-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .section-title {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .table-card-header {
        padding: 12px 15px;
    }

    .table-card-title {
        font-size: 16px;
    }

    .info-item {
        padding: 10px 12px;
        margin-bottom: 8px;
    }

    .info-label {
        font-size: 11px;
    }

    .info-value {
        font-size: 13px;
    }

    /* Stylish cards extra small */
    .security-card-primary,
    .security-card-secondary,
    .security-card-tertiary,
    .security-card-success {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .security-card-primary::before,
    .security-card-secondary::before,
    .security-card-tertiary::before,
    .security-card-success::before {
        height: 2px;
        border-radius: 10px 10px 0 0;
    }

    /* Disable hover effects on very small screens */
    .security-card-primary:hover,
    .security-card-secondary:hover,
    .security-card-tertiary:hover,
    .security-card-success:hover {
        transform: none;
        box-shadow: 3px 4px 0px 1px currentColor;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .profile-card,
    .stat-card,
    .security-card-primary,
    .security-card-secondary,
    .security-card-tertiary,
    .security-card-success {
        transition: none;
    }

    .profile-card:hover,
    .stat-card:hover {
        transform: none;
    }

    .security-card-primary::before,
    .security-card-secondary::before,
    .security-card-tertiary::before,
    .security-card-success::before {
        animation: none;
    }

    .security-card-primary:hover,
    .security-card-secondary:hover,
    .security-card-tertiary:hover,
    .security-card-success:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .profile-card,
    .table-card {
        background: #1F2937;
        color: #F9FAFB;
        border-color: #374151;
    }

    .stat-card {
        background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
        border-color: #374151;
    }

    .section-title,
    .stat-card-title,
    .stat-card-value,
    .table-card-title {
        color: #F9FAFB;
    }

    .stat-card-description {
        color: #9CA3AF;
    }

    .info-item {
        background: #374151;
        border-color: #4B5563;
    }

    .info-label,
    .info-value,
    .item-info h4,
    .item-info p {
        color: #F9FAFB;
    }

    .info-label {
        color: #9CA3AF;
    }

    .table-card-header {
        background: rgba(55, 65, 81, 0.5);
        border-color: #4B5563;
    }
}
