* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    min-height: 100vh;
    padding: 0;
}

/* Header Styles */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 180px;
    height: auto;
    margin-right: 20px;
}

.nav-menu {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background-color: transparent;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2c3e50;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 2px;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown .nav-btn:after {
    content: ' ▼';
    font-size: 10px;
    vertical-align: middle;
}

.logout-option {
    background-color: #e53e3e;
    color: white;
    border-radius: 0 0 4px 4px;
}

.logout-option:hover {
    background-color: #c53030 !important;
}

/* Section Toggle Buttons */
.section-toggle-btn {
    padding: 8px 14px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
}

.section-toggle-btn:hover {
    border-color: #2563eb;
    background-color: #eff6ff;
}

.section-toggle-btn.selected {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.section-toggle-btn.selected:hover {
    background-color: #1d4ed8;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1, h2, h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
}

h1 {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 30px;
}

h2 {
    font-size: 24px;
    color: #374151;
}

h3 {
    font-size: 18px;
    color: #4b5563;
}

.instruction-text {
    text-align: center;
    margin-bottom: 30px;
    color: #6b7280;
    font-size: 16px;
}

/* Type Selection Buttons */
.type-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.type-btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 30px 20px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.type-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.btn-icon {
    font-size: 36px;
}

/* Form Container */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="file"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: #f9fafb;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    background-color: white;
}

.help-text {
    font-size: 13px;
    color: #6b7280;
    margin-top: 5px;
}

/* Form Info Banner */
.form-info-banner {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2563eb;
}

.form-info-banner p {
    margin: 0;
    color: #1e40af;
}

/* Form Editor Container */
.form-editor-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin: 30px 0;
}

.form-preview {
    background-color: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    min-height: 500px;
    overflow-y: auto;
}

.form-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.loading-text {
    text-align: center;
    color: #6b7280;
    padding: 40px;
}

.form-fields-editor {
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.form-fields-editor h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

#formFieldsContainer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-field-item {
    padding: 12px;
    background-color: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.form-field-item label {
    font-size: 14px;
    margin-bottom: 5px;
}

.form-field-item input,
.form-field-item textarea,
.form-field-item select {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.form-field-item textarea {
    min-height: 80px;
    resize: vertical;
}

/* Form Summary */
.form-summary {
    background-color: #f9fafb;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item span:not(.summary-label) {
    color: #1f2937;
    font-size: 16px;
}

/* Approval Setup */
.approval-setup {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.approver-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr 150px auto;
    gap: 10px;
    margin-bottom: 20px;
}

.add-approver-btn {
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.add-approver-btn:hover {
    background-color: #059669;
}

.approvers-list {
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
}

.approver-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.approver-item:hover {
    background-color: #f3f4f6;
    border-color: #2563eb;
}

.approver-order {
    background-color: #2563eb;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.approver-info {
    flex: 1;
    margin-left: 15px;
}

.approver-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 3px;
}

.approver-email {
    color: #6b7280;
    font-size: 13px;
}

.approver-role {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 15px;
}

.remove-approver-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.remove-approver-btn:hover {
    background-color: #dc2626;
}

.empty-approvers {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.submit-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.success-btn {
    background-color: #10b981;
}

.success-btn:hover {
    background-color: #059669;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-arrow {
    font-size: 20px;
}

.back-btn {
    background-color: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: #4b5563;
}

/* Loading Indicator */
.loading-indicator {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        margin-top: 0;
        box-shadow: none;
    }

    .card {
        padding: 20px;
    }

    .type-buttons {
        grid-template-columns: 1fr;
    }

    .form-editor-container {
        grid-template-columns: 1fr;
    }

    .form-fields-editor {
        max-height: 400px;
    }

    .approver-input-group {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }
}