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

button,
a.button,
input[type="button"],
input[type="submit"] {
    text-decoration: none;
}

button:hover,
a.button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    text-decoration: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Header */
.nav-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
}

.nav-tabs {
    display: flex;
    gap: 0;
}

.nav-tabs a {
    text-decoration: none;
    color: #6c757d;
    padding: 12px 24px;
    border-right: 1px solid #e9ecef;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    background: transparent;
}

.nav-tabs a:last-child {
    border-right: none;
}

.nav-tabs a:hover:not(.disabled) {
    color: #0078d4;
    background-color: transparent;
}

.nav-tabs a.active {
    color: #0078d4;
    background-color: transparent;
    font-weight: 600;
}

.nav-tabs a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0078d4;
    border-radius: 3px 3px 0 0;
}

.nav-tabs a.disabled {
    color: #adb5bd;
    cursor: not-allowed;
    background-color: transparent;
}

/* System Info Header */
.system-header {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.system-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.system-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
}

.system-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.system-item .label {
    color: #6c757d;
    font-weight: 500;
}

.system-item .value {
    color: #495057;
    font-weight: 600;
}

.settings-btn {
    color: #6c757d;
    text-decoration: none;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    color: #0078d4;
    background-color: #f1f3f5;
}

.logout-btn {
    color: #dc3545;
    text-decoration: none;
    padding: 6px 16px;
    border: 1px solid #dc3545;
    border-radius: 3px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
}

.logout-btn:hover {
    background-color: #dc3545;
    color: white;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-header-content {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .logo {
        text-align: center;
        gap: 6px;
    }

    .logo img {
        height: 24px;
        max-width: 60px;
    }

    .logo-text {
        font-size: 16px;
    }

    .nav-tabs {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0;
    }

    .nav-tabs a {
        border-bottom: 1px solid #dee2e6;
        border-right: none;
    }

    .system-header-content {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .system-info {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .container {
        padding: 0 15px;
    }

    .links-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .login-content {
        padding: 20px 20px;
    }

    .login-window {
        margin: 20px;
        max-width: none;
    }

    .login-logo img {
        height: 36px;
        max-width: 100px;
    }

    .login-title {
        font-size: 16px;
    }
}
/* Breadcrumb */
.breadcrumb {
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
}

.breadcrumb-link {
    color: #0078d4;
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #6c757d;
}

.breadcrumb-current {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-copy-btn {
    margin-left: 12px;
    padding: 2px 6px;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    color: #6c757d;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.breadcrumb-copy-btn:hover {
    background: rgba(0,120,212,0.1);
    border-color: #0078d4;
    color: #0078d4;
}

.breadcrumb-copy-btn i {
    width: 12px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
}

.large-modal {
    max-width: 600px;
}

.create-task-modal-content {
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.create-task-modal-content .modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 20px;
}

.create-task-modal-content .modal-header {
    flex-shrink: 0;
}

.create-task-modal-content .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-task-modal-content .modal-header h3 i {
    color: #0078d4;
}

.task-form-modal {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-header {
    padding: 14px 18px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    cursor: pointer;
    font-size: 22px;
    color: #6c757d;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #495057;
    background: #e9ecef;
}

.modal-body {
    padding: 18px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.modal-body p {
    margin: 0 0 16px 0;
    color: #495057;
    font-size: 13px;
    line-height: 1.5;
}

/* Cron Help Modal - Minimalistic */
.cron-format {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 18px;
}

.cron-format code {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #0078d4;
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 4px;
    margin-bottom: 12px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    letter-spacing: 2px;
}

.cron-fields {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.cron-fields > div {
    text-align: center;
    padding: 8px 6px;
    background: white;
    border-radius: 4px;
    font-size: 12px;
    color: #495057;
    border: 1px solid #e9ecef;
}

.cron-fields strong {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cron-examples {
    margin-top: 18px;
}

.cron-examples h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.cron-examples ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cron-examples li {
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0078d4;
    font-size: 13px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cron-examples li:last-child {
    margin-bottom: 0;
}

.cron-examples li code {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #0078d4;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    border: 1px solid #e9ecef;
    min-width: 100px;
    text-align: center;
}

.modal-body .file-name {
    font-weight: 500;
    color: #dc3545;
    margin-top: 8px;
}

.modal-footer {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel,
.btn-delete,
.btn-primary {
    padding: 6px 14px;
    border: 1px solid #6c757d;
    background: white;
    color: #495057;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #e9ecef;
}

.btn-delete {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    border-color: #c82333;
}

.btn-primary {
    background: #0078d4;
    border-color: #0078d4;
    color: white;
}

.btn-primary:hover {
    background: #106ebe;
    border-color: #106ebe;
}

/* Empty State */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

.empty-state .action-btn {
    margin-top: 20px;
    text-decoration: none;
}

.form-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 0;
}

.form-section h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.cron-help-link {
    background: none;
    border: none;
    color: #0078d4;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: color 0.2s;
}

.cron-help-link:hover {
    color: #106ebe;
    text-decoration: underline;
}

.cron-help-link i {
    font-size: 11px;
}

.form-group {
    margin-bottom: 18px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.path-input-group {
    display: flex;
    align-items: center;
}

.path-prefix {
    background: #e9ecef;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: #6c757d;
    font-family: 'Monaco', 'Menlo', monospace;
}

.path-input-group input {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.field-help {
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
}

.script-editor {
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
}

.editor-toolbar {
    background: #e9ecef;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ced4da;
}

.editor-label {
    font-weight: 500;
    color: #495057;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.editor-btn {
    padding: 4px 8px;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 3px;
    color: #495057;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.editor-btn:hover {
    background: #f8f9fa;
    border-color: #0078d4;
}

.code-editor {
    width: 100%;
    min-height: 300px;
    padding: 12px;
    border: none;
    background: #f8f9fa;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #212529;
    resize: vertical;
    outline: none;
    tab-size: 4;
}

.code-editor:focus {
    background: white;
    box-shadow: inset 0 0 0 1px #0078d4;
}

.url-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.url-preview code {
    flex: 1;
    background: white;
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #0078d4;
}

.copy-btn {
    padding: 6px 12px;
    background: #0078d4;
    color: white;
    border: 1px solid #0078d4;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-btn:hover {
    background: #106ebe;
    border-color: #106ebe;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.stat-item {
    background: white;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.stats-actions {
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.form-actions button,
.form-actions a {
    text-decoration: none;
}

.form-actions button:hover,
.form-actions a:hover {
    text-decoration: none;
}

/* Webhook Logs */
.webhook-logs {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.logs-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f8f9fa;
}

.logs-info h1 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logs-info h1 i {
    color: #0078d4;
}

.webhook-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.webhook-details .webhook-name {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.webhook-details .webhook-path {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #0078d4;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.logs-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.logs-stats {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.logs-container {
    padding: 0;
}

.logs-content {
    max-height: 600px;
    overflow: auto;
    border: 1px solid #dee2e6;
    border-radius: 0 0 6px 6px;
}

.logs-content pre {
    margin: 0;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #212529;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f8f9fa;
    min-height: 200px;
}

.logs-actions-bottom {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.webhook-url-info {
    margin-top: 20px;
    text-align: center;
}

.webhook-url-info p {
    margin-bottom: 8px;
    color: #6c757d;
}

.webhook-url {
    background: #f8f9fa;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #0078d4;
    display: inline-block;
    margin-bottom: 8px;
}



button{
        background: #0078d4;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

/* Back Button - Global Style */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    margin-bottom: 16px;
}

.back-btn:hover {
    background: #f8f9fa;
    border-color: #0078d4;
    color: #0078d4;
    text-decoration: none;
}

.back-btn i {
    font-size: 12px;
}

.editor-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.editor-header h1 {
    flex: 1;
    margin: 0;
}