/* assets/style.css */
.dot-compliance-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Status Cards */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.status-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.status-card.overdue {
    border-left: 4px solid #e74c3c;
}

.status-card.upcoming {
    border-left: 4px solid #f39c12;
}

.status-card.total {
    border-left: 4px solid #3498db;
}

.card-icon {
    font-size: 2.5rem;
    margin-right: 20px;
}

.card-content h3 {
    font-size: 2rem;
    margin: 0;
    color: #2c3e50;
}

.card-content p {
    margin: 5px 0 0 0;
    color: #7f8c8d;
}

/* Items Section */
.categories-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.category-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e6ed;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-title h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
}

.category-indicators {
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicator-icon {
    font-size: 1.2rem;
}

.indicator-icon.overdue {
    color: #e74c3c;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.btn-add-category {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.btn-add-category:hover {
    background: #229954;
}

.category-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.compliance-item {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
}

.compliance-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.compliance-item.overdue {
    border-left: 4px solid #e74c3c;
    background: #fdf2f2;
}

.compliance-item.upcoming {
    border-left: 4px solid #f39c12;
    background: #fefbf3;
}

.compliance-item.completed {
    border-left: 4px solid #27ae60;
    background: #f8fff9;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.item-header h4 {
    margin: 0;
    color: #2c3e50;
    text-transform: capitalize;
    font-size: 1.1rem;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #f8f9fa;
    color: #6c757d;
}

.status-badge.in_progress {
    background: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.item-content {
    margin-bottom: 20px;
}

.description {
    margin-bottom: 10px;
    color: #5a6c7d;
}

.deadline {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.days-left {
    color: #f39c12;
    font-weight: 500;
}

.overdue-text {
    color: #e74c3c;
    font-weight: 500;
}

.notes {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

.item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.btn-edit {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-documents {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-documents:hover {
    background: #8e44ad;
}

/* Modal Styles */
.modal {
    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: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

#add-item-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.form-actions button[type="submit"] {
    background: #27ae60;
    color: white;
}

.form-actions button[type="button"] {
    background: #95a5a6;
    color: white;
}

.no-items {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

/* Document Modal Styles */
.modal-body {
    padding: 20px;
}

.upload-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upload-section h4 {
    margin-top: 0;
    color: #2c3e50;
}

#upload-document-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

#document_file {
    flex: 1;
    padding: 8px;
    border: 2px dashed #ddd;
    border-radius: 4px;
}

.btn-upload {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-upload:hover {
    background: #229954;
}

.file-info {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 0;
}

.documents-list h4 {
    margin-top: 0;
    color: #2c3e50;
}

#documents-container {
    max-height: 300px;
    overflow-y: auto;
}

.document-item {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-info {
    flex: 1;
}

.document-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.document-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.document-actions {
    display: flex;
    gap: 8px;
}

.btn-download,
.btn-delete-doc {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-download {
    background: #3498db;
    color: white;
}

.btn-download:hover {
    background: #2980b9;
}

.btn-delete-doc {
    background: #e74c3c;
    color: white;
}

.btn-delete-doc:hover {
    background: #c0392b;
}

.loading {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .items-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}