/* Bootstrap 3 Lite (rewritten, modernized)
   - Flexbox grid
   - CSS variables for theming
   - Keeps common .btn/.table/.form-control/.label/.badge/.alert classes
   - Drops old vendor hacks & IE-specific rules
   MIT-style rewrite
*/

:root{
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text: #333;
  --muted: #777;
  --bg: #fff;
  --border: #ddd;

  --primary: #337ab7;
  --success: #5cb85c;
  --info:    #5bc0de;
  --warning: #f0ad4e;
  --danger:  #d9534f;

  --radius: 4px;
  --radius-lg: 6px;
  --radius-sm: 3px;

  --line: 1.42857143;
  --sp-1: 5px;
  --sp-2: 10px;
  --sp-3: 15px;
  --sp-4: 20px;
}

/* Normalize-ish reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { font-size: 10px; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; }
body { margin:0; font-family: var(--font-sans); font-size:14px; line-height:var(--line); color:var(--text); background:#fff; }
img { border:0; vertical-align:middle; max-width:100%; height:auto; }
svg { overflow:hidden; }
hr { margin: var(--sp-4) 0; border:0; border-top:1px solid #eee; }

/* Links */
a { color: var(--primary); text-decoration:none; background-color:transparent; }
a:hover, a:focus { color:#23527c; text-decoration:underline; outline:0; }

/* Typography */
h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h5,.h6 {
  margin-top:20px; margin-bottom:10px; font-weight:500; line-height:1.1; color:inherit;
}
h1,.h1{font-size:36px}
h2,.h2{font-size:30px}
h3,.h3{font-size:24px}
h4,.h4{font-size:18px}
h5,.h5{font-size:14px}
h6,.h6{font-size:12px}

p{ margin:0 0 10px; }
.lead{ margin-bottom:20px; font-size:16px; font-weight:300; line-height:1.4; }
@media (min-width:768px){ .lead{ font-size:21px; } }

small,.small{ font-size:85%; }
mark,.mark{ padding:.2em; background:#fcf8e3; }
.text-left{text-align:left!important}
.text-right{text-align:right!important}
.text-center{text-align:center!important}
.text-justify{text-align:justify!important}
.text-nowrap{white-space:nowrap!important}
.text-lowercase{text-transform:lowercase!important}
.text-uppercase{text-transform:uppercase!important}
.text-capitalize{text-transform:capitalize!important}
.text-muted{ color:var(--muted)!important }
.text-primary{ color:var(--primary)!important }
.text-success{ color:#3c763d!important }
.text-info{ color:#31708f!important }
.text-warning{ color:#8a6d3b!important }
.text-danger{ color:#a94442!important }

.bg-primary{ color:#fff; background:var(--primary)!important }
.bg-success{ background:#dff0d8!important }
.bg-info{ background:#d9edf7!important }
.bg-warning{ background:#fcf8e3!important }
.bg-danger{ background:#f2dede!important }

/* Utilities */
.clearfix::after{content:"";display:block;clear:both}
.pull-left{float:left!important}
.pull-right{float:right!important}
.hidden{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Images */
.img-responsive{display:block;max-width:100%;height:auto}
.img-rounded{border-radius:6px}
.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:var(--line);background:#fff;border:1px solid var(--border);border-radius:var(--radius);transition:all .2s}
.img-circle{border-radius:50%}

/* Containers */
.container,
.container-fluid { margin-right:auto; margin-left:auto; padding-right:15px; padding-left:15px; }
@media (min-width:768px){ .container{ width:750px; } }
@media (min-width:992px){ .container{ width:970px; } }
@media (min-width:1200px){ .container{ width:1170px; } }

/* Rows (flexbox grid) */
.row{
  display:flex; flex-wrap:wrap;
  margin-right:-15px; margin-left:-15px;
}

/* Columns – XS baseline using flex-basis/max-width; SM/MD/LG via media queries */
[class*="col-xs-"],[class*="col-sm-"],[class*="col-md-"],[class*="col-lg-"]{position:relative; min-height:1px; padding-right:15px; padding-left:15px;}

.col-xs-1{flex:0 0 8.333333%;max-width:8.333333%}
.col-xs-2{flex:0 0 16.666667%;max-width:16.666667%}
.col-xs-3{flex:0 0 25%;max-width:25%}
.col-xs-4{flex:0 0 33.333333%;max-width:33.333333%}
.col-xs-5{flex:0 0 41.666667%;max-width:41.666667%}
.col-xs-6{flex:0 0 50%;max-width:50%}
.col-xs-7{flex:0 0 58.333333%;max-width:58.333333%}
.col-xs-8{flex:0 0 66.666667%;max-width:66.666667%}
.col-xs-9{flex:0 0 75%;max-width:75%}
.col-xs-10{flex:0 0 83.333333%;max-width:83.333333%}
.col-xs-11{flex:0 0 91.666667%;max-width:91.666667%}
.col-xs-12{flex:0 0 100%;max-width:100%}

@media(min-width:768px){
  .col-sm-1{flex:0 0 8.333333%;max-width:8.333333%}
  .col-sm-2{flex:0 0 16.666667%;max-width:16.666667%}
  .col-sm-3{flex:0 0 25%;max-width:25%}
  .col-sm-4{flex:0 0 33.333333%;max-width:33.333333%}
  .col-sm-5{flex:0 0 41.666667%;max-width:41.666667%}
  .col-sm-6{flex:0 0 50%;max-width:50%}
  .col-sm-7{flex:0 0 58.333333%;max-width:58.333333%}
  .col-sm-8{flex:0 0 66.666667%;max-width:66.666667%}
  .col-sm-9{flex:0 0 75%;max-width:75%}
  .col-sm-10{flex:0 0 83.333333%;max-width:83.333333%}
  .col-sm-11{flex:0 0 91.666667%;max-width:91.666667%}
  .col-sm-12{flex:0 0 100%;max-width:100%}
}
@media(min-width:992px){
  .col-md-1{flex:0 0 8.333333%;max-width:8.333333%}
  .col-md-2{flex:0 0 16.666667%;max-width:16.666667%}
  .col-md-3{flex:0 0 25%;max-width:25%}
  .col-md-4{flex:0 0 33.333333%;max-width:33.333333%}
  .col-md-5{flex:0 0 41.666667%;max-width:41.666667%}
  .col-md-6{flex:0 0 50%;max-width:50%}
  .col-md-7{flex:0 0 58.333333%;max-width:58.333333%}
  .col-md-8{flex:0 0 66.666667%;max-width:66.666667%}
  .col-md-9{flex:0 0 75%;max-width:75%}
  .col-md-10{flex:0 0 83.333333%;max-width:83.333333%}
  .col-md-11{flex:0 0 91.666667%;max-width:91.666667%}
  .col-md-12{flex:0 0 100%;max-width:100%}
}
@media(min-width:1200px){
  .col-lg-1{flex:0 0 8.333333%;max-width:8.333333%}
  .col-lg-2{flex:0 0 16.666667%;max-width:16.666667%}
  .col-lg-3{flex:0 0 25%;max-width:25%}
  .col-lg-4{flex:0 0 33.333333%;max-width:33.333333%}
  .col-lg-5{flex:0 0 41.666667%;max-width:41.666667%}
  .col-lg-6{flex:0 0 50%;max-width:50%}
  .col-lg-7{flex:0 0 58.333333%;max-width:58.333333%}
  .col-lg-8{flex:0 0 66.666667%;max-width:66.666667%}
  .col-lg-9{flex:0 0 75%;max-width:75%}
  .col-lg-10{flex:0 0 83.333333%;max-width:83.333333%}
  .col-lg-11{flex:0 0 91.666667%;max-width:91.666667%}
  .col-lg-12{flex:0 0 100%;max-width:100%}
}

/* Offsets (common ones) */
.col-xs-offset-1{margin-left:8.333333%}
.col-xs-offset-2{margin-left:16.666667%}
.col-xs-offset-3{margin-left:25%}
.col-xs-offset-4{margin-left:33.333333%}
.col-xs-offset-5{margin-left:41.666667%}
.col-xs-offset-6{margin-left:50%}
@media(min-width:768px){
  .col-sm-offset-1{margin-left:8.333333%}
  .col-sm-offset-2{margin-left:16.666667%}
  .col-sm-offset-3{margin-left:25%}
  .col-sm-offset-4{margin-left:33.333333%}
  .col-sm-offset-5{margin-left:41.666667%}
  .col-sm-offset-6{margin-left:50%}
}
@media(min-width:992px){
  .col-md-offset-1{margin-left:8.333333%}
  .col-md-offset-2{margin-left:16.666667%}
  .col-md-offset-3{margin-left:25%}
  .col-md-offset-4{margin-left:33.333333%}
  .col-md-offset-5{margin-left:41.666667%}
  .col-md-offset-6{margin-left:50%}
}
@media(min-width:1200px){
  .col-lg-offset-1{margin-left:8.333333%}
  .col-lg-offset-2{margin-left:16.666667%}
  .col-lg-offset-3{margin-left:25%}
  .col-lg-offset-4{margin-left:33.333333%}
  .col-lg-offset-5{margin-left:41.666667%}
  .col-lg-offset-6{margin-left:50%}
}

/* Tables */
table{ background:transparent; border-collapse:collapse; border-spacing:0; width:100%; }
caption{ padding:8px 0; color:var(--muted); text-align:left; }
th{ text-align:left; }

.table{ width:100%; max-width:100%; margin-bottom:20px; }
.table>thead>tr>th,
.table>tbody>tr>th,
.table>tfoot>tr>th,
.table>thead>tr>td,
.table>tbody>tr>td,
.table>tfoot>tr>td{
  padding:8px; line-height:var(--line); vertical-align:top; border-top:1px solid var(--border);
}
.table>thead>tr>th{ vertical-align:bottom; border-bottom:2px solid var(--border); }
.table-striped>tbody>tr:nth-of-type(odd){ background:#f9f9f9; }
.table-hover>tbody>tr:hover{ background:#f5f5f5; }
.table-bordered{ border:1px solid var(--border); }
.table-bordered>thead>tr>th,
.table-bordered>tbody>tr>th,
.table-bordered>tfoot>tr>th,
.table-bordered>thead>tr>td,
.table-bordered>tbody>tr>td,
.table-bordered>tfoot>tr>td{ border:1px solid var(--border); }
.table-condensed>thead>tr>th,
.table-condensed>tbody>tr>td{ padding:5px; }

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

/* Forms */
label{ display:inline-block; max-width:100%; margin-bottom:5px; font-weight:700; }
.form-group{ margin-bottom:15px; }
.form-control{
  display:block; width:100%; height:34px; padding:6px 12px; font-size:14px; line-height:var(--line);
  color:#555; background:#fff; border:1px solid #ccc; border-radius:var(--radius);
  transition:border-color .15s, box-shadow .15s;
}
.form-control:focus{ border-color:#66afe9; outline:0; box-shadow:0 0 0 3px rgba(102,175,233,.2); }
.form-control[disabled], .form-control[readonly]{ background:#eee; opacity:1; }
textarea.form-control{ height:auto; }

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

/* Validation states */
.has-success .control-label,.has-success .help-block{ color:#3c763d; }
.has-success .form-control{ border-color:#3c763d; }
.has-warning .control-label,.has-warning .help-block{ color:#8a6d3b; }
.has-warning .form-control{ border-color:#8a6d3b; }
.has-error .control-label,.has-error .help-block{ color:#a94442; }
.has-error .form-control{ border-color:#a94442; }

/* Buttons */
.btn{
  display:inline-block; margin-bottom:0; font-weight:400; text-align:center; white-space:nowrap; vertical-align:middle;
  user-select:none; border:1px solid transparent; padding:6px 12px; font-size:14px; line-height:var(--line);
  border-radius:var(--radius); background:#fff; color:#333; transition: box-shadow .15s, background .15s, border-color .15s;
}
.btn:focus{ outline:0; box-shadow:0 0 0 3px rgba(51,122,183,.25); }
.btn:hover{ text-decoration:none; }
.btn:disabled, .btn[disabled]{ opacity:.65; cursor:not-allowed; }

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

.btn-primary{ color:#fff; background:var(--primary); border-color:#2e6da4; }
.btn-primary:hover{ background:#286090; border-color:#204d74; }

.btn-success{ color:#fff; background:var(--success); border-color:#4cae4c; }
.btn-success:hover{ background:#449d44; border-color:#398439; }

.btn-info{ color:#fff; background:var(--info); border-color:#46b8da; }
.btn-info:hover{ background:#31b0d5; border-color:#269abc; }

.btn-warning{ color:#fff; background:var(--warning); border-color:#eea236; }
.btn-warning:hover{ background:#ec971f; border-color:#d58512; }

.btn-danger{ color:#fff; background:var(--danger); border-color:#d43f3a; }
.btn-danger:hover{ background:#c9302c; border-color:#ac2925; }

.btn-link{ background:transparent; border-color:transparent; color:var(--primary); }
.btn-link:hover{ color:#23527c; text-decoration:underline; }
.btn-block{ display:block; width:100%; }
.btn-lg{ padding:10px 16px; font-size:18px; border-radius:var(--radius-lg); }
.btn-sm{ padding:5px 10px; font-size:12px; border-radius:var(--radius-sm); }
.btn-xs{ padding:1px 5px; font-size:12px; border-radius:var(--radius-sm); }

/* Button groups (minimal) */
.btn-group{ display:inline-flex; vertical-align:middle; }
.btn-group .btn{ border-radius:0; }
.btn-group .btn:first-child{ border-top-left-radius:var(--radius); border-bottom-left-radius:var(--radius); }
.btn-group .btn:last-child{ border-top-right-radius:var(--radius); border-bottom-right-radius:var(--radius); }
.btn-group .btn + .btn{ margin-left:-1px; }

/* Labels & badges */
.label{
  display:inline; padding:.2em .6em .3em; font-size:75%; font-weight:700; color:#fff; text-align:center; white-space:nowrap;
  vertical-align:baseline; border-radius:.25em;
}
.label-default{ background:#777 }
.label-primary{ background:var(--primary) }
.label-success{ background:var(--success) }
.label-info{ background:var(--info) }
.label-warning{ background:var(--warning) }
.label-danger{ background:var(--danger) }

.badge{
  display:inline-block; min-width:10px; padding:3px 7px; font-size:12px; font-weight:700; color:#fff; text-align:center;
  white-space:nowrap; vertical-align:middle; background:#777; border-radius:10px;
}

/* Alerts */
.alert{
  padding:15px; margin-bottom:20px; border:1px solid transparent; border-radius:var(--radius);
}
.alert h4{ margin-top:0; }
.alert-success{ color:#3c763d; background:#dff0d8; border-color:#d6e9c6; }
.alert-info{ color:#31708f; background:#d9edf7; border-color:#bce8f1; }
.alert-warning{ color:#8a6d3b; background:#fcf8e3; border-color:#faebcc; }
.alert-danger{ color:#a94442; background:#f2dede; border-color:#ebccd1; }

/* Pagination */
.pagination{
  display:inline-flex; padding-left:0; margin:20px 0; border-radius:var(--radius);
}
.pagination>li{ list-style:none; }
.pagination>li>a, .pagination>li>span{
  position:relative; float:left; padding:6px 12px; margin-left:-1px; line-height:var(--line); color:var(--primary);
  text-decoration:none; background:#fff; border:1px solid var(--border);
}
.pagination>li:first-child>a, .pagination>li:first-child>span{
  margin-left:0; border-top-left-radius:var(--radius); border-bottom-left-radius:var(--radius);
}
.pagination>li:last-child>a, .pagination>li:last-child>span{
  border-top-right-radius:var(--radius); border-bottom-right-radius:var(--radius);
}
.pagination>li>a:hover{ background:#eee; }

/* Pager */
.pager{ padding-left:0; margin:20px 0; text-align:center; list-style:none; }
.pager li{ display:inline; }
.pager li>a, .pager li>span{
  display:inline-block; padding:5px 14px; background:#fff; border:1px solid var(--border); border-radius:15px;
}
.pager .previous>a{ float:left; }
.pager .next>a{ float:right; }

/* Thumbnails */
.thumbnail{
  display:block; padding:4px; margin-bottom:20px; line-height:var(--line); background:#fff; border:1px solid var(--border);
  border-radius:var(--radius); transition:border .2s;
}
.thumbnail .caption{ padding:9px; color:var(--text); }
a.thumbnail:hover{ border-color:var(--primary); text-decoration:none; }

/* Jumbotron */
.jumbotron{
  padding-top:30px; padding-bottom:30px; margin-bottom:30px; color:inherit; background:#eee; border-radius:var(--radius-lg);
}
.jumbotron p{ margin-bottom:15px; font-size:21px; font-weight:200; }
@media(min-width:768px){
  .jumbotron{ padding-top:48px; padding-bottom:48px; }
  .jumbotron .h1, .jumbotron h1{ font-size:63px; }
}

/* Wells */
.well{
  min-height:20px; padding:19px; margin-bottom:20px; background:#f5f5f5; border:1px solid #e3e3e3; border-radius:var(--radius);
}
.well-lg{ padding:24px; border-radius:var(--radius-lg); }
.well-sm{ padding:9px; border-radius:var(--radius-sm); }

/* Tables contextual rows (optional) */
.table>tbody>tr.success>td{ background:#dff0d8; }
.table>tbody>tr.info>td{ background:#d9edf7; }
.table>tbody>tr.warning>td{ background:#fcf8e3; }
.table>tbody>tr.danger>td{ background:#f2dede; }

/* Print tweaks */
@media print {
  *,*::before,*::after{ text-shadow:none!important; box-shadow:none!important; }
  a,a:visited{ text-decoration:underline; }
  img{ max-width:100%!important; }
  .table{ border-collapse:collapse!important; }
  .table td,.table th{ background-color:#fff!important; }
}
