/* Create Post */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 700px;
    margin: 80px auto;
    padding: 40px 20px;
}

h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    color: #000;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #000;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #000;
}

textarea {
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

button {
    width: 100%;
    padding: 16px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #333;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .container { margin: 40px auto; padding: 20px 16px; }
    h1 { font-size: 28px; margin-bottom: 32px; }
}

/* Admin Dashboard */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.5;
}

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

h1 {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    color: #000;
}

.stats-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-title {
    font-size: 18px;
    font-weight: 500;
    color: #666;
}

.stats-month {
    font-size: 14px;
    color: #999;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.page-stats {
    margin-top: 20px;
}

.page-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.page-stat-item:last-child {
    border-bottom: none;
}

.page-name {
    font-weight: 500;
}

.page-views {
    color: #666;
}

.section {
    margin-bottom: 50px;
}

.section h2 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    transition: border-color 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card:hover {
    border-color: #000;
}

.card a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 16px;
    text-emphasis: none;
}

.coming-soon {
    color: #999;
    font-size: 14px;
    margin-top: 8px;
}

/* Contact Submissions Styles */
.submissions-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.submissions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.submissions-title {
    font-size: 18px;
    font-weight: 500;
    color: #666;
}

.submissions-count {
    font-size: 14px;
    color: #999;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
}

.submissions-table {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr 1fr;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 500;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 800px;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr 1fr;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    align-items: center;
    min-width: 800px;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: #f8f9fa;
}

.cell {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.phone-cell {
    font-weight: 500;
    color: #000;
}

.phone-icon {
    margin-right: 8px;
    font-size: 16px;
}

.device-cell {
    color: #666;
}

.device-type {
    padding: 4px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.ip-cell {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #666;
    font-size: 12px;
}

.time-cell {
    color: #666;
}

.actions-cell {
    justify-content: flex-end;
}

.delete-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    width: auto;
}

.delete-btn:hover {
    background: #ff3742;
}

.delete-icon {
    font-size: 12px;
}

.no-submissions {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-submissions-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-submissions-text {
    font-size: 16px;
    font-weight: 500;
}

/* Full Contact Form Styles */
.full-contact-header {
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr 1fr 1.5fr;
    min-width: 1200px;
}

.full-contact-row {
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr 1fr 1.5fr;
    min-width: 1200px;
}

/* Newsletter Subscription Styles */
.newsletter-header {
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    min-width: 800px;
}

.newsletter-row {
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    min-width: 800px;
}

.name-email-cell {
    flex-direction: column;
    align-items: flex-start;
}

.name-email-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.full-name {
    font-weight: 500;
    color: #000;
    font-size: 14px;
}

.email {
    font-size: 12px;
    color: #666;
}

.company-cell {
    color: #666;
    font-size: 13px;
}

.project-type {
    padding: 4px 8px;
    background: #f0f8ff;
    color: #1976d2;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.view-message-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
    width: auto;
}

.view-message-btn:hover {
    background: #45a049;
}

.view-icon {
    font-size: 10px;
}

.actions-cell {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Modal Styles */
.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: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-body p {
    margin: 0;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}

@media (max-width: 600px) {
    .container { margin: 40px auto; padding: 0 16px; }
    h1 { font-size: 28px; margin-bottom: 40px; }
    .grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    
    .table-header,
    .table-row,
    .full-contact-header,
    .full-contact-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .table-header,
    .full-contact-header {
        display: none;
    }
    
    .table-row,
    .full-contact-row {
        padding: 16px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        margin-bottom: 8px;
        background: white;
    }
    
    .cell {
        justify-content: space-between;
        padding: 4px 0;
    }
    
    .cell::before {
        content: attr(data-label);
        font-weight: 500;
        color: #666;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .actions-cell {
        justify-content: center;
        margin-top: 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}