/* ServeUp Beta Testing - Shared Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #e6edf3;
    background-color: #0d1117;
    font-size: 16px;
}

/* Header Styles */
.header {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 16px 0;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
}

.header-logo img {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    border-radius: 6px;
}

.header-nav {
    display: flex;
    gap: 16px;
}

.nav-link {
    color: #8b949e;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #21262d;
    color: #e6edf3;
}

/* Container and Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 32px;
}

.main-content {
    max-width: 768px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 8px;
}

.page-subtitle {
    color: #8b949e;
    font-size: 16px;
}

/* Form Styles */
.form-section {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 24px;
    margin: 24px 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #e6edf3;
}

.form-input {
    width: 100%;
    padding: 5px 12px;
    font-size: 14px;
    line-height: 20px;
    color: #e6edf3;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(48, 54, 61, 0.2);
    transition: border-color 0.2s;
    min-height: 32px;
}

.form-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: inset 0 1px 0 rgba(48, 54, 61, 0.2), 0 0 0 3px rgba(88, 166, 255, 0.12);
}

.form-input::placeholder {
    color: #8b949e;
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    color: #e6edf3;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.12);
}

/* Button Styles */
.btn-primary {
    background-color: #238636;
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    padding: 5px 16px;
    min-height: 32px;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #2ea043;
}

.btn-primary:disabled {
    background-color: #21262d;
    color: #8b949e;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e6edf3;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    padding: 5px 16px;
    min-height: 32px;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    margin-left: 8px;
}

.btn-secondary:hover {
    background-color: #30363d;
}

.refresh-btn {
    background-color: #238636;
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    transition: background-color 0.2s;
    text-decoration: none;
}

.refresh-btn:hover {
    background-color: #2ea043;
}

/* Alert Messages */
.alert {
    padding: 16px;
    margin: 16px 0;
    border: 1px solid;
    border-radius: 6px;
    display: none;
}

.alert-success {
    background-color: #0f5132;
    border-color: #238636;
    color: #56d364;
}

.alert-error {
    background-color: #67060c;
    border-color: #da3633;
    color: #f85149;
}

.error {
    background-color: #67060c;
    border: 1px solid #da3633;
    color: #f85149;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 16px;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #e6edf3;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #8b949e;
}

/* Controls Section */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.search-box {
    flex: 1;
    max-width: 300px;
}

/* Table Styles */
.table-container {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
}

.table-header {
    background-color: #21262d;
    padding: 12px 16px;
    border-bottom: 1px solid #30363d;
    font-weight: 600;
    font-size: 14px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #30363d;
}

.table th {
    background-color: #21262d;
    font-weight: 600;
    font-size: 14px;
    color: #e6edf3;
}

.table td {
    font-size: 14px;
    color: #8b949e;
}

.table tr:hover {
    background-color: #21262d;
}

.table tr:last-child td {
    border-bottom: none;
}

.email-cell {
    color: #e6edf3;
    font-weight: 500;
}

.date-cell {
    white-space: nowrap;
}

.ip-cell {
    font-family: monospace;
    font-size: 12px;
}

/* Loading and Empty States */
.loading {
    text-align: center;
    padding: 40px;
    color: #8b949e;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #8b949e;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e6edf3;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    transition: background-color 0.2s;
}

.pagination button:hover:not(:disabled) {
    background-color: #30363d;
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination .active {
    background-color: #58a6ff;
    border-color: #58a6ff;
}

/* Textarea Styles */
.feedback-textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 20px;
    color: #e6edf3;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(48, 54, 61, 0.2);
    transition: border-color 0.2s;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: inset 0 1px 0 rgba(48, 54, 61, 0.2), 0 0 0 3px rgba(88, 166, 255, 0.12);
}

.feedback-textarea::placeholder {
    color: #8b949e;
}

/* File Input Styles */
.file-input-wrapper {
    position: relative;
    display: inline-block;
    margin: 16px 0;
}

.file-input {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: inline-block;
    padding: 5px 16px;
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e6edf3;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.file-input-label:hover {
    background-color: #30363d;
}

.file-preview {
    margin-top: 12px;
    max-width: 300px;
}

.file-preview img {
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid #30363d;
}

.file-info {
    margin-top: 8px;
    font-size: 12px;
    color: #8b949e;
}

/* 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.9);
}

.modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px;
}

.modal-image {
    max-width: 95%;
    max-height: 95%;
    border-radius: 6px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #f85149;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
}
