* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation */
nav {
    background-color: #171717;
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Tabs */
.tab-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #171717;
}

.tab-btn.active {
    color: #171717;
    border-bottom-color: #171717;
}

.tab-content {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.rounded-lg {
    border-radius: 0.5rem;
}

.bg-white {
    background-color: white;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.p-6 {
    padding: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* Form Elements */
.input-field {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: #171717;
    box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.1);
}

textarea.input-field {
    resize: vertical;
    font-family: inherit;
}

/* Buttons */
.btn-primary {
    background-color: #171717;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #000;
}

.btn-primary:disabled {
    background-color: #a3a3a3;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #171717;
    padding: 0.5rem 1rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #e5e5e5;
}

/* Email List */
.email-item {
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.email-item:hover {
    border-color: #171717;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.email-item.unread {
    background-color: #f9fafb;
    border-left: 4px solid #171717;
}

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.email-from {
    font-weight: 600;
    color: #171717;
}

.email-date {
    font-size: 0.875rem;
    color: #666;
}

.email-subject {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #171717;
}

.email-preview {
    font-size: 0.875rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

#close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

#close-modal:hover {
    color: #171717;
}

.modal-body {
    border-top: 1px solid #e5e5e5;
    padding-top: 1rem;
}

.modal-field {
    margin-bottom: 1rem;
}

.modal-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #171717;
}

.modal-field .value {
    color: #666;
    word-break: break-word;
}

.modal-body-content {
    background-color: #f9fafb;
    padding: 1rem;
    border-radius: 0.375rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.message.info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-xl {
    font-size: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-neutral-500 {
    color: #737373;
}

.text-neutral-600 {
    color: #525252;
}

.text-neutral-700 {
    color: #404040;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.pt-24 {
    padding-top: 6rem;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gap-4 {
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    nav h1 span {
        display: none;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
    }
    
    .email-header {
        flex-direction: column;
    }
}

