﻿/* =========================================
   GLOBAL VARIABLES & ROOT
   ========================================= */
:root {
    --card-radius: 20px;
    --color-single: #42A5F5; /* Albastru */
    --color-double: #66BB6A; /* Verde */
    --color-suite: #FFA726; /* Portocaliu */
    /* Culori Soft (folosite la butoane) */
    --soft-primary-bg: #e0f2fe;
    --soft-primary-text: #0284c7;
    --soft-warning-bg: #fffbeb;
    --soft-warning-text: #d97706;
    --soft-danger-bg: #fef2f2;
    --soft-danger-text: #dc2626;
    --soft-success-bg: #dcfce7;
    --soft-success-text: #16a34a;
    --soft-secondary-bg: #f1f5f9;
    --soft-secondary-text: #64748b;
}

/* =========================================
   CARDS & CONTAINERS
   ========================================= */

/* Card Statistici Rapide (Index) */
.mini-stat-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s;
    height: 100%;
}

    .mini-stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    }

.stat-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* Card Detalii (Details Page) */
.detail-card {
    background: #fff;
    border-radius: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.detail-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    background-color: #fff;
}

.detail-body {
    padding: 2rem;
}

/* Stat Box (Grid-ul din pagina Detalii) */
.stat-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #f1f5f9;
    transition: transform 0.2s;
}

    .stat-box:hover {
        transform: translateY(-3px);
    }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-title {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* =========================================
   TYPOGRAPHY & INFO
   ========================================= */
.info-group {
    margin-bottom: 1.5rem;
}

.info-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
}

/* =========================================
   BADGES & STATUS
   ========================================= */

/* Badge Tip Cameră (Tabel) */
.badge-room {
    padding: 0.5em 1em;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.badge-single {
    background-color: rgba(66, 165, 245, 0.15);
    color: var(--color-single);
    border-color: rgba(66, 165, 245, 0.2);
}

.badge-double {
    background-color: rgba(102, 187, 106, 0.15);
    color: var(--color-double);
    border-color: rgba(102, 187, 106, 0.2);
}

.badge-suite {
    background-color: rgba(255, 167, 38, 0.15);
    color: var(--color-suite);
    border-color: rgba(255, 167, 38, 0.2);
}

.badge-default {
    background-color: rgba(229, 164, 164, 0.15);
    color: #e5a4a4;
    border-color: rgba(229, 164, 164, 0.2);
}


/* Status Dot (Mic - Tabel) */
.status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-text {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Status Badge (Mare - Header Detalii) */
.status-badge-lg {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Culori Status Comune */
.status-active {
    background-color: #dcfce7;
    color: #16a34a;
}
    /* Verde pt badge mare */
    .status-active.status-dot {
        background-color: #22c55e;
    }
/* Verde pt dot */

.status-inactive {
    background-color: #fee2e2;
    color: #dc2626;
}
    /* Roșu pt badge mare */
    .status-inactive.status-dot {
        background-color: #ef4444;
    }
/* Roșu pt dot */

/* =========================================
   TABLES
   ========================================= */
.modern-table-container {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.table-hover tbody tr:hover {
    background-color: #fdfdfd;
}

/* Timeline Table (Specific Detalii) */
.timeline-table th {
    background: #f8fafc;
}

.timeline-table td {
    border-bottom: 1px solid #f1f5f9;
}

/* =========================================
   BUTTONS (ICON & PILL)
   ========================================= */

/* 1. Buton Rotund Mic (Icon) - Folosit în tabele */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-decoration: none !important;
    outline: none !important;
}

    .btn-icon:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

/* 2. Buton Mare Pill (Action) - Folosit în pagina Detalii */
.btn-action-modern {
    border-radius: 50px;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

    .btn-action-modern:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

/* --- CULORI BUTOANE (Soft Colors) --- 
   Se aplică atât la .btn-icon cât și la .btn-action-modern */

.btn-soft-primary {
    background: var(--soft-primary-bg);
    color: var(--soft-primary-text) !important;
}

    .btn-soft-primary:hover {
        background: var(--soft-primary-text) !important;
        color: white !important;
    }

.btn-soft-warning {
    background: var(--soft-warning-bg);
    color: var(--soft-warning-text) !important;
}

    .btn-soft-warning:hover {
        background: var(--soft-warning-text) !important;
        color: white !important;
    }

.btn-soft-danger {
    background: var(--soft-danger-bg);
    color: var(--soft-danger-text) !important;
}

    .btn-soft-danger:hover {
        background: var(--soft-danger-text) !important;
        color: white !important;
    }

.btn-soft-success {
    background: var(--soft-success-bg);
    color: var(--soft-success-text) !important;
}

    .btn-soft-success:hover {
        background: var(--soft-success-text) !important;
        color: white !important;
    }

.btn-soft-secondary {
    background: var(--soft-secondary-bg);
    color: var(--soft-secondary-text) !important;
}

    .btn-soft-secondary:hover {
        background: var(--soft-secondary-text) !important;
        color: white !important;
    }

@media (max-width: 576px) {

    .mobile-actions-grid {
        /* Transformăm flex-ul în grilă */
        display: grid !important;
        /* 2 coloane egale */
        grid-template-columns: 1fr 1fr;
        /* Spațiu între butoane (sus-jos și stânga-dreapta) */
        gap: 10px !important;
        /* Scoatem alinierea la dreapta specifică desktop-ului */
        justify-content: center !important;
        width: 100%;
    }

        /* Asigurăm centrarea fiecărui buton în celula lui */
        .mobile-actions-grid > a,
        .mobile-actions-grid > button,
        .mobile-actions-grid > form {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%; /* Butonul ocupă tot spațiul celulei */
        }

            /* FIX SPECIAL: Elementul <form> are clasa "d-inline" din Bootstrap */
            /* Trebuie să o anulăm ca să stea corect în grilă */
            .mobile-actions-grid > form.d-inline {
                display: flex !important;
            }
}

/* =========================================
   ALERTS & MISC
   ========================================= */
.alert-modern {
    border: none;
    border-left: 4px solid transparent;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    animation: slideInDown 0.4s ease-out forwards;
}

.alert-modern-success {
    background-color: #f0fdf4;
    border-left-color: #22c55e;
    color: #15803d;
}

.alert-modern-danger {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #b91c1c;
}

.alert-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.alert-modern-success .alert-icon-wrapper {
    background-color: #dcfce7;
    color: #16a34a;
}

.alert-modern-danger .alert-icon-wrapper {
    background-color: #fee2e2;
    color: #dc2626;
}

.search-input {
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    padding-left: 2.5rem;
    background: #f8fafc;
    width: 250px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.room-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.room-type-option {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

    .room-type-option:hover {
        border-color: #007bff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,123,255,0.2);
    }

    .room-type-option.selected {
        border-color: #007bff;
        background-color: #e3f2fd;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    }

.room-type-label {
    display: block;
    padding: 1.5rem 1rem;
    text-align: center;
    margin: 0;
    cursor: pointer;
}

    .room-type-label i {
        display: block;
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

.room-type-option[data-type="Single"] i {
    color: #42A5F5;
}

.room-type-option[data-type="Double"] i {
    color: #66BB6A;
}

.room-type-option[data-type="Suite"] i {
    color: #FFA726;
}

.room-type-label span {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.room-type-label small {
    color: #6c757d;
    font-size: 0.85rem;
}

.room-selection-container {
    max-height: 453px; /* înălțimea maximă a containerului */
    overflow-y: auto; /* scroll vertical dacă sunt prea multe camere */
    padding-right: 5px; /* puțin spațiu ca să nu taie textul lângă scroll */
}


/* Preview Card */
.room-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.room-number-preview {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.preview-price {
    font-size: 1.25rem;
    color: #28a745;
    font-weight: 600;
}

/* Room Type Badges pentru lista */
.room-type-badge {
    display: inline-block;
    padding: 0.4em 0.8em;
    font-size: 0.85em;
    font-weight: 500;
    border-radius: 0.375rem;
    text-transform: capitalize;
}

.room-type-single {
    background-color: #17a2b8;
    color: white;
}

.room-type-double {
    background-color: #28a745;
    color: white;
}

.room-type-suite {
    background-color: #ffc107;
    color: #212529;
}

.room-type-default {
    background-color: #e5a4a4;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.4em 0.8em;
    font-size: 0.85em;
    font-weight: 500;
    border-radius: 0.375rem;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Statistici Cards */
.stats-container {
    text-align: center;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

    .stat-card:hover {
        background: #e9ecef;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
    display: block;
    margin-bottom: 0.25rem;
}

    .stat-number.text-success {
        color: #28a745 !important;
    }

    .stat-number.text-info {
        color: #17a2b8 !important;
    }

    .stat-number.text-warning {
        color: #ffc107 !important;
    }

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    display: block;
}

.room-type-summary {
    margin-bottom: 0.25rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
}

    .action-buttons .btn {
        padding: 0.375rem 0.5rem;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .room-type-selector {
        grid-template-columns: 1fr;
    }

    .room-preview {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .stats-card {
        margin-bottom: 0.5rem;
    }

    .rooms-table {
        font-size: 0.9rem;
    }

    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .room-type-label {
        padding: 1rem 0.5rem;
    }

        .room-type-label i {
            font-size: 1.5rem;
        }
}

/* Room Delete Page Styles */
.room-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin-top: 1rem;
}

.info-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .info-item strong {
        min-width: 140px;
        color: #495057;
    }

.room-number-display {
    font-size: 1.2rem;
    font-weight: 700;
    color: #dc3545;
}


@media (max-width: 768px) {
    .info-item {
        flex-direction: column;
        align-items: flex-start;
    }

        .info-item strong {
            min-width: auto;
        }
}