/* Author Dashboard Styles */

/* Main Dashboard Container */
.abs-author-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Dashboard Header */
.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 3px solid #f0f2f5;
}

.dashboard-header h2 {
    color: #1a1a1a;
    margin-bottom: 12px;
    font-size: 28px;
    font-weight: 600;
}

.dashboard-header p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.dashboard-section h3 {
    color: #374151;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    text-align: center;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.abs-submit-book-btn,
.abs-withdraw-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.abs-submit-book-btn:hover,
.abs-withdraw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.abs-withdraw-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 10px rgba(240, 147, 251, 0.3);
}

.abs-withdraw-btn:hover {
    box-shadow: 0 4px 20px rgba(240, 147, 251, 0.4);
}

/* Account Information */
.account-info p {
    margin: 12px 0;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.account-info strong {
    color: #374151;
    min-width: 140px;
    display: inline-block;
    font-weight: 600;
}

/* Access Denied */
.abs-access-denied {
    text-align: center;
    padding: 60px 30px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
}

.abs-access-denied p {
    font-size: 20px;
    margin: 0;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #ffffff;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="file"] {
    border: 2px dashed #d1d5db;
    padding: 20px;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #6b7280;
    font-size: 12px;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 35px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.abs-submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.abs-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.abs-cancel-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.abs-cancel-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

/* Messages */
#abs-book-message,
#abs-withdraw-message {
    margin-top: 25px;
    text-align: center;
}

#abs-book-message .success,
#abs-withdraw-message .success {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
}

#abs-book-message .error,
#abs-withdraw-message .error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
}

/* Tables */
.earnings-table,
.my-books-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.earnings-table th,
.my-books-table th {
    background: #f8fafc;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.earnings-table td,
.my-books-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: top;
}

.earnings-table tr:hover,
.my-books-table tr:hover {
    background-color: #f9fafb;
}

.earnings-table tr:last-child td,
.my-books-table tr:last-child td {
    border-bottom: none;
}

/* Table Content */
.earnings-table small,
.my-books-table small {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
    display: block;
    margin-top: 4px;
}

.earning-amount {
    color: #059669;
    font-weight: 600;
    font-size: 16px;
}

.commission-amount {
    color: #6b7280;
    font-size: 14px;
}

/* Status Badges */
.book-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.status-note {
    color: #6b7280;
    font-size: 12px;
    font-style: italic;
}

.view-product-link {
    display: inline-block;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.view-product-link:hover {
    background: #5a67d8;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .abs-author-dashboard {
        padding: 20px;
        margin: 15px;
    }
    
    .dashboard-section {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .earnings-table,
    .my-books-table {
        font-size: 12px;
    }
    
    .earnings-table th,
    .earnings-table td,
    .my-books-table th,
    .my-books-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .abs-author-dashboard {
        padding: 15px;
        margin: 10px;
    }
    
    .dashboard-header h2 {
        font-size: 24px;
    }
    
    .dashboard-section {
        padding: 15px;
    }
}

/* Author Login Form Styles */
.abs-author-login-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h3 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.abs-author-login-form .form-group {
    margin-bottom: 20px;
}

.abs-author-login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.abs-author-login-form .form-group input[type="text"],
.abs-author-login-form .form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.abs-author-login-form .form-group input[type="text"]:focus,
.abs-author-login-form .form-group input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.form-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
    margin-bottom: 0;
}

.abs-btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    text-align: center;
}

.abs-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.abs-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.abs-btn-block {
    width: 100%;
    display: block;
}

.form-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.form-links p {
    margin: 0 0 10px 0;
    color: #6b7280;
    font-size: 14px;
}

.abs-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.abs-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* Already Logged In and Account Pending States */
.abs-already-logged-in,
.abs-account-pending {
    text-align: center;
    padding: 40px 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 400px;
}

.abs-already-logged-in p,
.abs-account-pending p {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 16px;
    line-height: 1.5;
}

.abs-already-logged-in .abs-btn {
    margin-top: 15px;
}

.abs-account-pending {
    background: #fef3c7;
    border-color: #f59e0b;
}

.abs-account-pending p {
    color: #92400e;
}

/* Login Form Responsive */
@media (max-width: 480px) {
    .abs-author-login-form {
        padding: 20px;
        margin: 15px;
    }
    
    .login-header h3 {
        font-size: 20px;
    }
}
