*:not(button) {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    box-sizing: border-box;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.card, .info-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.form-group small a {
    color: #667eea;
    text-decoration: none;
}

.form-group small a:hover {
    text-decoration: underline;
}

/* Button styles are handled in template-specific stylesheets */
/* .btn-primary rules removed to avoid conflicts */

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

.spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result {
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 600;
}

.result.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.info-card {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
}

.info-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.info-card ul {
    list-style: none;
    margin-bottom: 20px;
}

.info-card li {
    padding: 8px 0;
    color: #555;
}

.security-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.security-note h4 {
    color: #856404;
    margin-bottom: 8px;
}

.security-note p {
    color: #856404;
    margin: 0;
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .container {
        padding: 0;
    }
    
    header h1 {
        font-size: 1.75em;
    }
    
    header p {
        font-size: 1em;
    }
    
    .card, .info-card {
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 15px;
    }
    
    .card h2 {
        font-size: 1.25em;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .container {
        padding: 0;
    }
    
    header h1 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }
    
    header p {
        font-size: 0.95em;
    }
    
    .card, .info-card {
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 12px;
    }
    
    .card h2 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 11px;
        font-size: 16px;
    }
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.toast {
    background: white;
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    min-height: 50px;
}

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.hide {
    animation: slideOut 0.3s ease-out forwards;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    opacity: 0.8;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
}

/* Success Toast */
.toast.success {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.success .toast-content {
    color: #047857;
}

/* Error Toast */
.toast.error {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.error .toast-content {
    color: #b91c1c;
}

/* Warning Toast */
.toast.warning {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast.warning .toast-content {
    color: #b45309;
}

/* Info Toast */
.toast.info {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast.info .toast-content {
    color: #1e40af;
}

/* Modal Confirmation Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.2s ease-out forwards;
}

.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    padding: 0;
    animation: scaleIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #111;
    font-weight: 600;
}

.modal-body {
    padding: 16px 24px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-footer button {
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-footer .btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.modal-footer .btn-cancel:hover {
    background: #e5e7eb;
}

.modal-footer .btn-confirm {
    background: #3b82f6;
    color: white;
}

.modal-footer .btn-confirm:hover {
    background: #2563eb;
}

.modal-footer .btn-confirm.danger {
    background: #ef4444;
}

.modal-footer .btn-confirm.danger:hover {
    background: #dc2626;
}