/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333333;
    background-color: #F5F5F5;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page Header - full width */
.page-header {
    width: 100%;
    height: 80px;
    background: #E8E8E8;
    border-bottom: 2px solid #CCCCCC;
    padding: 20px;
    text-align: center;
    flex-shrink: 0;
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    color: #333333;
    margin: 0;
    line-height: 40px;
}

.page-subtitle {
    font-size: 14px;
    color: #666666;
    margin: 0;
}

/* Container - full width wrapper that grows to push footer down */
.container {
    width: 100%;
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    background-color: #F5F5F5;
}

/* Content wrapper - constrained width with white background */
.content-wrapper {
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    background: #FFFFFF;
}

/* Footer - full width, sticks to bottom */
.page-footer {
    width: 100%;
    background: #E8E8E8;
    border-top: 2px solid #CCCCCC;
    padding: 15px;
    text-align: center;
    color: #666666;
    font-size: 12px;
    flex-shrink: 0;
}

/* Buttons */
.btn-primary {
    background: #0066CC;
    color: #FFFFFF;
    padding: 10px 20px;
    border: 1px solid #0052A3;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
}

.btn-primary:hover {
    background: #0052A3;
}

.btn-primary:active {
    background: #003D7A;
}

.btn-primary:disabled {
    background: #CCCCCC;
    color: #666666;
    cursor: not-allowed;
}

.btn-secondary {
    background: #FFFFFF;
    color: #333333;
    padding: 10px 20px;
    border: 1px solid #CCCCCC;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
}

.btn-secondary:hover {
    background: #E8E8E8;
    border-color: #999999;
}

.btn-secondary:active {
    background: #CCCCCC;
    border-color: #666666;
}

.btn-secondary:disabled {
    background: #F5F5F5;
    color: #999999;
    border-color: #DDDDDD;
    cursor: not-allowed;
}

/* Form Controls */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    font-size: 14px;
    font-weight: bold;
    color: #333333;
    display: block;
    margin-bottom: 5px;
}

.form-input,
.form-select {
    padding: 8px 12px;
    border: 1px solid #CCCCCC;
    border-radius: 3px;
    font-size: 14px;
    background: #FFFFFF;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border: 1px solid #0066CC;
}

/* Panel */
.panel {
    background: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.panel-header {
    background: #E8E8E8;
    padding: 10px 15px;
    border-bottom: 1px solid #CCCCCC;
    font-weight: bold;
    margin: -15px -15px 15px -15px;
}

/* Alerts */
.alert-success {
    background: #E8F5E9;
    border: 1px solid #4CAF50;
    color: #2E7D32;
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 15px;
}

.alert-error {
    background: #FFEBEE;
    border: 1px solid #D32F2F;
    color: #C62828;
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 15px;
}

.alert-info {
    background: #E3F2FD;
    border: 1px solid #0066CC;
    color: #0052A3;
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 15px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #E8E8E8;
    border-top: 4px solid #0066CC;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Help Button */
.help-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #0066CC;
    color: #FFFFFF;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    vertical-align: middle;
}

.help-button:hover {
    background: #0052A3;
}

/* Modal */
.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: #FFFFFF;
    border: 1px solid #CCCCCC;
    border-radius: 3px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: #E8E8E8;
    padding: 15px;
    border-bottom: 1px solid #CCCCCC;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: bold;
    font-size: 16px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666666;
    line-height: 1;
}

.modal-close:hover {
    color: #333333;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

/* Main Content Wrapper */
.main-content {
    padding-bottom: 20px;
}

/* Utility Classes */
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none; }
.inline-block { display: inline-block; }
.block { display: block; }
.text-bold { font-weight: bold; }
.text-muted { color: #666666; }
.text-small { font-size: 12px; }

/* Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 10px;
    }
}