/* Mail System Custom Styles */

:root {
    --sidebar-width: 250px;
    --primary-color: #2c5282;
    --primary-hover: #2b6cb0;
    --sidebar-bg: #1a202c;
    --sidebar-text: #e2e8f0;
    --sidebar-active: #2c5282;
}

body {
    font-family: 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    background-color: #f7fafc;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar .brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar .user-info {
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: rgba(44, 82, 130, 0.4);
    border-left-color: #63b3ed;
    color: #fff;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.page-header p {
    color: #718096;
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 8px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Form elements */
.form-label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 82, 130, 0.15);
}

textarea.form-control {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Tables */
.table th {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.85rem;
    text-transform: none;
    border-bottom-width: 2px;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Badge styles */
.badge-success {
    background-color: #48bb78;
}

.badge-danger {
    background-color: #fc8181;
}

/* Preview area */
.email-preview {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    font-size: 0.95rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.email-preview .preview-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.email-preview .preview-header dt {
    color: #718096;
    font-size: 0.85rem;
}

.email-preview .preview-header dd {
    color: #1a202c;
    margin-bottom: 0.5rem;
}

/* Attachment list */
.attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #edf2f7;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #4a5568;
    margin: 0.25rem;
}

.attachment-item .remove-btn {
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s;
}

.attachment-item .remove-btn:hover {
    color: #e53e3e;
}

/* Flash messages */
.alert {
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}

/* Placeholder fields container */
.placeholder-fields {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.placeholder-fields .form-group {
    margin-bottom: 0.75rem;
}

.placeholder-fields .form-group:last-child {
    margin-bottom: 0;
}

/* Contact select area */
.contact-select-area {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* Confirmation modal */
.modal-confirm .modal-header {
    background-color: var(--primary-color);
    color: #fff;
}

.modal-confirm .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* History status badges */
.status-success {
    color: #48bb78;
    font-weight: 600;
}

.status-error {
    color: #fc8181;
    font-weight: 600;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #a0aec0;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
}
