/* Revenue Tool - Table Rock Energy Branded Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Table Rock Energy Brand Colors */
    --tre-navy: #0e2431;
    --tre-teal: #90c5ce;
    --tre-brown-dark: #5b4825;
    --tre-brown-medium: #775723;
    --tre-brown-light: #966e35;
    --tre-tan: #cab487;

    /* Applied Colors */
    --primary-color: var(--tre-navy);
    --primary-hover: #1a3a4f;
    --secondary-color: var(--tre-brown-dark);
    --secondary-hover: var(--tre-brown-medium);
    --accent-color: var(--tre-teal);
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: var(--tre-brown-light);
    --bg-color: #f5f5f4;
    --card-bg: #ffffff;
    --text-color: var(--tre-navy);
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --table-header-bg: #f9fafb;
    --table-row-alt: #f9fafb;
}

body {
    font-family: 'Oswald', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    text-align: left;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.btn-header {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.5rem 1.25rem;
}

.btn-header:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Main content */
main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--secondary-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

/* Upload Section */
.upload-section {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--tre-teal);
    background-color: rgba(144, 197, 206, 0.15);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.drop-zone p {
    color: var(--text-light);
}

.drop-zone-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

.file-list {
    margin: 1.5rem 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--table-header-bg);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.file-item-name {
    font-weight: 500;
    color: var(--text-color);
}

.file-item-size {
    font-size: 0.875rem;
    color: var(--text-light);
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.25rem;
}

/* Progress Section */
.progress-section {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--tre-teal);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-light);
}

/* Results Section */
.results-section {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 0.75rem;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--table-header-bg);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border-left: 4px solid var(--tre-teal);
}

.summary-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tre-navy);
}

.summary-card-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Errors Container */
.errors-container {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--error-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.errors-container h3 {
    color: var(--error-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.errors-container ul {
    list-style: none;
    padding-left: 0;
}

.errors-container li {
    color: #991b1b;
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.table-scroll {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--table-header-bg);
    font-weight: 600;
    color: var(--text-color);
    position: sticky;
    top: 0;
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background-color: var(--table-row-alt);
}

tbody tr:hover {
    background-color: rgba(144, 197, 206, 0.15);
}

tbody tr {
    cursor: pointer;
}

.status-success {
    color: var(--success-color);
    font-weight: 500;
}

.status-warning {
    color: var(--warning-color);
    font-weight: 500;
}

.status-error {
    color: var(--error-color);
    font-weight: 500;
}

/* Rows Preview */
.rows-preview {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.rows-preview h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    main {
        padding: 1rem;
    }

    .card, .upload-section, .progress-section, .results-section {
        padding: 1rem;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-actions {
        width: 100%;
    }

    .results-actions .btn {
        flex: 1;
        text-align: center;
    }

    th, td {
        padding: 0.5rem;
    }
}
