/* Pounce Dashboard Styles */

:root {
    --ink: #0a0a0a;
    --paper: #FFFBF5;
    --amber: #F59E0B;
    --amber-soft: #FEF3D6;
    --slate: #555;
    --mist: #e8e8e4;
    --white: #ffffff;
    --red: #ef4444;
    --green: #10b981;
    --blue: #3b82f6;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

/* Navigation */
.dashboard-nav {
    background: var(--white);
    border-bottom: 1px solid var(--mist);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--amber);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--slate);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--amber-soft);
    color: var(--ink);
}

.nav-link.active {
    background: var(--amber);
    color: var(--white);
}

/* Main Content */
.dashboard-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--ink);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--ink);
}

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

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--amber);
    font-family: 'Space Grotesk', sans-serif;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--mist);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--amber);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.size-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.size-inputs input {
    width: 100px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--mist);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--white);
    color: var(--ink);
    border: 2px solid var(--mist);
}

.btn-secondary:hover {
    border-color: var(--amber);
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-loader {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hidden {
    display: none !important;
}

/* ICP Items */
.icp-item {
    background: var(--amber-soft);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.icp-content {
    flex: 1;
}

.icp-industries {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--ink);
}

.icp-meta {
    font-size: 0.875rem;
    color: var(--slate);
    margin-bottom: 0.5rem;
}

.icp-titles {
    font-size: 0.875rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.icp-pain {
    font-size: 0.875rem;
    color: var(--slate);
    font-style: italic;
}

.icp-actions {
    display: flex;
    gap: 0.5rem;
}

.icp-preview {
    padding: 1rem;
    background: var(--amber-soft);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.icp-preview-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.icp-preview-meta {
    font-size: 0.875rem;
    color: var(--slate);
}

/* Filters */
.filters {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-select,
.filter-input {
    padding: 0.5rem;
    border: 2px solid var(--mist);
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 150px;
}

/* Table */
.table-container {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

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

thead {
    background: var(--amber-soft);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--ink);
    font-family: 'Space Grotesk', sans-serif;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--mist);
}

tbody tr:hover {
    background: var(--amber-soft);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-score {
    background: var(--amber);
    color: var(--white);
}

.badge-new {
    background: var(--blue);
    color: var(--white);
}

.badge-researched {
    background: var(--green);
    color: var(--white);
}

.badge-drafted {
    background: var(--amber);
    color: var(--white);
}

.badge-sent {
    background: var(--slate);
    color: var(--white);
}

.badge-replied {
    background: var(--green);
    color: var(--white);
}

.badge-draft {
    background: var(--mist);
    color: var(--ink);
}

.badge-approved {
    background: var(--blue);
    color: var(--white);
}

/* Drafts */
.drafts-list {
    display: grid;
    gap: 1.5rem;
}

.draft-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.draft-subject {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--ink);
}

.draft-body {
    color: var(--slate);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.draft-meta {
    font-size: 0.875rem;
    color: var(--slate);
    margin-bottom: 1rem;
}

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

.rate-limit-warning {
    background: var(--amber-soft);
    border-left: 4px solid var(--amber);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--slate);
    font-style: italic;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--green);
}

.toast-error {
    border-left: 4px solid var(--red);
}

.toast-info {
    border-left: 4px solid var(--blue);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--mist);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--slate);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--mist);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-input,
.modal-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--mist);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
}

.modal-textarea {
    resize: vertical;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-nav {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }

    .nav-menu {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .dashboard-main {
        padding: 1rem;
    }

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

    .filters {
        flex-direction: column;
    }

    .filter-select,
    .filter-input {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }

    .icp-item {
        flex-direction: column;
    }

    .icp-actions {
        width: 100%;
        justify-content: flex-end;
    }

    #toast-container {
        right: 1rem;
        left: 1rem;
    }
}
