/* Taskpane Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #f8f9fa;
}

.container {
    padding: 20px;
    max-width: 100%;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #34495e;
}

/* =========================================
   MODULE BUTTONS (Home Page)
========================================= */
.module-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.module-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.module-btn:hover {
    border-color: #875a7b;
    box-shadow: 0 4px 12px rgba(135, 90, 123, 0.15);
    transform: translateY(-2px);
}

.module-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.module-label {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.module-desc {
    font-size: 12px;
    color: #6c757d;
}

/* =========================================
   ACTION BUTTONS (Sub-pages)
========================================= */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.action-btn:hover {
    border-color: #875a7b;
    box-shadow: 0 3px 10px rgba(135, 90, 123, 0.12);
    transform: translateY(-1px);
}

.action-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.action-label {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.action-desc {
    font-size: 11px;
    color: #6c757d;
}

/* Form Elements */
.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #875a7b;
    box-shadow: 0 0 0 3px rgba(135, 90, 123, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #875a7b;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #6d4862;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Contact Results */
.results-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    background: #fff;
}

.contact-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

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

.contact-item:hover {
    background: #f0f0f0;
}

.contact-info strong {
    color: #2c3e50;
    font-size: 14px;
}

.contact-info small {
    color: #6c757d;
    font-size: 12px;
}

.text-muted {
    color: #999 !important;
}

/* Selected Contact */
.selected-contact {
    margin-bottom: 15px;
    padding: 12px;
    background: #e8f4f8;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    font-size: 13px;
}

.selected-info {
    color: #0c5460;
}

.selected-info strong {
    font-weight: 600;
}

/* Loading & Error States */
.loading {
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
}

.error {
    padding: 12px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-size: 13px;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h2 {
        font-size: 16px;
    }

    .module-btn, .action-btn {
        padding: 14px 16px;
    }
}