/* ============================================
   HOSTOMATIC - GLOBAL STYLES
   Unified theme for all pages
   Color Palette: Orange, White, Gray
   ============================================ */

:root {
    /* Primary Colors */
    --hm-primary: #f97316;
    --hm-primary-dark: #ea580c;
    --hm-primary-light: #fed7aa;
    --hm-primary-lighter: #fff7ed;
    
    /* Gradients */
    --hm-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --hm-gradient-dark: linear-gradient(135deg, #27272a 0%, #18181b 100%);
    --hm-gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --hm-gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --hm-gradient-info: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    
    /* Neutral Colors */
    --hm-white: #ffffff;
    --hm-gray-50: #fafafa;
    --hm-gray-100: #f4f4f5;
    --hm-gray-200: #e4e4e7;
    --hm-gray-300: #d4d4d8;
    --hm-gray-400: #a1a1aa;
    --hm-gray-500: #71717a;
    --hm-gray-600: #52525b;
    --hm-gray-700: #3f3f46;
    --hm-gray-800: #27272a;
    --hm-gray-900: #18181b;
    
    /* Shadows */
    --hm-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --hm-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --hm-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --hm-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --hm-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --hm-radius-sm: 0.375rem;
    --hm-radius: 0.5rem;
    --hm-radius-md: 0.75rem;
    --hm-radius-lg: 1rem;
    --hm-radius-full: 9999px;
    
    /* Transitions */
    --hm-transition: all 0.2s ease;
    --hm-transition-slow: all 0.3s ease;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */

.hm-page {
    min-height: calc(100vh - 60px);
    background: linear-gradient(135deg, var(--hm-gray-100) 0%, var(--hm-gray-50) 100%);
    padding-bottom: 2rem;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.hm-page-header {
    background: var(--hm-gradient);
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.hm-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: hm-pulse-glow 4s ease-in-out infinite;
}

@keyframes hm-pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.hm-page-header-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.hm-page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hm-page-title {
    color: var(--hm-white);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hm-page-title i {
    font-size: 1.5rem;
}

.hm-page-subtitle {
    color: rgba(255,255,255,0.9);
    margin: 0.5rem 0 0;
    font-size: 1rem;
}

.hm-page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.hm-page-breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--hm-transition);
}

.hm-page-breadcrumb a:hover {
    color: var(--hm-white);
}

.hm-page-breadcrumb i {
    font-size: 0.75rem;
}

/* ============================================
   CARDS
   ============================================ */

.hm-card {
    background: var(--hm-white);
    border-radius: var(--hm-radius-lg);
    box-shadow: var(--hm-shadow);
    overflow: hidden;
    transition: var(--hm-transition-slow);
}

.hm-card:hover {
    box-shadow: var(--hm-shadow-lg);
}

.hm-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--hm-gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--hm-gray-50);
}

.hm-card-header-dark {
    background: var(--hm-gradient-dark);
    color: var(--hm-white);
    border-bottom: none;
}

.hm-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hm-gray-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hm-card-title i {
    color: var(--hm-primary);
}

.hm-card-header-dark .hm-card-title {
    color: var(--hm-white);
}

.hm-card-header-dark .hm-card-title i {
    color: var(--hm-primary);
}

.hm-card-body {
    padding: 1.5rem;
}

.hm-card-footer {
    padding: 1rem 1.5rem;
    background: var(--hm-gray-50);
    border-top: 1px solid var(--hm-gray-100);
}

/* ============================================
   BUTTONS
   ============================================ */

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--hm-radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--hm-transition-slow);
}

.hm-btn:hover {
    transform: translateY(-2px);
}

.hm-btn-primary {
    background: var(--hm-gradient);
    color: var(--hm-white);
}

.hm-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    color: var(--hm-white);
}

.hm-btn-success {
    background: var(--hm-gradient-success);
    color: var(--hm-white);
}

.hm-btn-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: var(--hm-white);
}

.hm-btn-danger {
    background: var(--hm-gradient-danger);
    color: var(--hm-white);
}

.hm-btn-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    color: var(--hm-white);
}

.hm-btn-outline {
    background: transparent;
    color: var(--hm-gray-700);
    border: 1px solid var(--hm-gray-300);
}

.hm-btn-outline:hover {
    border-color: var(--hm-primary);
    color: var(--hm-primary);
    transform: none;
}

.hm-btn-white {
    background: var(--hm-white);
    color: var(--hm-primary);
}

.hm-btn-white:hover {
    box-shadow: var(--hm-shadow-lg);
    color: var(--hm-primary);
}

.hm-btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
}

.hm-btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.hm-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--hm-radius);
}

.hm-btn-icon.hm-btn-sm {
    width: 32px;
    height: 32px;
}

/* ============================================
   TABS
   ============================================ */

.hm-tabs {
    display: flex;
    background: var(--hm-gray-50);
    border-bottom: 1px solid var(--hm-gray-200);
    overflow-x: auto;
}

.hm-tab {
    padding: 1rem 1.5rem;
    color: var(--hm-gray-500);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--hm-transition);
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
}

.hm-tab:hover {
    color: var(--hm-primary);
    background: rgba(249, 115, 22, 0.05);
}

.hm-tab.active {
    color: var(--hm-primary);
    border-bottom-color: var(--hm-primary);
    background: var(--hm-white);
}

.hm-tab-badge {
    background: var(--hm-primary-light);
    color: var(--hm-primary-dark);
    padding: 0.125rem 0.5rem;
    border-radius: var(--hm-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.hm-tab.active .hm-tab-badge {
    background: var(--hm-primary);
    color: var(--hm-white);
}

.hm-tab-content {
    padding: 1.5rem;
}

/* ============================================
   STATS
   ============================================ */

.hm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.hm-stat {
    background: var(--hm-gray-50);
    padding: 1.25rem;
    border-radius: var(--hm-radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--hm-transition);
}

.hm-stat:hover {
    background: var(--hm-primary-lighter);
    transform: translateY(-2px);
}

.hm-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--hm-radius-md);
    background: var(--hm-gradient);
    color: var(--hm-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.hm-stat-icon.green { background: var(--hm-gradient-success); }
.hm-stat-icon.red { background: var(--hm-gradient-danger); }
.hm-stat-icon.blue { background: var(--hm-gradient-info); }
.hm-stat-icon.gold { background: linear-gradient(135deg, #f59e0b, #d97706); }

.hm-stat-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hm-gray-800);
    margin: 0;
    line-height: 1;
}

.hm-stat-content p {
    font-size: 0.875rem;
    color: var(--hm-gray-500);
    margin: 0.25rem 0 0;
}

/* ============================================
   FORMS
   ============================================ */

.hm-form-group {
    margin-bottom: 1.25rem;
}

.hm-form-label {
    display: block;
    font-weight: 500;
    color: var(--hm-gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.hm-form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--hm-gray-300);
    border-radius: var(--hm-radius);
    font-size: 0.875rem;
    transition: var(--hm-transition);
}

.hm-form-control:focus {
    outline: none;
    border-color: var(--hm-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.hm-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ============================================
   TABLES
   ============================================ */

.hm-table-wrapper {
    overflow-x: auto;
}

.hm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.hm-table thead th {
    background: var(--hm-gradient);
    color: var(--hm-white);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hm-table thead th:first-child {
    border-radius: var(--hm-radius) 0 0 0;
}

.hm-table thead th:last-child {
    border-radius: 0 var(--hm-radius) 0 0;
}

.hm-table tbody tr {
    transition: var(--hm-transition);
}

.hm-table tbody tr:hover {
    background: var(--hm-primary-lighter);
}

.hm-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--hm-gray-100);
    vertical-align: middle;
}

/* ============================================
   BADGES
   ============================================ */

.hm-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--hm-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.hm-badge-primary {
    background: var(--hm-primary-light);
    color: var(--hm-primary-dark);
}

.hm-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.hm-badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.hm-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.hm-badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* ============================================
   ALERTS
   ============================================ */

.hm-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--hm-radius-md);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hm-alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.hm-alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.hm-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.hm-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.hm-alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.hm-empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.hm-empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--hm-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.hm-empty-state-icon i {
    font-size: 2rem;
    color: var(--hm-gray-400);
}

.hm-empty-state h3 {
    color: var(--hm-gray-700);
    margin-bottom: 0.5rem;
}

.hm-empty-state p {
    color: var(--hm-gray-500);
    margin-bottom: 1.5rem;
}

/* ============================================
   LOADING
   ============================================ */

.hm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--hm-gray-500);
}

.hm-loading-spinner {
    font-size: 2rem;
    color: var(--hm-primary);
    margin-bottom: 1rem;
    animation: hm-spin 1s linear infinite;
}

@keyframes hm-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

.hm-fade-in {
    animation: hm-fade-in 0.3s ease forwards;
}

@keyframes hm-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hm-slide-in {
    animation: hm-slide-in 0.4s ease forwards;
}

@keyframes hm-slide-in {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   PROPERTY DETAIL SPECIFIC
   ============================================ */

.property-header-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.property-color-indicator {
    width: 60px;
    height: 60px;
    border-radius: var(--hm-radius-md);
    box-shadow: var(--hm-shadow);
    flex-shrink: 0;
}

.property-header-details h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--hm-white);
    margin: 0 0 0.25rem;
}

.property-header-location {
    color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.property-header-location i {
    color: var(--hm-primary-light);
}

.property-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.property-quick-stats {
    display: flex;
    gap: 2rem;
    margin-left: auto;
}

.property-quick-stat {
    text-align: center;
}

.property-quick-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--hm-white);
}

.property-quick-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Config status badges */
.property-config-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.config-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--hm-radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
}

.config-badge.configured {
    background: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.config-badge.not-configured {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Section headers */
.hm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hm-gray-200);
}

.hm-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--hm-gray-800);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.hm-section-title i {
    color: var(--hm-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .property-header-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .property-quick-stats {
        margin-left: 0;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .hm-page-header {
        padding: 1.5rem 1rem;
    }
    
    .hm-page-title {
        font-size: 1.25rem;
    }
    
    .hm-page-header-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .property-quick-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .property-header-actions {
        width: 100%;
    }
    
    .hm-btn {
        width: 100%;
        justify-content: center;
    }
    
    .hm-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .hm-tab {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    .hm-stats-grid {
        grid-template-columns: 1fr;
    }
}
