 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }

 /* Warm Editorial Color System */
 :root {
     --color-earth-900: #2C1810;
     --color-earth-800: #5C3A28;
     --color-earth-700: #8B5A3C;
     --color-earth-600: #A67C52;
     --color-earth-300: #C4B5A0;
     --color-sage-700: #4A5F4F;
     --color-sage-600: #6B8172;
     --color-sage-500: #8CA395;
     --color-coral-600: #E85D54;
     --color-coral-500: #FF7B6D;
     --color-cream: #FAF8F5;
     --color-sand: #F0EBE3;
     --color-stone: #E8E1D5;
     --font-display: 'Crimson Pro', serif;
     --font-body: 'DM Sans', sans-serif;
 }

 .dashboard-wrapper {
     background: var(--color-cream);
     color: var(--color-earth-900);
     -webkit-font-smoothing: antialiased;
     -moz-osx-font-smoothing: grayscale;
     line-height: 1.6;
 }
.ebooks-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 20px;
}

.ebooks-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.ebooks-table th,
.ebooks-table td {
    overflow: hidden;
    vertical-align: middle;
}

.ebooks-table th {
    white-space: nowrap;
}

.ebook-title {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ebook-meta {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}

.ebook-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    white-space: nowrap;
}

.ebook-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.action-btn {
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .ebooks-table {
        min-width: 760px;
    }

    .ebooks-table-container {
        overflow-x: auto;
    }
}
 /* Welcome Section */
 .welcome-section {
     margin-bottom: 40px;
 }

 .welcome-header {
     display: flex;
     justify-content: space-between;
     align-items: flex-start;
     margin-bottom: 32px;
 }

 .welcome-text h1 {
     font-family: var(--font-display);
     font-size: 44px;
     font-weight: 700;
     color: var(--color-earth-900);
     margin-bottom: 8px;
     letter-spacing: -1.4px;
 }

 .welcome-subtitle {
     font-size: 18px;
     color: var(--color-earth-600);
 }

 .cta-primary {
     background: linear-gradient(135deg, var(--color-earth-900) 0%, var(--color-earth-800) 100%);
     color: var(--color-cream);
     padding: 16px 32px;
     border-radius: 12px;
     text-decoration: none;
     font-weight: 600;
     font-size: 16px;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     display: inline-flex;
     align-items: center;
     gap: 10px;
     letter-spacing: -0.2px;
     box-shadow: 0 4px 12px rgba(44, 24, 16, 0.15);
 }

 .cta-primary:hover {
     transform: translateY(-2px);
     box-shadow: 0 8px 24px rgba(44, 24, 16, 0.2);
 }

 /* Stats Cards */
 .stats-grid {
     display: grid;
     grid-template-columns: repeat(4, 1fr);
     gap: 28px;
     margin-bottom: 52px;
 }

 .stat-card {
     background: white;
     border-radius: 20px;
     padding: 32px;
     box-shadow: 0 2px 12px rgba(44, 24, 16, 0.04), 0 8px 24px rgba(44, 24, 16, 0.03);
     transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
     border: 1px solid rgba(44, 24, 16, 0.02);
 }

 .stat-card:hover {
     transform: translateY(-4px);
     box-shadow: 0 12px 32px rgba(44, 24, 16, 0.08), 0 24px 48px rgba(44, 24, 16, 0.05);
     border-color: rgba(44, 24, 16, 0.04);
 }

 .stat-label {
     font-size: 12px;
     color: var(--color-earth-600);
     margin-bottom: 12px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 0.8px;
 }

 .stat-value {
     font-family: var(--font-display);
     font-size: 42px;
     font-weight: 700;
     color: var(--color-earth-900);
     margin-bottom: 8px;
     letter-spacing: -1.6px;
     line-height: 1;
 }

 .stat-detail {
     font-size: 13px;
     color: var(--color-earth-600);
     font-weight: 500;
 }

 .stat-detail-info {
     font-size: 12px;
     color: var(--color-earth-600);
     margin-top: 4px;
     font-weight: 400;
 }

 /* Ebooks Table */
 .ebooks-table-container {
     background: white;
     border-radius: 20px;
     overflow: hidden;
     box-shadow: 0 2px 12px rgba(44, 24, 16, 0.04), 0 8px 24px rgba(44, 24, 16, 0.05);
     margin-bottom: 52px;
     border: 1px solid rgba(44, 24, 16, 0.03);
 }

 .ebooks-table {
     width: 100%;
     border-collapse: collapse;
 }

 .ebooks-table thead {
     background: var(--color-sand);
     border-bottom: 2px solid var(--color-stone);
 }

 .ebooks-table th {
     padding: 20px 28px;
     text-align: left;
     font-size: 12px;
     font-weight: 700;
     color: var(--color-earth-700);
     text-transform: uppercase;
     letter-spacing: 1px;
 }

 .ebooks-table tbody tr {
     border-bottom: 1px solid var(--color-stone);
     transition: background-color 0.2s;
 }

 .ebooks-table tbody tr:hover {
     background-color: rgba(250, 248, 245, 0.7);
 }

 .ebooks-table tbody tr:last-child {
     border-bottom: none;
 }

 .ebooks-table td {
     padding: 24px 28px;
     font-size: 15px;
     color: var(--color-earth-700);
 }

 .ebook-title {
     font-weight: 600;
     color: var(--color-earth-900);
     margin-bottom: 6px;
     letter-spacing: -0.2px;
 }

 .ebook-meta {
     font-size: 13px;
     color: var(--color-earth-600);
     font-weight: 500;
 }

 .ebook-status {
     display: inline-block;
     padding: 7px 16px;
     border-radius: 20px;
     font-size: 13px;
     font-weight: 600;
     letter-spacing: -0.1px;
 }

 .status-completed {
     background: rgba(140, 163, 149, 0.15);
     color: var(--color-sage-700);
 }

 .status-generating {
     background: rgba(232, 93, 84, 0.15);
     color: var(--color-coral-600);
 }

 .status-failed {
     background: rgba(232, 93, 84, 0.15);
     color: var(--color-coral-600);
 }

 .ebook-actions {
     display: flex;
     gap: 10px;
 }

 .action-btn {
     padding: 9px 18px;
     border-radius: 10px;
     font-size: 14px;
     font-weight: 600;
     text-decoration: none;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     border: 1px solid;
     letter-spacing: -0.2px;
 }

 .btn-download {
     background: white;
     color: var(--color-earth-900);
     border-color: var(--color-earth-300);
 }

 .btn-download:hover {
     background: var(--color-sand);
     border-color: var(--color-earth-600);
     transform: translateY(-1px);
     box-shadow: 0 2px 8px rgba(44, 24, 16, 0.08);
 }

 .btn-edit {
     background: var(--color-earth-900);
     color: var(--color-cream);
     border-color: var(--color-earth-900);
 }

 .btn-edit:hover {
     background: var(--color-earth-800);
     transform: translateY(-1px);
     box-shadow: 0 2px 8px rgba(44, 24, 16, 0.18);
 }

 /* Empty State */
 .empty-state {
     text-align: center;
     padding: 80px 40px;
 }

 .empty-icon {
     font-size: 64px;
     margin-bottom: 24px;
     opacity: 0.3;
 }

 .empty-title {
     font-family: var(--font-display);
     font-size: 28px;
     font-weight: 700;
     color: var(--color-earth-900);
     margin-bottom: 12px;
     letter-spacing: -0.8px;
 }

 .empty-text {
     font-size: 16px;
     color: var(--color-earth-600);
     margin-bottom: 32px;
     max-width: 480px;
     margin-left: auto;
     margin-right: auto;
 }

 /* Upgrade Card */
 .upgrade-card {
     background: linear-gradient(135deg, var(--color-sage-700) 0%, var(--color-sage-600) 100%);
     border-radius: 20px;
     padding: 36px 44px;
     color: white;
     display: flex;
     justify-content: space-between;
     align-items: center;
     box-shadow: 0 8px 32px rgba(74, 95, 79, 0.08), 0 16px 48px rgba(74, 95, 79, 0.08);
     border: 1px solid rgba(255, 255, 255, 0.1);
 }

 .upgrade-content h3 {
     font-family: var(--font-display);
     font-size: 26px;
     font-weight: 700;
     margin-bottom: 10px;
     letter-spacing: -0.8px;
 }

 .upgrade-content p {
     font-size: 15px;
     opacity: 0.92;
     font-weight: 500;
 }

 .upgrade-btn {
     background: white;
     color: var(--color-sage-700);
     padding: 15px 32px;
     border-radius: 12px;
     text-decoration: none;
     font-weight: 700;
     font-size: 15px;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     white-space: nowrap;
     letter-spacing: -0.2px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 }

 .upgrade-btn:hover {
     transform: translateY(-2px);
     box-shadow: 0 4px 16px rgba(255, 255, 255, 0.4);
 }

 .section-title {
     font-family: var(--font-display);
     font-size: 32px;
     font-weight: 700;
     color: var(--color-earth-900);
     letter-spacing: -1px;
     margin-bottom: 24px;
 }

 .manage-btn {
     display: inline-block;
     padding: 10px 24px;
     background: white;
     color: var(--color-earth-900);
     border: 1px solid var(--color-earth-300);
     border-radius: 8px;
     text-decoration: none;
     font-weight: 600;
     font-size: 14px;
     transition: all 0.2s;
 }

 .manage-btn:hover {
     background: var(--color-sand);
     border-color: var(--color-earth-600);
 }

 @media (max-width: 1024px) {
     .stats-grid {
         grid-template-columns: repeat(2, 1fr);
     }
 }

 @media (max-width: 768px) {
     .welcome-text h1 {
         font-size: 28px;
     }

     .stats-grid {
         grid-template-columns: 1fr;
     }

     .welcome-header {
         flex-direction: column;
     }

     .ebooks-table th,
     .ebooks-table td {
         padding: 12px 16px;
     }

     .upgrade-card {
         flex-direction: column;
         text-align: center;
     }

     .upgrade-btn {
         margin-top: 16px;
     }
 }