﻿/* ============================================
   APPROVALS - BASE STYLES
   Toyota Professional Insurance Interface
   ============================================ */

/* Container & Layout */
.approval-dashboard-container {
    padding: 2rem;
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Dashboard Header */
.approval-dashboard-header {
    border-radius: 1rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.approval-dashboard-title h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.approval-dashboard-title p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.approval-dashboard-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Search Container */
.search-container {
    position: relative;
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.search-container input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 2.75rem;
    border: 2px solid;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

    .search-container input:focus {
        outline: none;
    }

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .clear-search:hover {
        transform: translateY(-50%) scale(1.1);
    }

/* Filter Container */
.filter-container {
    display: flex;
    gap: 0.75rem;
}

.filter-dropdown {
    position: relative;
}

.filter-selected {
    padding: 0.875rem 1.25rem;
    border: 2px solid;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

    .filter-selected:hover {
        transform: translateY(-1px);
    }

    .filter-selected i {
        font-size: 0.875rem;
        transition: transform 0.2s ease;
    }

.filter-options {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    border: 1px solid;
    border-radius: 0.5rem;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

.filter-option {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
}

    .filter-option:hover {
        transform: translateX(4px);
    }

    .filter-option.selected {
        font-weight: 600;
    }

/* Refresh Button */
.approval-dashboard-refresh {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .approval-dashboard-refresh:hover {
        transform: translateY(-1px);
    }

/* Loading State */
.approval-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    border-radius: 0.75rem;
    gap: 1rem;
}

    .approval-loading i {
        font-size: 3rem;
    }

    .approval-loading span {
        font-size: 1.1rem;
    }

/* Tabs */
.approval-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid;
    overflow-x: auto;
}

.approval-tab {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

    .approval-tab:hover {
        transform: translateY(-2px);
    }

    .approval-tab.active {
        border-bottom: 3px solid;
    }

    .approval-tab i {
        font-size: 1rem;
    }

/* Section */
.approval-section {
    border-radius: 0.75rem;
    padding: 2rem;
    border: 1px solid;
}

.approval-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.approval-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .approval-section-title i {
        font-size: 1.5rem;
    }

    .approval-section-title h2 {
        font-size: 1.5rem;
        font-weight: 600;
        margin: 0;
    }

    .approval-section-title.needs-attention {
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.approval-section-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    min-width: 100px;
}

    .stat-badge span:first-child {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .stat-badge span:last-child {
        font-size: 0.8rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

/* Empty State */
.approval-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 0.75rem;
}

    .approval-empty-state i {
        font-size: 4rem;
        margin-bottom: 1.5rem;
    }

    .approval-empty-state p {
        font-size: 1.1rem;
    }

/* Table */
.approval-table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
}

.approval-table {
    width: 100%;
    border-collapse: collapse;
}

    .approval-table thead tr {
        border-bottom: 2px solid;
    }

    .approval-table th {
        padding: 1rem 1.5rem;
        text-align: left;
        font-weight: 600;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .approval-table tbody tr {
        border-bottom: 1px solid;
        transition: all 0.2s ease;
    }

    .approval-table td {
        padding: 1.25rem 1.5rem;
        vertical-align: middle;
    }

/* Table Content Styling */
.quote-number {
    display: flex;
    align-items: center;
}

.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.reason-text,
.value-text {
    font-size: 0.9375rem;
}

.user-info-approval {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.user-name {
    font-weight: 500;
    font-size: 0.9375rem;
}

.date-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

    .date-info .date {
        font-weight: 500;
        font-size: 0.9375rem;
    }

    .date-info .time {
        font-size: 0.8125rem;
    }

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Action Buttons */
.approval-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.approval-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .approval-action-btn:hover {
        transform: translateY(-1px);
    }

    .approval-action-btn i {
        font-size: 0.875rem;
    }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .approval-dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        max-width: none;
    }

    .filter-container {
        width: 100%;
    }

    .filter-dropdown {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .approval-dashboard-container {
        padding: 1rem;
    }

    .approval-dashboard-header {
        padding: 2rem 1.5rem;
    }

    .approval-dashboard-title h1 {
        font-size: 2rem;
    }

    .approval-section {
        padding: 1.5rem;
    }

    .approval-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .approval-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .approval-action-btn span {
        display: none;
    }

    .approval-action-btn {
        padding: 0.625rem;
        width: 2.5rem;
        height: 2.5rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .approval-dashboard-title h1 {
        font-size: 1.75rem;
    }

    .approval-tabs {
        gap: 0.25rem;
    }

    .approval-tab {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .stat-badge {
        min-width: 80px;
        padding: 0.625rem 1rem;
    }

        .stat-badge span:first-child {
            font-size: 1.25rem;
        }
}
