/* ===================================================
   PINNACLE PROPANE PORTAL - STYLES
   Branding: Pinnacle Red (#EC1E26)
   =================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #F3F4F6;
    color: #1A1A1A;
    line-height: 1.6;
    min-height: 100vh;
}

/* ============= LAYOUT ============= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ============= TYPOGRAPHY ============= */

h1 {
    color: #EC1E26;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-align: center;
}

h2 {
    color: #EC1E26;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

h3 {
    color: #1A1A1A;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

p {
    color: #4A4A4A;
    margin-bottom: 15px;
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* ============= BUTTONS ============= */

.btn-primary {
    background: #EC1E26;
    color: #FFFFFF;
    padding: 16px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 30px auto;
}

.btn-primary:hover:not(:disabled) {
    background: #B71A1F;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 30, 38, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #FFFFFF;
    color: #EC1E26;
    padding: 12px 24px;
    border: 2px solid #EC1E26;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #EC1E26;
    color: #FFFFFF;
}

/* ============= PHOTO UPLOAD GRID ============= */

.photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.upload-box {
    background: #FFFFFF;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.upload-box.has-photo {
    border: 3px solid #EC1E26;
}

.upload-box.error {
    border: 3px solid #DC3545;
}

.upload-label {
    margin-bottom: 20px;
    text-align: center;
}

.required-badge {
    background: #EC1E26;
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.upload-area {
    border: 3px dashed #EC1E26;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #FFF5F6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: #FFE8EA;
    border-color: #B71A1F;
}

.upload-area.dragover {
    background: #FFE8EA;
    border-color: #B71A1F;
    border-style: solid;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-text {
    color: #EC1E26;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.upload-hint {
    color: #999;
    font-size: 0.9rem;
}

/* ============= PREVIEW ============= */

.preview-container {
    margin-top: 15px;
    display: none;
}

.preview-container.active {
    display: block;
}

.preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.preview-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-filename {
    color: #666;
    font-size: 0.9rem;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove {
    background: #DC3545;
    color: #FFFFFF;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-remove:hover {
    background: #C82333;
}

/* ============= EXAMPLES SECTION ============= */

.examples-section {
    background: #FFFFFF;
    border-radius: 15px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.example-box {
    background: #FFF5F6;
    border: 2px solid #EC1E26;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.example-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.example-box p {
    color: #1A1A1A;
    font-size: 0.95rem;
    margin: 0;
}

/* ============= DASHBOARD ============= */

.dashboard-header {
    background: #FFFFFF;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-bottom: 4px solid #EC1E26;
}

.dashboard-header h1 {
    color: #1A1A1A;
    text-align: left;
    margin-bottom: 5px;
}

.dashboard-subtitle {
    color: #666;
    font-size: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #EC1E26;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

/* ============= ACTIONS BAR ============= */

.actions-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 12px 24px;
    background: #EC1E26;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-action:hover {
    background: #B71A1F;
}

.btn-action.secondary {
    background: #28A745;
}

.btn-action.secondary:hover {
    background: #218838;
}

/* ============= TABLE ============= */

.table-container {
    background: #FFFFFF;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #1A1A1A;
    color: #FFFFFF;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid #F0F0F0;
}

tbody tr:hover {
    background: #FFF5F6;
}

tbody tr.expanded-row {
    background: #FFF5F6;
}

/* ============= CLASSIFICATION BADGES ============= */

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-green {
    background: #D4EDDA;
    color: #155724;
}

.badge-yellow {
    background: #FFF3CD;
    color: #856404;
}

.badge-red {
    background: #F8D7DA;
    color: #721C24;
}

.badge-success {
    background: #D4EDDA;
    color: #155724;
}

.badge-warning {
    background: #FFF3CD;
    color: #856404;
}

.badge-info {
    background: #2196F3;
    color: white;
}

/* ============= EXPANDED PHOTO VIEWER ============= */

.photo-viewer {
    padding: 20px;
    background: #F8F9FA;
    border-top: 3px solid #EC1E26;
}

.photo-viewer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.photo-viewer-item {
    text-align: center;
}

.photo-viewer-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #EC1E26;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-viewer-item img:hover {
    transform: scale(1.05);
}

.photo-viewer-label {
    margin-top: 10px;
    font-weight: 600;
    color: #EC1E26;
}

.ocr-info {
    background: #FFFFFF;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.ocr-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E0E0E0;
}

.ocr-info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.ocr-label {
    font-weight: 600;
    color: #666;
}

.ocr-value {
    color: #1A1A1A;
}

/* ============= BUTTONS IN TABLE ============= */

.btn-table {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 5px;
}

.btn-view {
    background: #EC1E26;
    color: #FFFFFF;
}

.btn-view:hover {
    background: #B71A1F;
}

.btn-delete {
    background: #DC3545;
    color: #FFFFFF;
}

.btn-delete:hover {
    background: #C82333;
}

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

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .photo-upload-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .actions-bar {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 10px;
    }
}

/* ============= HEADER & LOGO ============= */

.header-with-logo {
    background: #FFFFFF;
    padding: 20px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.pinnacle-logo {
    height: 48px;
    width: auto;
    display: block;
}

/* ============= PHOTO EXAMPLES WITH IMAGES ============= */

.examples-section {
    margin: 60px 0;
    padding: 40px;
    background: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.examples-section h2 {
    color: #EC1E26;
    text-align: center;
    margin-bottom: 10px;
}

.examples-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
}

.examples-grid-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.photo-example-card {
    background: #FFFFFF;
    border: 3px solid #EC1E26;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(236, 30, 38, 0.2);
}

.photo-example-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.example-card-title {
    font-weight: 700;
    color: #EC1E26;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.example-card-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* ============= INSTRUCTIONS BOX ============= */

.instructions-box {
    background: #FFF5F6;
    border: 2px solid #EC1E26;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
}

.instructions-box h3 {
    color: #EC1E26;
    margin-bottom: 20px;
}

.instructions-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions-box li {
    padding: 12px 0;
    border-bottom: 1px solid #FFDDDF;
    color: #1A1A1A;
    line-height: 1.6;
}

.instructions-box li:last-child {
    border-bottom: none;
}

.instructions-box strong {
    color: #EC1E26;
}

/* ============= RESPONSIVE UPDATES ============= */

@media (max-width: 1024px) {
    .examples-grid-images {
        grid-template-columns: 1fr;
    }

    .photo-example-card img {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .header-with-logo {
        padding: 15px 20px;
    }

    .pinnacle-logo {
        height: 40px;
    }

    .examples-section {
        padding: 20px;
    }

    .instructions-box {
        padding: 20px;
    }
}

/* ============= CAROUSEL COMPONENT ============= */

.carousel-container {
    margin-bottom: 40px;
}

.carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    background: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.carousel-slide img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 15px;
}

.carousel-caption {
    text-align: center;
    color: #1A1A1A;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 20px;
    background: #F3F4F6;
    border-radius: 8px;
    margin-top: 10px;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(236, 30, 38, 0.9);
    color: #FFFFFF;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.carousel-btn:hover {
    background: rgba(183, 26, 31, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px 0;
    background: #FFFFFF;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #CCC;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #EC1E26;
    transform: scale(1.3);
}

.indicator:hover {
    background: #B71A1F;
}

/* Touch/Swipe Support */
.carousel {
    touch-action: pan-y;
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .carousel-slide img {
        max-height: 350px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .carousel-caption {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
}
