/* Admin Dashboard - Dual Brands Blue & Red Theme */

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

body {
    font-family: 'Karla', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header {
    background-color: #0071B9;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: white;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
}

.logo-container h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #CA1F2C;
}

/* Dashboard */
.dashboard {
    padding: 3rem 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 61, 165, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #0071B9;
    font-weight: 700;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Controls */
.controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    background: white;
    color: #666;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #0071B9;
    color: #0071B9;
}

.filter-btn.active {
    background-color: #0071B9;
    border-color: #0071B9;
    color: white;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    width: 300px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #0071B9;
}

/* Print Button */
.print-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background-color: #CA1F2C;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(202, 31, 44, 0.30);
}

.print-btn:hover {
    background-color: #A01822;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(202, 31, 44, 0.40);
}

.print-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.25);
}

/* Table */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

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

thead {
    background-color: #0071B9;
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #e8f0ff;
}

td {
    padding: 1rem;
    white-space: nowrap;
}

/* Type Badge (new for DMA support) */
.type-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    white-space: nowrap;
}

.type-location {
    background-color: #E5F0FF;
    color: #0071B9;
    border: 1.5px solid #0071B9;
}

.type-dma {
    background-color: #F3E8FF;
    color: #7B2FBE;
    border: 1.5px solid #7B2FBE;
}

/* Status Badge */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-new {
    background-color: #FFE5E5;
    color: #0071B9;
}

.status-in-progress {
    background-color: #FFF4E5;
    color: #FFA500;
}

.status-completed {
    background-color: #E5F5E5;
    color: #28A745;
}

/* Action Buttons */
.action-btn {
    padding: 0.4rem 0.8rem;
    margin: 0 0.25rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.generate-btn {
    background-color: #CA1F2C;
    color: white;
}

.generate-btn:hover {
    background-color: #A01822;
}

.status-btn {
    background-color: #e0e0e0;
    color: #333;
}

.status-btn:hover {
    background-color: #d0d0d0;
}

/* Empty State */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: #999;
    display: none;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background-color: #0071B9;
    color: white;
    padding: 1.5rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-instructions {
    margin-bottom: 1rem;
    color: #666;
}

#promptText {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.copy-btn,
.genspark-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn {
    background-color: #0071B9;
    color: white;
}

.copy-btn:hover {
    background-color: #005A9C;
}

.genspark-btn {
    background-color: #CA1F2C;
    color: white;
}

.genspark-btn:hover {
    background-color: #A01822;
}

.copy-success {
    text-align: center;
    color: #28A745;
    font-weight: 600;
    margin-top: 1rem;
}

/* Footer */
footer {
    background-color: #0071B9;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

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

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-left p {
    color: #cce0ff;
    font-size: 0.9rem;
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #CA1F2C;
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        flex-wrap: wrap;
    }

    .controls-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .print-btn {
        justify-content: center;
        width: 100%;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-right {
        flex-direction: column;
        gap: 1rem;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
    }
}
