/**
 * Professional Design Enhancements
 *
 * Additional polish and refinements for a more professional look
 */

/* ============================================
   SMOOTH SCROLLING & ANIMATIONS
   ============================================ */

html {
    scroll-behavior: smooth;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ENHANCED FOCUS STATES
   ============================================ */

input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    border-color: var(--puwer-primary);
}

/* ============================================
   IMPROVED FORM CONTROLS
   ============================================ */

.form-control {
    transition: all 0.2s ease;
    background-color: var(--puwer-bg);
}

.form-control:hover {
    border-color: var(--puwer-text-light);
}

.form-control:focus {
    background-color: var(--puwer-bg);
    transform: translateY(-1px);
}

/* ============================================
   PAGE HEADER ENHANCEMENTS
   ============================================ */

.page-header {
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--puwer-border-light);
}

.page-header .btn-primary {
    width: auto;
    min-width: 160px;
    box-shadow: var(--shadow-sm);
}

.page-header .btn-primary:hover {
    box-shadow: var(--shadow-md);
}

/* ============================================
   IMPROVED LOADING STATES
   ============================================ */

.loading-indicator {
    padding: 3rem;
    text-align: center;
}

.loading-indicator::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-left: 0.5rem;
    border: 3px solid var(--puwer-border);
    border-top-color: var(--puwer-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   ENHANCED EMPTY STATES
   ============================================ */

.empty-state {
    padding: 4rem 2rem;
    color: var(--puwer-text-muted);
    font-size: 1rem;
    background-color: var(--puwer-bg-light);
    border-radius: var(--radius-md);
}

/* ============================================
   IMPROVED MODALS
   ============================================ */

.modal {
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background-color: var(--puwer-bg-light);
}

.modal-footer {
    background-color: var(--puwer-bg-light);
}

/* ============================================
   ENHANCED BADGES
   ============================================ */

.badge {
    transition: all 0.2s ease;
}

.badge-active {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.badge-inactive {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

/* ============================================
   BETTER BUTTON STATES
   ============================================ */

.btn-secondary {
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* ============================================
   IMPROVED TABLE DESIGN
   ============================================ */

.users-table {
    position: relative;
}

.users-table thead th {
    position: sticky;
    top: 0;
    background-color: var(--puwer-bg-light);
    z-index: 10;
}

.users-table tbody tr {
    border-left: 3px solid transparent;
}

.users-table tbody tr:hover {
    border-left-color: var(--puwer-primary-light);
}

/* ============================================
   FILTER SECTION POLISH
   ============================================ */

.filters-section {
    transition: all 0.2s ease;
}

.filters-section:hover {
    box-shadow: var(--shadow-md);
}

.filter-group label {
    transition: color 0.2s ease;
}

.filter-group:focus-within label {
    color: var(--puwer-primary);
}

/* ============================================
   DASHBOARD CONTENT SPACING - CRITICAL FIXES
   ============================================ */

.dashboard-content {
    animation: fadeInContent 0.4s ease;
    padding: 2.5rem 3rem !important;
    max-width: 100%;
    width: 100%;
    margin: 0;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix for main dashboard layout */
.dashboard-main {
    background-color: var(--puwer-bg-light);
    min-height: 100vh;
}

/* Responsive dashboard content padding */
@media (max-width: 1200px) {
    .dashboard-content {
        padding: 2rem 2.5rem !important;
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 1.5rem 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .dashboard-content {
        padding: 1rem 1rem !important;
    }
}

/* ============================================
   ACTIONS CELL IMPROVEMENTS
   ============================================ */

.actions-cell {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-start;
}

/* ============================================
   IMAGE ITEMS ENHANCEMENT
   ============================================ */

.image-item {
    transition: all 0.2s ease;
}

.image-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.image-thumbnail {
    transition: transform 0.2s ease;
}

.image-item:hover .image-thumbnail {
    transform: scale(1.05);
}

/* ============================================
   FORM SECTION POLISH
   ============================================ */

.form-section {
    animation: fadeInSection 0.3s ease;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.form-section h3 {
    position: relative;
    padding-bottom: 0.5rem;
}

.form-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--puwer-primary), var(--puwer-primary-light));
    border-radius: 2px;
}

/* ============================================
   RESPONSIVE ENHANCEMENTS
   ============================================ */

@media (max-width: 768px) {
    .page-header {
        padding-bottom: 0.75rem;
    }

    .page-header .btn-primary {
        width: 100%;
    }

    .filters-section {
        padding: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .sidebar,
    .page-header .btn,
    .filters-section,
    .actions-cell,
    .modal {
        display: none !important;
    }

    .dashboard-main {
        margin: 0 !important;
    }

    .users-table {
        border: 1px solid #000;
    }

    .users-table th,
    .users-table td {
        border: 1px solid #000;
    }
}
