/* Modern Custom Styles - Based on manual.php design */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 10px;
    line-height: 1.6;
    color: #333;
}

/* Main Container */
#wrap {
    max-width: 90%;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e4e8;
    overflow: hidden;
}

/* Header */
.header {
    background: #2c3e50;
    padding: 30px 40px;
    color: white;
    border-bottom: 3px solid #3498db;
    position: relative;
}

h1, h2 {
    font-size: 26px;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* Content Area */
.content {
    padding: 40px;
}

/* Instruction Box */
.instruction-box {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.instruction-box strong {
    color: #2c3e50;
    display: inline;
    font-size: inherit;
    font-weight: 600;
}

.instruction-box ol,
.instruction-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.instruction-box li {
    margin: 8px 0;
    color: #555;
}

/* Form Elements */
label, .form-label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
}

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

.form-group.text-center {
    text-align: center;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

textarea {
    resize: vertical;
}

textarea[readonly],
input[readonly] {
    background: #f8f9fa;
    cursor: default;
}

/* Buttons */
button,
input[type="submit"],
.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
    background: #2980b9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
}

button:active,
input[type="submit"]:active,
.btn:active {
    background: #2574a9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Button Variants */
.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-primary:active {
    background: #2574a9;
}

.btn-activate,
.btn-success {
    background: #27ae60;
}

.btn-activate:hover,
.btn-success:hover {
    background: #229954;
}

.btn-activate:active,
.btn-success:active {
    background: #1e8449;
}

.btn-deactivate,
.btn-info {
    background: #e67e22;
}

.btn-deactivate:hover,
.btn-info:hover {
    background: #d35400;
}

.btn-deactivate:active,
.btn-info:active {
    background: #ba4a00;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* Error Messages */
.error {
    color: #c0392b;
    font-weight: 600;
    display: block;
    padding: 15px;
    background: #fadbd8;
    border: 1px solid #e74c3c;
    border-left: 4px solid #c0392b;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Success Box */
.success-box {
    background: #d5f4e6;
    border: 1px solid #27ae60;
    border-left: 4px solid #27ae60;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success-box label {
    color: #1e8449;
    margin-bottom: 15px;
}

/* Info Display */
.info-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e1e4e8;
}

.info-display div {
    margin: 8px 0;
    color: #2c3e50;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
    padding: 12px;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

thead {
    background: #2c3e50;
    color: white;
}

thead th {
    font-weight: 600;
    text-align: left;
    padding: 12px;
}

tbody td {
    padding: 12px;
}

caption {
    caption-side: top;
    padding: 10px 0;
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
}

/* Table Responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 20px 40px;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    border-top: 1px solid #e1e4e8;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Language Toggle */
.lang-toggle {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 1000;
}

.lang-toggle select {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 30px 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.lang-toggle select:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-toggle select:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.lang-toggle select option {
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
}

/* Utility Classes */
.d-grid {
    display: grid;
}

.mb-3 {
    margin-bottom: 1rem;
}

.row {
    margin-bottom: 1rem;
}

hr {
    display: none;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Lists */
ul {
    list-style-type: disc;
    padding-left: 20px;
}

ol {
    list-style-type: decimal;
    padding-left: 20px;
}

li {
    margin: 8px 0;
    line-height: 1.6;
}

/* Alert Boxes */
.alert {
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-info {
    background: #e8f4f8;
    border: 1px solid #3498db;
    border-left: 4px solid #3498db;
    color: #2c3e50;
}

.alert-success {
    background: #d5f4e6;
    border: 1px solid #27ae60;
    border-left: 4px solid #27ae60;
    color: #2c3e50;
}

.alert-danger {
    background: #fadbd8;
    border: 1px solid #e74c3c;
    border-left: 4px solid #c0392b;
    color: #c0392b;
}

.alert-warning {
    background: #fef5e7;
    border: 1px solid #f39c12;
    border-left: 4px solid #f39c12;
    color: #856404;
}

.alert h3 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 15px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    #wrap {
        margin: 20px auto;
        border-radius: 6px;
    }

    .header,
    .content,
    .footer {
        padding: 20px;
    }

    h1, h2 {
        font-size: 22px;
    }

    button,
    input[type="submit"],
    .btn {
        width: 100%;
        padding: 12px 24px;
        margin-bottom: 10px;
    }

    .lang-toggle {
        position: static;
        text-align: center;
        padding: 10px 0;
        margin-bottom: 10px;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .instruction-box {
        padding: 15px;
    }

    table,
    .table {
        font-size: 14px;
    }

    thead th,
    tbody td {
        padding: 8px 4px;
        white-space: nowrap;
    }

    .info-display {
        padding: 15px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    #wrap {
        margin: 10px auto;
    }

    .header,
    .content,
    .footer {
        padding: 15px;
    }

    h1, h2 {
        font-size: 20px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    .form-control {
        font-size: 16px;
        padding: 10px;
    }

    button,
    input[type="submit"],
    .btn {
        padding: 10px 12px;
        font-size: 14px;
    }

    table,
    .table {
        font-size: 12px;
    }

    thead th,
    tbody td {
        padding: 6px 2px;
    }

    ul, ol {
        padding-left: 15px;
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .lang-toggle,
    .btn,
    button,
    .footer {
        display: none;
    }

    #wrap {
        box-shadow: none;
        border: none;
    }

    body {
        background: white;
    }
}

