/* ============================================
   SHARED STYLES - Vecin cu Miss Baker
   Extracted from inline styles across 20+ pages
   ============================================ */

/* === Base Body === */
body {
    font-family: Roboto, sans-serif;
    padding: 14px;
    font-weight: 300;
    min-height: 100vh;
    background: linear-gradient(-45deg, #fabfac, #ffb3d0, #a5e3fa, #9ff5e1);
    background-size: 400% 400%;
    animation: gradient2 15s ease infinite;
}

@keyframes gradient2 {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === Fade-in Animation === */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Card Base === */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* === Section Header === */
.section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.section-header i {
    font-size: 32px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    margin: 0 !important;
}

.section-header-content {
    flex: 1;
    text-align: left;
}

.section-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.3;
}

.section-header p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.4;
}

.section-header-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* === Buttons === */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border: none;
    color: #0a4f3e;
}

/* === Modal === */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    padding: 20px 30px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-title {
    font-weight: 500;
    font-size: 20px;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 20px 30px;
}

/* === Info Section === */
.info-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px 30px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    text-align: center;
}

.info-section p {
    color: #6c757d;
    margin-bottom: 0;
}

/* === Empty State === */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 72px;
    color: #e9ecef;
    margin-bottom: 20px;
}

/* === Alert Container === */
#alertContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

/* === Alert Badge === */
.alert-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #0a4f3e;
    padding: 20px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(132, 250, 176, 0.3);
    z-index: 20;
    border-radius: 12px 12px 0 0;
}

/* ============================================
   RESPONSIVE - Mobile (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .container {
        padding-left: 5px;
        padding-right: 5px;
    }

    .row {
        --bs-gutter-y: 0.75rem;
        --bs-gutter-x: 0.75rem;
    }

    .section-header {
        padding: 16px 18px;
        margin-bottom: 18px;
        border-radius: 10px;
        gap: 15px;
    }

    .section-header h1 {
        font-size: 20px;
        margin-bottom: 3px;
        line-height: 1.3;
    }

    .section-header p {
        font-size: 13px;
        line-height: 1.4;
    }

    .section-header i {
        font-size: 28px !important;
    }

    .section-header-badge {
        display: none;
    }

    .alert-badge {
        padding: 15px;
        font-size: 14px;
        border-radius: 10px 10px 0 0;
        line-height: 1.5;
    }

    #alertContainer {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    #alertContainer .alert {
        margin-bottom: 10px;
        font-size: 15px;
        padding: 12px 15px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 44px;
    }

    .btn i {
        font-size: 16px;
        margin-right: 8px !important;
    }

    .info-section {
        padding: 18px 25px;
        margin: 25px 0;
        border-radius: 10px;
    }

    .info-section p {
        font-size: 15px;
        line-height: 1.5;
    }

    .info-section i {
        font-size: 16px;
    }

    .empty-state {
        padding: 50px 20px;
    }

    .empty-state-icon {
        font-size: 64px;
        margin-bottom: 18px;
    }

    .empty-state h5 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .empty-state p {
        font-size: 16px;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    .mb-4 {
        margin-bottom: 1.5rem !important;
    }

    .mt-4 {
        margin-top: 1.5rem !important;
    }

    .col-12, .col-sm-6, .col-md-4, .col-lg-3 {
        padding-left: 5px;
        padding-right: 5px;
    }

    .footer-clean {
        padding-top: 20px !important;
    }

    .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 28px !important;
    }

    h2 {
        font-size: 24px !important;
    }

    h3 {
        font-size: 20px !important;
    }

    h4 {
        font-size: 18px !important;
    }

    h5 {
        font-size: 16px !important;
    }

    .alert {
        font-size: 15px;
        padding: 12px 16px;
    }

    .alert i {
        font-size: 16px;
        margin-right: 8px !important;
    }

    @media (max-width: 576px) {
        .modal-dialog {
            margin: 10px;
        }

        .modal-header,
        .modal-body,
        .modal-footer {
            padding: 20px;
        }

        .modal-title {
            font-size: 18px;
        }
    }
}

/* ============================================
   RESPONSIVE - Very Small (max-width: 400px)
   ============================================ */
@media (max-width: 400px) {
    body {
        padding: 3px;
    }

    .container {
        padding-left: 3px;
        padding-right: 3px;
    }

    .row {
        --bs-gutter-y: 0.5rem;
        --bs-gutter-x: 0.5rem;
    }

    .section-header {
        padding: 14px 15px;
        margin-bottom: 12px;
        gap: 12px;
    }

    .section-header h1 {
        font-size: 18px;
        margin-bottom: 2px;
        line-height: 1.3;
    }

    .section-header p {
        font-size: 12px;
        line-height: 1.3;
    }

    .section-header i {
        font-size: 24px !important;
    }

    .alert-badge {
        padding: 12px;
        font-size: 13px;
        border-radius: 8px 8px 0 0;
        line-height: 1.4;
    }

    #alertContainer {
        top: 8px;
        right: 8px;
        left: 8px;
    }

    #alertContainer .alert {
        margin-bottom: 8px;
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 6px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 15px;
        border-radius: 6px;
        min-height: 42px;
    }

    .btn i {
        font-size: 14px;
    }

    .info-section {
        padding: 15px 20px;
        margin: 20px 0;
        border-radius: 8px;
    }

    .info-section p {
        font-size: 14px;
        line-height: 1.4;
    }

    .info-section i {
        font-size: 14px;
    }

    .empty-state {
        padding: 40px 15px;
    }

    .empty-state-icon {
        font-size: 56px;
        margin-bottom: 15px;
    }

    .empty-state h5 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .empty-state p {
        font-size: 14px;
    }

    .mb-5 {
        margin-bottom: 1.5rem !important;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 1rem !important;
    }

    .col-12, .col-sm-6, .col-md-4, .col-lg-3 {
        padding-left: 3px;
        padding-right: 3px;
    }

    .footer-clean {
        padding-top: 15px !important;
    }

    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 20px !important;
    }

    h3 {
        font-size: 18px !important;
    }

    h4 {
        font-size: 16px !important;
    }

    h5 {
        font-size: 15px !important;
    }

    .alert {
        font-size: 14px;
        padding: 10px 14px;
    }

    .alert i {
        font-size: 14px;
        margin-right: 6px !important;
    }
}

/* ============================================
   RESPONSIVE - Landscape
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .section-header {
        padding: 14px 20px;
        gap: 15px;
    }

    .section-header h1 {
        font-size: 18px;
    }

    .section-header i {
        font-size: 26px !important;
    }

    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    #alertContainer {
        top: 8px;
        max-width: 450px;
    }
}

@media (max-width: 576px) and (orientation: landscape) {
    .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   iOS Safari Fixes
   ============================================ */
@supports (-webkit-touch-callout: none) {
    .btn {
        -webkit-tap-highlight-color: transparent;
    }

    .card {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    input, select, textarea {
        font-size: 16px !important;
    }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: none;
    }

    .btn-primary:hover {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* ============================================
   Tall Devices Fix
   ============================================ */
@media (min-height: 800px) and (max-width: 768px) {
    .section-header {
        margin-bottom: 25px;
    }

    .info-section {
        margin: 30px 0;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .btn {
        border: 2px solid currentColor;
    }

    .badge {
        border: 1px solid currentColor;
    }
}

/* ============================================
   Dark Mode
   ============================================ */
@media (prefers-color-scheme: dark) {
    .section-header {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #e0e0e0;
    }

    .section-header h1 {
        color: #ffffff;
    }

    .section-header p {
        color: #b0b0b0;
    }

    .info-section {
        background: #1a1a1a;
        color: #e0e0e0;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .section-header,
    .info-section,
    .footer-clean,
    #alertContainer {
        display: none;
    }

    .btn {
        display: none;
    }
}
