/**
 * Create Account Form Styles
 */

.create-account-wrapper {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
}

.create-account-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-account-title {
    margin: 0 0 25px 0;
    padding: 0 0 15px 0;
    border-bottom: 2px solid #0073aa;
    font-size: 24px;
    color: #333;
}

.create-account-field {
    margin-bottom: 20px;
}

.create-account-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.create-account-field .required {
    color: #dc3232;
}

.create-account-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    font-family: inherit;
}

.create-account-input[type="date"],
.create-account-input[type="number"],
.create-account-input[type="select-one"] {
    font-family: inherit;
}

.create-account-input select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background: white;
    cursor: pointer;
}

.create-account-input textarea {
    resize: vertical;
    min-height: 80px;
}

.create-account-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.create-account-input.error {
    border-color: #dc3232;
}

.create-account-submit {
    width: 100%;
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.create-account-submit:hover {
    background: #005a87;
}

.create-account-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.create-account-messages {
    margin-bottom: 20px;
}

.create-account-message {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid;
}

.create-account-message.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.create-account-message.error {
    background: #f8d7da;
    border-color: #dc3232;
    color: #721c24;
}

.create-account-message.create-account-already-logged-in {
    background: #d1ecf1;
    border-color: #0073aa;
    color: #0c5460;
}

.create-account-field-error {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* User Details Styles */
.user-details-wrapper {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.user-details-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
}

.subscribers-table-section {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
    width: 100%;
    position: relative;
    /* Firefox scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.subscribers-table-section::-webkit-scrollbar {
    height: 8px;
}

.subscribers-table-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.subscribers-table-section::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.subscribers-table-section::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.subscribers-details-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
    table-layout: fixed;
    margin: 0;
}

.subscribers-details-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.subscribers-details-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.subscribers-details-table td {
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 14px;
}

.subscribers-details-table tbody tr {
    transition: background-color 0.2s ease;
}

.subscribers-details-table tbody tr:hover {
    background: #f8f9ff;
}

.subscribers-details-table tbody tr:last-child td {
    border-bottom: none;
}

.subscribers-details-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.subscribers-details-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Set specific column widths to prevent overflow */
.subscribers-details-table th:nth-child(1),
.subscribers-details-table td:nth-child(1) {
    width: 10%;
    min-width: 100px;
}

.subscribers-details-table th:nth-child(2),
.subscribers-details-table td:nth-child(2) {
    width: 12%;
    min-width: 150px;
}

.subscribers-details-table th:nth-child(3),
.subscribers-details-table td:nth-child(3),
.subscribers-details-table th:nth-child(4),
.subscribers-details-table td:nth-child(4) {
    width: 8%;
    min-width: 100px;
}

.subscribers-details-table th:nth-child(5),
.subscribers-details-table td:nth-child(5),
.subscribers-details-table th:nth-child(6),
.subscribers-details-table td:nth-child(6) {
    width: 6%;
    min-width: 70px;
}

.subscribers-details-table th:nth-child(7),
.subscribers-details-table td:nth-child(7) {
    width: 8%;
    min-width: 100px;
}

.subscribers-details-table th:nth-child(8),
.subscribers-details-table td:nth-child(8) {
    width: 15%;
    min-width: 180px;
}

.subscribers-details-table th:nth-child(9),
.subscribers-details-table td:nth-child(9) {
    width: 10%;
    min-width: 120px;
}

.subscribers-details-table th:nth-child(10),
.subscribers-details-table td:nth-child(10) {
    width: 6%;
    min-width: 80px;
}

.subscribers-details-table th:nth-child(11),
.subscribers-details-table td:nth-child(11) {
    width: 10%;
    min-width: 140px;
}

.subscribers-details-table .address-cell {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: visible;
    text-overflow: clip;
    max-height: 60px;
    overflow-y: auto;
}

.subscribers-details-table .visit-count {
    font-weight: 600;
    color: #1d2327;
    text-align: center;
}

/* Subscriber Statistics Styles */
.subscriber-statistics-wrapper {
    max-width: 1400px;
}

.subscriber-statistics-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 35px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.statistics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: #ffffff;
    color: #1d2327;
    padding: 28px 24px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    position: relative;
}

.stat-card::before {
    display: none;
}

.stat-card:nth-child(1) {
    border-top: 3px solid #2271b1;
}

.stat-card:nth-child(2) {
    border-top: 3px solid #50575e;
}

.stat-card:nth-child(3) {
    border-top: 3px solid #646970;
}

.stat-card:nth-child(4) {
    border-top: 3px solid #8c8f94;
}

.stat-card:nth-child(5) {
    border-top: 3px solid #a7aaad;
}

.stat-card:nth-child(6) {
    border-top: 3px solid #c3c4c7;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #c3c4c7;
}

.stat-label {
    font-size: 13px;
    color: #646970;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    color: #1d2327;
}

.subscribers-table-section {
    margin-top: 30px;
}

.subscribers-table-section h4 {
    margin: 0 0 25px 0;
    padding: 0 0 12px 0;
    border-bottom: 3px solid #667eea;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.subscribers-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.subscribers-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.subscribers-table th {
    padding: 16px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.subscribers-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 14px;
}

.subscribers-table tbody tr {
    transition: background-color 0.2s ease;
}

.subscribers-table tbody tr:hover {
    background: #f8f9ff;
}

.subscribers-table tbody tr:last-child td {
    border-bottom: none;
}

/* Demographics Section */
.demographics-section {
    margin-top: 40px;
    margin-bottom: 30px;
}

.demographics-section h4 {
    margin: 0 0 25px 0;
    padding: 0 0 12px 0;
    border-bottom: 2px solid #e0e0e0;
    font-size: 20px;
    color: #1d2327;
    font-weight: 600;
}

.demographics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.demographic-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.demographic-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #c3c4c7;
}

.demographic-card h5 {
    margin: 0 0 20px 0;
    padding: 0 0 12px 0;
    border-bottom: 2px solid #e0e0e0;
    font-size: 16px;
    color: #1d2327;
    font-weight: 600;
}

.demographic-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demographic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #646970;
    transition: all 0.2s ease;
}

.demographic-item:hover {
    background: #f0f0f1;
    border-left-color: #50575e;
}

.demographic-label {
    font-size: 14px;
    color: #646970;
    font-weight: 500;
}

.demographic-value {
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    min-width: 40px;
    text-align: right;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .user-details-wrapper,
    .user-details-form,
    .subscribers-table-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .subscribers-details-table {
        min-width: 1000px;
    }
    
    .subscribers-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .statistics-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 18px;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .subscribers-details-table,
    .subscribers-table {
        font-size: 12px;
    }
    
    .subscribers-details-table th,
    .subscribers-details-table td,
    .subscribers-table th,
    .subscribers-table td {
        padding: 10px 8px;
    }
    
    .user-details-form,
    .subscriber-statistics-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .statistics-overview {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 24px 20px;
    }
    
    .demographics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .subscribers-details-table,
    .subscribers-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 11px;
    }
    
    .subscribers-details-table {
        min-width: 800px;
        font-size: 12px;
    }
    
    .subscribers-details-table th,
    .subscribers-details-table td {
        padding: 8px 6px;
    }
    
    .subscribers-table th,
    .subscribers-table td {
        padding: 8px 6px;
        max-width: none;
    }
    
    .subscribers-details-table .address-cell {
        max-width: 120px;
        max-height: 50px;
    }
}

