/* ==========================================================================
   ADMIN UTILITIES
   ==========================================================================
   Lightweight replacement for Bootstrap v3.0.3 (5,966 lines).
   Contains only the classes actually used by internal admin pages:
   - XGenerator/form.latte, XGenerator/error.latte
   - Short/form.latte, Short/list.latte
   - @loginLayout.latte (overrides everything inline, needs minimal base)
   ========================================================================== */

/* --- Box Model Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- Grid --- */
.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.row > [class*="col-"] {
    padding: 0 15px;
}

.col-lg-12 { flex: 0 0 100%; max-width: 100%; }
.col-xs-6  { flex: 0 0 50%; max-width: 50%; }
.col-xs-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }

/* --- Typography --- */
.page-header {
    padding-bottom: 9px;
    margin: 40px 0 20px;
    border-bottom: 1px solid #eee;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.43;
    color: #555;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

textarea.form-control {
    height: auto;
}

.control-label {
    display: inline-block;
    margin-bottom: 5px;
    font-weight: 700;
}

.help-block {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #737373;
    font-size: 12px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: #fff;
    transition: background 0.15s ease-in-out;
}

.btn-success {
    color: #fff;
    background: #5cb85c;
    border-color: #4cae4c;
}

.btn-success:hover {
    background: #449d44;
    border-color: #398439;
}

.btn-primary {
    color: #fff;
    background: #337ab7;
    border-color: #2e6da4;
}

.btn-primary:hover {
    background: #286090;
    border-color: #204d74;
}

.btn-default {
    color: #333;
    background: #fff;
    border-color: #ccc;
}

.btn-default:hover {
    background: #e6e6e6;
    border-color: #adadad;
}

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

.table th,
.table td {
    padding: 8px;
    line-height: 1.43;
    vertical-align: top;
    border-top: 1px solid #ddd;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #ddd;
}

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

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

.table-striped > tbody > tr:nth-of-type(odd) {
    background: #f9f9f9;
}

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

.alert-danger {
    color: #a94442;
    background: #f2dede;
    border-color: #ebccd1;
}

.alert-success {
    color: #3c763d;
    background: #dff0d8;
    border-color: #d6e9c6;
}

.close {
    float: right;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    opacity: 0.2;
    background: none;
    border: 0;
    cursor: pointer;
}

.close:hover {
    opacity: 0.5;
}

/* --- Well --- */
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
}

.well-lg {
    padding: 24px;
    border-radius: 6px;
}

/* --- Text Utilities --- */
.text-danger  { color: #a94442; }
.text-success { color: #3c763d; }

/* --- Utilities --- */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.hide { display: none; }
