/* Document Workflow Manager - Frontend Styles */

.dwm-user-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dwm-header {
    border-bottom: 2px solid #0073aa;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.dwm-header h1 {
    margin: 0 0 20px 0;
    color: #0073aa;
}

.dwm-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dwm-tab {
    display: inline-block;
    padding: 10px 20px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.dwm-tab:hover,
.dwm-tab.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Dashboard */
.dwm-dashboard {
    animation: fadeIn 0.3s ease;
}

.dwm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.dwm-stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dwm-stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 28px;
}

.dwm-stat-box p {
    margin: 0;
    opacity: 0.9;
}

/* Tables */
.dwm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dwm-table thead {
    background: #f9f9f9;
    border-bottom: 2px solid #0073aa;
}

.dwm-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    color: #0073aa;
}

.dwm-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.dwm-table tbody tr:hover {
    background: #f5f5f5;
}

/* Badges */
.dwm-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.dwm-badge-pending {
    background: #fff3cd;
    color: #856404;
}

.dwm-badge-completed {
    background: #d4edda;
    color: #155724;
}

.dwm-badge-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Buttons */
.dwm-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px 4px 4px 0;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dwm-btn:hover {
    background: #e0e0e0;
}

.dwm-btn-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.dwm-btn-primary:hover {
    background: #005a87;
}

.dwm-btn-success {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.dwm-btn-success:hover {
    background: #218838;
}

.dwm-btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.dwm-btn-danger:hover {
    background: #c82333;
}

.dwm-btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.dwm-btn-secondary:hover {
    background: #5a6268;
}

.dwm-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.dwm-form {
    max-width: 800px;
    margin: 20px 0;
}

.dwm-form-group {
    margin-bottom: 20px;
}

.dwm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.dwm-form-group .required {
    color: #dc3545;
}

.dwm-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.dwm-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.dwm-checkbox-group {
    border: none;
    padding: 0;
    margin: 0;
}

.dwm-checkbox-label {
    display: block;
    margin: 10px 0;
    padding: 8px;
    border-radius: 3px;
    cursor: pointer;
}

.dwm-checkbox-label:hover {
    background: #f5f5f5;
}

.dwm-checkbox-label input {
    margin-right: 8px;
    cursor: pointer;
}

.dwm-help-text {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 13px;
}

.dwm-form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Alerts */
.dwm-alert {
    padding: 12px 20px;
    margin: 20px 0;
    border-radius: 3px;
    border-left: 4px solid #ccc;
}

.dwm-alert-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.dwm-alert-error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

/* Document View */
.dwm-document-view {
    animation: fadeIn 0.3s ease;
}

.dwm-document-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 3px;
    margin: 20px 0;
    border-left: 4px solid #0073aa;
}

.dwm-document-info p {
    margin: 8px 0;
}

.dwm-document-content {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 3px;
}

.dwm-content {
    line-height: 1.6;
    color: #333;
}

/* Workflow Timeline */
.dwm-workflow-steps {
    margin: 20px 0;
}

.dwm-workflow-timeline {
    position: relative;
    padding: 20px 0;
}

.dwm-step {
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    padding-left: 40px;
    position: relative;
}

.dwm-step::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 15px;
    width: 20px;
    height: 20px;
    background: #ddd;
    border-radius: 50%;
    border: 3px solid white;
}

.dwm-step-pending {
    border-left: 4px solid #ffc107;
}

.dwm-step-pending::before {
    background: #ffc107;
}

.dwm-step-accepted {
    border-left: 4px solid #28a745;
}

.dwm-step-accepted::before {
    background: #28a745;
}

.dwm-step-rejected {
    border-left: 4px solid #dc3545;
}

.dwm-step-rejected::before {
    background: #dc3545;
}

.dwm-step-forwarded {
    border-left: 4px solid #0073aa;
}

.dwm-step-forwarded::before {
    background: #0073aa;
}

.dwm-step-number {
    font-weight: bold;
    color: #0073aa;
    font-size: 12px;
}

.dwm-step-branch {
    font-weight: bold;
    margin: 8px 0;
    font-size: 16px;
}

.dwm-step-action {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
}

.dwm-step-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

/* Search */
.dwm-search-form {
    margin: 20px 0;
}

.dwm-search-form .dwm-form-group {
    display: flex;
    gap: 10px;
}

.dwm-search-form .dwm-input {
    flex: 1;
}

/* Back link */
.dwm-back-link {
    margin: 30px 0 0 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dwm-user-container {
        padding: 10px;
    }

    .dwm-tabs {
        flex-direction: column;
    }

    .dwm-tab {
        width: 100%;
        text-align: center;
    }

    .dwm-table {
        font-size: 12px;
    }

    .dwm-table th,
    .dwm-table td {
        padding: 8px;
    }

    .dwm-stats {
        grid-template-columns: 1fr;
    }

    .dwm-step {
        padding-left: 20px;
    }

    .dwm-step::before {
        left: 5px;
    }
}
